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

#
# Generated Mon Aug 25 00:39:50 2014 by generateDS.py version 2.12e.
#
# Command line options:
#   ('--external-encoding', 'utf-8')
#   ('-o', 'gml_generated.py')
#
# Command line arguments:
#   schema/gml.xsd
#
# Command line:
#   /Library/Frameworks/Python.framework/Versions/2.7/bin/generateDS.py --external-encoding="utf-8" -o "gml_generated.py" schema/gml.xsd
#
# Current working directory (os.getcwd()):
#   generated
#

import sys
import getopt
import re as re_
import base64
import datetime as datetime_
from six import string_types

etree_ = None
Verbose_import_ = False
(
    XMLParser_import_none, XMLParser_import_lxml,
    XMLParser_import_elementtree
) = list(range(3))
XMLParser_import_library = None
try:
    # lxml
    from lxml import etree as etree_
    XMLParser_import_library = XMLParser_import_lxml
    if Verbose_import_:
        print("running with lxml.etree")
except ImportError:
    try:
        # cElementTree from Python 2.5+
        import xml.etree.cElementTree as etree_
        XMLParser_import_library = XMLParser_import_elementtree
        if Verbose_import_:
            print("running with cElementTree on Python 2.5+")
    except ImportError:
        try:
            # ElementTree from Python 2.5+
            import xml.etree.ElementTree as etree_
            XMLParser_import_library = XMLParser_import_elementtree
            if Verbose_import_:
                print("running with ElementTree on Python 2.5+")
        except ImportError:
            try:
                # normal cElementTree install
                import cElementTree as etree_
                XMLParser_import_library = XMLParser_import_elementtree
                if Verbose_import_:
                    print("running with cElementTree")
            except ImportError:
                try:
                    # normal ElementTree install
                    import elementtree.ElementTree as etree_
                    XMLParser_import_library = XMLParser_import_elementtree
                    if Verbose_import_:
                        print("running with ElementTree")
                except ImportError:
                    raise ImportError(
                        "Failed to import ElementTree from any known place")


def parsexml_(*args, **kwargs):
    if (XMLParser_import_library == XMLParser_import_lxml and
            'parser' not in kwargs):
        # Use the lxml ElementTree compatible parser so that, e.g.,
        #   we ignore comments.
        kwargs['parser'] = etree_.ETCompatXMLParser()
    doc = etree_.parse(*args, **kwargs)
    return doc

#
# User methods
#
# 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 ImportError as exp:

    class GeneratedsSuper(object):
        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 gds_format_string(self, input_data, input_name=''):
            return input_data
        def gds_validate_string(self, input_data, node, 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)
        def gds_validate_base64(self, input_data, node, input_name=''):
            return input_data
        def gds_format_integer(self, input_data, input_name=''):
            return '%d' % input_data
        def gds_validate_integer(self, input_data, node, input_name=''):
            return input_data
        def gds_format_integer_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_integer_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of integers')
            return input_data
        def gds_format_float(self, input_data, input_name=''):
            return ('%.15f' % input_data).rstrip('0')
        def gds_validate_float(self, input_data, node, input_name=''):
            return input_data
        def gds_format_float_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_float_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of floats')
            return input_data
        def gds_format_double(self, input_data, input_name=''):
            return '%e' % input_data
        def gds_validate_double(self, input_data, node, input_name=''):
            return input_data
        def gds_format_double_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_double_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of doubles')
            return input_data
        def gds_format_boolean(self, input_data, input_name=''):
            return ('%s' % input_data).lower()
        def gds_validate_boolean(self, input_data, node, input_name=''):
            return input_data
        def gds_format_boolean_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_boolean_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                if value not in ('true', '1', 'false', '0', ):
                    raise_parse_error(
                        node,
                        'Requires sequence of booleans '
                        '("true", "1", "false", "0")')
            return input_data
        def gds_validate_datetime(self, input_data, node, 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], micro_seconds, )
                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, 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, 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
        @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_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):
            return None
        @classmethod
        def gds_reverse_node_mapping(cls, mapping):
            return dict(((v, k) for k, v in mapping.items()))


#
# 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 = 'utf-8'
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

#
# Support/utility functions.
#


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


def quote_xml(inStr):
    if not inStr:
        return ''
    s1 = (isinstance(inStr, string_types) and inStr or
          '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    return s1


def quote_attrib(inStr):
    s1 = (isinstance(inStr, string_types) and inStr or
          '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    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
        namespace = node.nsmap.get(prefix)
        if namespace is not None:
            value = attrs.get('{%s}%s' % (namespace, name, ))
    return value


class GDSParseError(Exception):
    pass


def raise_parse_error(node, msg):
    if XMLParser_import_library == XMLParser_import_lxml:
        msg = '%s (element %s/line %d)' % (
            msg, node.tag, node.sourceline, )
    else:
        msg = '%s (element %s)' % (msg, node.tag, )
    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, 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):
        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):
        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):
        self.name = name
        self.data_type = data_type
        self.container = container
    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 _cast(typ, value):
    if typ is None or value is None:
        return value
    return typ(value)

#
# Data representation classes.
#


class HistoryPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractTimeSlice=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractTimeSlice is None:
            self.AbstractTimeSlice = []
        else:
            self.AbstractTimeSlice = AbstractTimeSlice
    def factory(*args_, **kwargs_):
        if HistoryPropertyType.subclass:
            return HistoryPropertyType.subclass(*args_, **kwargs_)
        else:
            return HistoryPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractTimeSlice(self): return self.AbstractTimeSlice
    def set_AbstractTimeSlice(self, AbstractTimeSlice): self.AbstractTimeSlice = AbstractTimeSlice
    def add_AbstractTimeSlice(self, value): self.AbstractTimeSlice.append(value)
    def insert_AbstractTimeSlice_at(self, index, value): self.AbstractTimeSlice.insert(index, value)
    def replace_AbstractTimeSlice_at(self, index, value): self.AbstractTimeSlice[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractTimeSlice
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='HistoryPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='HistoryPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='HistoryPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='HistoryPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='HistoryPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractTimeSlice_ in self.AbstractTimeSlice:
            AbstractTimeSlice_.export(outfile, level, namespace_, name_='AbstractTimeSlice', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='HistoryPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractTimeSlice=[\n')
        level += 1
        for AbstractTimeSlice_ in self.AbstractTimeSlice:
            showIndent(outfile, level)
            outfile.write('model_.AbstractTimeSliceType(\n')
            AbstractTimeSlice_.exportLiteral(outfile, level, name_='AbstractTimeSliceType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractTimeSlice':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeSlice> element')
            self.AbstractTimeSlice.append(obj_)
            obj_.original_tagname_ = 'AbstractTimeSlice'
        elif nodeName_ == 'MovingObjectStatus':
            obj_ = MovingObjectStatusType.factory()
            obj_.build(child_)
            self.AbstractTimeSlice.append(obj_)
            obj_.original_tagname_ = 'MovingObjectStatus'
# end class HistoryPropertyType


class NodeOrEdgePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Node=None, Edge=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Node = Node
        self.Edge = Edge
    def factory(*args_, **kwargs_):
        if NodeOrEdgePropertyType.subclass:
            return NodeOrEdgePropertyType.subclass(*args_, **kwargs_)
        else:
            return NodeOrEdgePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Node(self): return self.Node
    def set_Node(self, Node): self.Node = Node
    def get_Edge(self): return self.Edge
    def set_Edge(self, Edge): self.Edge = Edge
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Node is not None or
            self.Edge is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='NodeOrEdgePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NodeOrEdgePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='NodeOrEdgePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='NodeOrEdgePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='NodeOrEdgePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Node is not None:
            self.Node.export(outfile, level, namespace_='gml:', name_='Node', pretty_print=pretty_print)
        if self.Edge is not None:
            self.Edge.export(outfile, level, namespace_='gml:', name_='Edge', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='NodeOrEdgePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Node is not None:
            showIndent(outfile, level)
            outfile.write('Node=model_.Node(\n')
            self.Node.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Edge is not None:
            showIndent(outfile, level)
            outfile.write('Edge=model_.Edge(\n')
            self.Edge.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Node':
            obj_ = NodeType.factory()
            obj_.build(child_)
            self.Node = obj_
            obj_.original_tagname_ = 'Node'
        elif nodeName_ == 'Edge':
            obj_ = EdgeType.factory()
            obj_.build(child_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
# end class NodeOrEdgePropertyType


class NodePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Node=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Node = Node
    def factory(*args_, **kwargs_):
        if NodePropertyType.subclass:
            return NodePropertyType.subclass(*args_, **kwargs_)
        else:
            return NodePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Node(self): return self.Node
    def set_Node(self, Node): self.Node = Node
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Node is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='NodePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NodePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='NodePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='NodePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='NodePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Node is not None:
            self.Node.export(outfile, level, namespace_='gml:', name_='Node', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='NodePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Node is not None:
            showIndent(outfile, level)
            outfile.write('Node=model_.Node(\n')
            self.Node.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Node':
            obj_ = NodeType.factory()
            obj_.build(child_)
            self.Node = obj_
            obj_.original_tagname_ = 'Node'
# end class NodePropertyType


class FaceOrTopoSolidPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Face=None, TopoSolid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Face = Face
        self.TopoSolid = TopoSolid
    def factory(*args_, **kwargs_):
        if FaceOrTopoSolidPropertyType.subclass:
            return FaceOrTopoSolidPropertyType.subclass(*args_, **kwargs_)
        else:
            return FaceOrTopoSolidPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Face(self): return self.Face
    def set_Face(self, Face): self.Face = Face
    def get_TopoSolid(self): return self.TopoSolid
    def set_TopoSolid(self, TopoSolid): self.TopoSolid = TopoSolid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Face is not None or
            self.TopoSolid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FaceOrTopoSolidPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FaceOrTopoSolidPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FaceOrTopoSolidPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FaceOrTopoSolidPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FaceOrTopoSolidPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Face is not None:
            self.Face.export(outfile, level, namespace_='gml:', name_='Face', pretty_print=pretty_print)
        if self.TopoSolid is not None:
            self.TopoSolid.export(outfile, level, namespace_='gml:', name_='TopoSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='FaceOrTopoSolidPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Face is not None:
            showIndent(outfile, level)
            outfile.write('Face=model_.Face(\n')
            self.Face.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.TopoSolid is not None:
            showIndent(outfile, level)
            outfile.write('TopoSolid=model_.TopoSolid(\n')
            self.TopoSolid.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Face':
            obj_ = FaceType.factory()
            obj_.build(child_)
            self.Face = obj_
            obj_.original_tagname_ = 'Face'
        elif nodeName_ == 'TopoSolid':
            obj_ = TopoSolidType.factory()
            obj_.build(child_)
            self.TopoSolid = obj_
            obj_.original_tagname_ = 'TopoSolid'
# end class FaceOrTopoSolidPropertyType


class TopoSolidPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TopoSolid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TopoSolid = TopoSolid
    def factory(*args_, **kwargs_):
        if TopoSolidPropertyType.subclass:
            return TopoSolidPropertyType.subclass(*args_, **kwargs_)
        else:
            return TopoSolidPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoSolid(self): return self.TopoSolid
    def set_TopoSolid(self, TopoSolid): self.TopoSolid = TopoSolid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TopoSolid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoSolidPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoSolidPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoSolidPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoSolidPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoSolidPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoSolid is not None:
            self.TopoSolid.export(outfile, level, namespace_='gml:', name_='TopoSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoSolidPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoSolid is not None:
            showIndent(outfile, level)
            outfile.write('TopoSolid=model_.TopoSolid(\n')
            self.TopoSolid.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoSolid':
            obj_ = TopoSolidType.factory()
            obj_.build(child_)
            self.TopoSolid = obj_
            obj_.original_tagname_ = 'TopoSolid'
# end class TopoSolidPropertyType


class DirectedNodePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, orientation='+', title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Node=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.orientation = _cast(None, orientation)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Node = Node
    def factory(*args_, **kwargs_):
        if DirectedNodePropertyType.subclass:
            return DirectedNodePropertyType.subclass(*args_, **kwargs_)
        else:
            return DirectedNodePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Node(self): return self.Node
    def set_Node(self, Node): self.Node = Node
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_orientation(self): return self.orientation
    def set_orientation(self, orientation): self.orientation = orientation
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Node is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectedNodePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedNodePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectedNodePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectedNodePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            outfile.write(' orientation=%s' % (quote_attrib(self.orientation), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectedNodePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Node is not None:
            self.Node.export(outfile, level, namespace_='gml:', name_='Node', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectedNodePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            showIndent(outfile, level)
            outfile.write('orientation=%s,\n' % (self.orientation,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Node is not None:
            showIndent(outfile, level)
            outfile.write('Node=model_.NodeType(\n')
            self.Node.exportLiteral(outfile, level, name_='Node')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('orientation', node)
        if value is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            self.orientation = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Node':
            obj_ = NodeType.factory()
            obj_.build(child_)
            self.Node = obj_
            obj_.original_tagname_ = 'Node'
# end class DirectedNodePropertyType


class DirectedEdgePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, orientation='+', title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Edge=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.orientation = _cast(None, orientation)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Edge = Edge
    def factory(*args_, **kwargs_):
        if DirectedEdgePropertyType.subclass:
            return DirectedEdgePropertyType.subclass(*args_, **kwargs_)
        else:
            return DirectedEdgePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Edge(self): return self.Edge
    def set_Edge(self, Edge): self.Edge = Edge
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_orientation(self): return self.orientation
    def set_orientation(self, orientation): self.orientation = orientation
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Edge is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectedEdgePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedEdgePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectedEdgePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectedEdgePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            outfile.write(' orientation=%s' % (quote_attrib(self.orientation), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectedEdgePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Edge is not None:
            self.Edge.export(outfile, level, namespace_='gml:', name_='Edge', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectedEdgePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            showIndent(outfile, level)
            outfile.write('orientation=%s,\n' % (self.orientation,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Edge is not None:
            showIndent(outfile, level)
            outfile.write('Edge=model_.EdgeType(\n')
            self.Edge.exportLiteral(outfile, level, name_='Edge')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('orientation', node)
        if value is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            self.orientation = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Edge':
            obj_ = EdgeType.factory()
            obj_.build(child_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
# end class DirectedEdgePropertyType


class DirectedFacePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, orientation='+', title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Face=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.orientation = _cast(None, orientation)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Face = Face
    def factory(*args_, **kwargs_):
        if DirectedFacePropertyType.subclass:
            return DirectedFacePropertyType.subclass(*args_, **kwargs_)
        else:
            return DirectedFacePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Face(self): return self.Face
    def set_Face(self, Face): self.Face = Face
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_orientation(self): return self.orientation
    def set_orientation(self, orientation): self.orientation = orientation
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Face is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectedFacePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedFacePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectedFacePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectedFacePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            outfile.write(' orientation=%s' % (quote_attrib(self.orientation), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectedFacePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Face is not None:
            self.Face.export(outfile, level, namespace_='gml:', name_='Face', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectedFacePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            showIndent(outfile, level)
            outfile.write('orientation=%s,\n' % (self.orientation,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Face is not None:
            showIndent(outfile, level)
            outfile.write('Face=model_.FaceType(\n')
            self.Face.exportLiteral(outfile, level, name_='Face')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('orientation', node)
        if value is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            self.orientation = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Face':
            obj_ = FaceType.factory()
            obj_.build(child_)
            self.Face = obj_
            obj_.original_tagname_ = 'Face'
# end class DirectedFacePropertyType


class DirectedTopoSolidPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, orientation='+', title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TopoSolid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.orientation = _cast(None, orientation)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TopoSolid = TopoSolid
    def factory(*args_, **kwargs_):
        if DirectedTopoSolidPropertyType.subclass:
            return DirectedTopoSolidPropertyType.subclass(*args_, **kwargs_)
        else:
            return DirectedTopoSolidPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoSolid(self): return self.TopoSolid
    def set_TopoSolid(self, TopoSolid): self.TopoSolid = TopoSolid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_orientation(self): return self.orientation
    def set_orientation(self, orientation): self.orientation = orientation
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TopoSolid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectedTopoSolidPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedTopoSolidPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectedTopoSolidPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectedTopoSolidPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            outfile.write(' orientation=%s' % (quote_attrib(self.orientation), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectedTopoSolidPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoSolid is not None:
            self.TopoSolid.export(outfile, level, namespace_='gml:', name_='TopoSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectedTopoSolidPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            showIndent(outfile, level)
            outfile.write('orientation=%s,\n' % (self.orientation,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoSolid is not None:
            showIndent(outfile, level)
            outfile.write('TopoSolid=model_.TopoSolidType(\n')
            self.TopoSolid.exportLiteral(outfile, level, name_='TopoSolid')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('orientation', node)
        if value is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            self.orientation = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoSolid':
            obj_ = TopoSolidType.factory()
            obj_.build(child_)
            self.TopoSolid = obj_
            obj_.original_tagname_ = 'TopoSolid'
# end class DirectedTopoSolidPropertyType


class TopoPointPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, TopoPoint=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.TopoPoint = TopoPoint
    def factory(*args_, **kwargs_):
        if TopoPointPropertyType.subclass:
            return TopoPointPropertyType.subclass(*args_, **kwargs_)
        else:
            return TopoPointPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoPoint(self): return self.TopoPoint
    def set_TopoPoint(self, TopoPoint): self.TopoPoint = TopoPoint
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.TopoPoint is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoPointPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoPointPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoPointPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoPointPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoPointPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoPoint is not None:
            self.TopoPoint.export(outfile, level, namespace_='gml:', name_='TopoPoint', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoPointPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoPoint is not None:
            showIndent(outfile, level)
            outfile.write('TopoPoint=model_.TopoPointType(\n')
            self.TopoPoint.exportLiteral(outfile, level, name_='TopoPoint')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoPoint':
            obj_ = TopoPointType.factory()
            obj_.build(child_)
            self.TopoPoint = obj_
            obj_.original_tagname_ = 'TopoPoint'
# end class TopoPointPropertyType


class TopoCurvePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, TopoCurve=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.TopoCurve = TopoCurve
    def factory(*args_, **kwargs_):
        if TopoCurvePropertyType.subclass:
            return TopoCurvePropertyType.subclass(*args_, **kwargs_)
        else:
            return TopoCurvePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoCurve(self): return self.TopoCurve
    def set_TopoCurve(self, TopoCurve): self.TopoCurve = TopoCurve
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.TopoCurve is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoCurvePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoCurvePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoCurvePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoCurvePropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoCurvePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoCurve is not None:
            self.TopoCurve.export(outfile, level, namespace_='gml:', name_='TopoCurve', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoCurvePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoCurve is not None:
            showIndent(outfile, level)
            outfile.write('TopoCurve=model_.TopoCurveType(\n')
            self.TopoCurve.exportLiteral(outfile, level, name_='TopoCurve')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoCurve':
            obj_ = TopoCurveType.factory()
            obj_.build(child_)
            self.TopoCurve = obj_
            obj_.original_tagname_ = 'TopoCurve'
# end class TopoCurvePropertyType


class TopoSurfacePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, TopoSurface=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.TopoSurface = TopoSurface
    def factory(*args_, **kwargs_):
        if TopoSurfacePropertyType.subclass:
            return TopoSurfacePropertyType.subclass(*args_, **kwargs_)
        else:
            return TopoSurfacePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoSurface(self): return self.TopoSurface
    def set_TopoSurface(self, TopoSurface): self.TopoSurface = TopoSurface
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.TopoSurface is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoSurfacePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoSurfacePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoSurfacePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoSurfacePropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoSurfacePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoSurface is not None:
            self.TopoSurface.export(outfile, level, namespace_='gml:', name_='TopoSurface', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoSurfacePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoSurface is not None:
            showIndent(outfile, level)
            outfile.write('TopoSurface=model_.TopoSurfaceType(\n')
            self.TopoSurface.exportLiteral(outfile, level, name_='TopoSurface')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoSurface':
            obj_ = TopoSurfaceType.factory()
            obj_.build(child_)
            self.TopoSurface = obj_
            obj_.original_tagname_ = 'TopoSurface'
# end class TopoSurfacePropertyType


class TopoVolumePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, TopoVolume=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.TopoVolume = TopoVolume
    def factory(*args_, **kwargs_):
        if TopoVolumePropertyType.subclass:
            return TopoVolumePropertyType.subclass(*args_, **kwargs_)
        else:
            return TopoVolumePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoVolume(self): return self.TopoVolume
    def set_TopoVolume(self, TopoVolume): self.TopoVolume = TopoVolume
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.TopoVolume is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoVolumePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoVolumePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoVolumePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoVolumePropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoVolumePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoVolume is not None:
            self.TopoVolume.export(outfile, level, namespace_='gml:', name_='TopoVolume', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoVolumePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoVolume is not None:
            showIndent(outfile, level)
            outfile.write('TopoVolume=model_.TopoVolumeType(\n')
            self.TopoVolume.exportLiteral(outfile, level, name_='TopoVolume')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoVolume':
            obj_ = TopoVolumeType.factory()
            obj_.build(child_)
            self.TopoVolume = obj_
            obj_.original_tagname_ = 'TopoVolume'
# end class TopoVolumePropertyType


class TopoPrimitiveMemberType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractTopoPrimitive=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractTopoPrimitive = AbstractTopoPrimitive
    def factory(*args_, **kwargs_):
        if TopoPrimitiveMemberType.subclass:
            return TopoPrimitiveMemberType.subclass(*args_, **kwargs_)
        else:
            return TopoPrimitiveMemberType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractTopoPrimitive(self): return self.AbstractTopoPrimitive
    def set_AbstractTopoPrimitive(self, AbstractTopoPrimitive): self.AbstractTopoPrimitive = AbstractTopoPrimitive
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractTopoPrimitive is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoPrimitiveMemberType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoPrimitiveMemberType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoPrimitiveMemberType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoPrimitiveMemberType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoPrimitiveMemberType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractTopoPrimitive is not None:
            self.AbstractTopoPrimitive.export(outfile, level, namespace_, name_='AbstractTopoPrimitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoPrimitiveMemberType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractTopoPrimitiveType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTopoPrimitiveType=model_.AbstractTopoPrimitiveType(\n')
            self.AbstractTopoPrimitiveType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractTopoPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTopoPrimitive> element')
            self.AbstractTopoPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTopoPrimitive'
        elif nodeName_ == 'Node':
            obj_ = NodeType.factory()
            obj_.build(child_)
            self.Node = obj_
            obj_.original_tagname_ = 'Node'
        elif nodeName_ == 'Edge':
            obj_ = EdgeType.factory()
            obj_.build(child_)
            self.Edge = obj_
            obj_.original_tagname_ = 'Edge'
        elif nodeName_ == 'Face':
            obj_ = FaceType.factory()
            obj_.build(child_)
            self.Face = obj_
            obj_.original_tagname_ = 'Face'
        elif nodeName_ == 'TopoSolid':
            obj_ = TopoSolidType.factory()
            obj_.build(child_)
            self.TopoSolid = obj_
            obj_.original_tagname_ = 'TopoSolid'
# end class TopoPrimitiveMemberType


class TopoPrimitiveArrayAssociationType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractTopoPrimitive=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractTopoPrimitive is None:
            self.AbstractTopoPrimitive = []
        else:
            self.AbstractTopoPrimitive = AbstractTopoPrimitive
    def factory(*args_, **kwargs_):
        if TopoPrimitiveArrayAssociationType.subclass:
            return TopoPrimitiveArrayAssociationType.subclass(*args_, **kwargs_)
        else:
            return TopoPrimitiveArrayAssociationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractTopoPrimitive(self): return self.AbstractTopoPrimitive
    def set_AbstractTopoPrimitive(self, AbstractTopoPrimitive): self.AbstractTopoPrimitive = AbstractTopoPrimitive
    def add_AbstractTopoPrimitive(self, value): self.AbstractTopoPrimitive.append(value)
    def insert_AbstractTopoPrimitive_at(self, index, value): self.AbstractTopoPrimitive.insert(index, value)
    def replace_AbstractTopoPrimitive_at(self, index, value): self.AbstractTopoPrimitive[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractTopoPrimitive
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoPrimitiveArrayAssociationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoPrimitiveArrayAssociationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoPrimitiveArrayAssociationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoPrimitiveArrayAssociationType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoPrimitiveArrayAssociationType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractTopoPrimitive_ in self.AbstractTopoPrimitive:
            AbstractTopoPrimitive_.export(outfile, level, namespace_, name_='AbstractTopoPrimitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoPrimitiveArrayAssociationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractTopoPrimitive=[\n')
        level += 1
        for AbstractTopoPrimitive_ in self.AbstractTopoPrimitive:
            showIndent(outfile, level)
            outfile.write('model_.AbstractTopoPrimitiveType(\n')
            AbstractTopoPrimitive_.exportLiteral(outfile, level, name_='AbstractTopoPrimitiveType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractTopoPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTopoPrimitive> element')
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractTopoPrimitive'
        elif nodeName_ == 'Node':
            obj_ = NodeType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'Node'
        elif nodeName_ == 'Edge':
            obj_ = EdgeType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'Edge'
        elif nodeName_ == 'Face':
            obj_ = FaceType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'Face'
        elif nodeName_ == 'TopoSolid':
            obj_ = TopoSolidType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'TopoSolid'
# end class TopoPrimitiveArrayAssociationType


class TopoComplexPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TopoComplex=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TopoComplex = TopoComplex
    def factory(*args_, **kwargs_):
        if TopoComplexPropertyType.subclass:
            return TopoComplexPropertyType.subclass(*args_, **kwargs_)
        else:
            return TopoComplexPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TopoComplex(self): return self.TopoComplex
    def set_TopoComplex(self, TopoComplex): self.TopoComplex = TopoComplex
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TopoComplex is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoComplexPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoComplexPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoComplexPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoComplexPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoComplexPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TopoComplex is not None:
            self.TopoComplex.export(outfile, level, namespace_='gml:', name_='TopoComplex', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoComplexPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TopoComplex is not None:
            showIndent(outfile, level)
            outfile.write('TopoComplex=model_.TopoComplexType(\n')
            self.TopoComplex.exportLiteral(outfile, level, name_='TopoComplex')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TopoComplex':
            obj_ = TopoComplexType.factory()
            obj_.build(child_)
            self.TopoComplex = obj_
            obj_.original_tagname_ = 'TopoComplex'
# end class TopoComplexPropertyType


class GeometricComplexPropertyType(GeneratedsSuper):
    """A property that has a geometric complex as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, GeometricComplex=None, CompositeCurve=None, CompositeSurface=None, CompositeSolid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.GeometricComplex = GeometricComplex
        self.CompositeCurve = CompositeCurve
        self.CompositeSurface = CompositeSurface
        self.CompositeSolid = CompositeSolid
    def factory(*args_, **kwargs_):
        if GeometricComplexPropertyType.subclass:
            return GeometricComplexPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeometricComplexPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_GeometricComplex(self): return self.GeometricComplex
    def set_GeometricComplex(self, GeometricComplex): self.GeometricComplex = GeometricComplex
    def get_CompositeCurve(self): return self.CompositeCurve
    def set_CompositeCurve(self, CompositeCurve): self.CompositeCurve = CompositeCurve
    def get_CompositeSurface(self): return self.CompositeSurface
    def set_CompositeSurface(self, CompositeSurface): self.CompositeSurface = CompositeSurface
    def get_CompositeSolid(self): return self.CompositeSolid
    def set_CompositeSolid(self, CompositeSolid): self.CompositeSolid = CompositeSolid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.GeometricComplex is not None or
            self.CompositeCurve is not None or
            self.CompositeSurface is not None or
            self.CompositeSolid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeometricComplexPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeometricComplexPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeometricComplexPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeometricComplexPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeometricComplexPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.GeometricComplex is not None:
            self.GeometricComplex.export(outfile, level, namespace_='gml:', name_='GeometricComplex', pretty_print=pretty_print)
        if self.CompositeCurve is not None:
            self.CompositeCurve.export(outfile, level, namespace_='gml:', name_='CompositeCurve', pretty_print=pretty_print)
        if self.CompositeSurface is not None:
            self.CompositeSurface.export(outfile, level, namespace_='gml:', name_='CompositeSurface', pretty_print=pretty_print)
        if self.CompositeSolid is not None:
            self.CompositeSolid.export(outfile, level, namespace_='gml:', name_='CompositeSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeometricComplexPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.GeometricComplex is not None:
            showIndent(outfile, level)
            outfile.write('GeometricComplex=model_.GeometricComplexType(\n')
            self.GeometricComplex.exportLiteral(outfile, level, name_='GeometricComplex')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CompositeCurve is not None:
            showIndent(outfile, level)
            outfile.write('CompositeCurve=model_.CompositeCurve(\n')
            self.CompositeCurve.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CompositeSurface is not None:
            showIndent(outfile, level)
            outfile.write('CompositeSurface=model_.CompositeSurface(\n')
            self.CompositeSurface.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CompositeSolid is not None:
            showIndent(outfile, level)
            outfile.write('CompositeSolid=model_.CompositeSolid(\n')
            self.CompositeSolid.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
# end class GeometricComplexPropertyType


class MultiGeometryPropertyType(GeneratedsSuper):
    """A property that has a geometric aggregate as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeometricAggregate=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractGeometricAggregate = AbstractGeometricAggregate
    def factory(*args_, **kwargs_):
        if MultiGeometryPropertyType.subclass:
            return MultiGeometryPropertyType.subclass(*args_, **kwargs_)
        else:
            return MultiGeometryPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometricAggregate(self): return self.AbstractGeometricAggregate
    def set_AbstractGeometricAggregate(self, AbstractGeometricAggregate): self.AbstractGeometricAggregate = AbstractGeometricAggregate
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeometricAggregate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiGeometryPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiGeometryPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiGeometryPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiGeometryPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiGeometryPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeometricAggregate is not None:
            self.AbstractGeometricAggregate.export(outfile, level, namespace_, name_='AbstractGeometricAggregate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiGeometryPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeometricAggregateType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometricAggregateType=model_.AbstractGeometricAggregateType(\n')
            self.AbstractGeometricAggregateType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
# end class MultiGeometryPropertyType


class MultiPointPropertyType(GeneratedsSuper):
    """A property that has a collection of points as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, MultiPoint=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.MultiPoint = MultiPoint
    def factory(*args_, **kwargs_):
        if MultiPointPropertyType.subclass:
            return MultiPointPropertyType.subclass(*args_, **kwargs_)
        else:
            return MultiPointPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MultiPoint(self): return self.MultiPoint
    def set_MultiPoint(self, MultiPoint): self.MultiPoint = MultiPoint
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MultiPoint is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiPointPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiPointPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiPointPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiPointPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiPointPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MultiPoint is not None:
            self.MultiPoint.export(outfile, level, namespace_='gml:', name_='MultiPoint', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiPointPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MultiPoint is not None:
            showIndent(outfile, level)
            outfile.write('MultiPoint=model_.MultiPointType(\n')
            self.MultiPoint.exportLiteral(outfile, level, name_='MultiPoint')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
# end class MultiPointPropertyType


class MultiCurvePropertyType(GeneratedsSuper):
    """A property that has a collection of curves as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, MultiCurve=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.MultiCurve = MultiCurve
    def factory(*args_, **kwargs_):
        if MultiCurvePropertyType.subclass:
            return MultiCurvePropertyType.subclass(*args_, **kwargs_)
        else:
            return MultiCurvePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MultiCurve(self): return self.MultiCurve
    def set_MultiCurve(self, MultiCurve): self.MultiCurve = MultiCurve
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MultiCurve is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiCurvePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiCurvePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiCurvePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiCurvePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiCurvePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MultiCurve is not None:
            self.MultiCurve.export(outfile, level, namespace_='gml:', name_='MultiCurve', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiCurvePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MultiCurve is not None:
            showIndent(outfile, level)
            outfile.write('MultiCurve=model_.MultiCurveType(\n')
            self.MultiCurve.exportLiteral(outfile, level, name_='MultiCurve')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
# end class MultiCurvePropertyType


class MultiSurfacePropertyType(GeneratedsSuper):
    """A property that has a collection of surfaces as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, MultiSurface=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.MultiSurface = MultiSurface
    def factory(*args_, **kwargs_):
        if MultiSurfacePropertyType.subclass:
            return MultiSurfacePropertyType.subclass(*args_, **kwargs_)
        else:
            return MultiSurfacePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MultiSurface(self): return self.MultiSurface
    def set_MultiSurface(self, MultiSurface): self.MultiSurface = MultiSurface
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MultiSurface is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiSurfacePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiSurfacePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiSurfacePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiSurfacePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiSurfacePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MultiSurface is not None:
            self.MultiSurface.export(outfile, level, namespace_='gml:', name_='MultiSurface', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiSurfacePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MultiSurface is not None:
            showIndent(outfile, level)
            outfile.write('MultiSurface=model_.MultiSurfaceType(\n')
            self.MultiSurface.exportLiteral(outfile, level, name_='MultiSurface')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
# end class MultiSurfacePropertyType


class MultiSolidPropertyType(GeneratedsSuper):
    """A property that has a collection of solids as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, MultiSolid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.MultiSolid = MultiSolid
    def factory(*args_, **kwargs_):
        if MultiSolidPropertyType.subclass:
            return MultiSolidPropertyType.subclass(*args_, **kwargs_)
        else:
            return MultiSolidPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MultiSolid(self): return self.MultiSolid
    def set_MultiSolid(self, MultiSolid): self.MultiSolid = MultiSolid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MultiSolid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiSolidPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiSolidPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiSolidPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiSolidPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiSolidPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MultiSolid is not None:
            self.MultiSolid.export(outfile, level, namespace_='gml:', name_='MultiSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiSolidPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MultiSolid is not None:
            showIndent(outfile, level)
            outfile.write('MultiSolid=model_.MultiSolidType(\n')
            self.MultiSolid.exportLiteral(outfile, level, name_='MultiSolid')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
# end class MultiSolidPropertyType


class AbstractCurveSegmentType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, extensiontype_=None):
        self.original_tagname_ = None
        self.numDerivativesAtEnd = _cast(int, numDerivativesAtEnd)
        self.numDerivativeInterior = _cast(int, numDerivativeInterior)
        self.numDerivativesAtStart = _cast(int, numDerivativesAtStart)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractCurveSegmentType.subclass:
            return AbstractCurveSegmentType.subclass(*args_, **kwargs_)
        else:
            return AbstractCurveSegmentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_numDerivativesAtEnd(self): return self.numDerivativesAtEnd
    def set_numDerivativesAtEnd(self, numDerivativesAtEnd): self.numDerivativesAtEnd = numDerivativesAtEnd
    def get_numDerivativeInterior(self): return self.numDerivativeInterior
    def set_numDerivativeInterior(self, numDerivativeInterior): self.numDerivativeInterior = numDerivativeInterior
    def get_numDerivativesAtStart(self): return self.numDerivativesAtStart
    def set_numDerivativesAtStart(self, numDerivativesAtStart): self.numDerivativesAtStart = numDerivativesAtStart
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractCurveSegmentType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCurveSegmentType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractCurveSegmentType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractCurveSegmentType'):
        if self.numDerivativesAtEnd is not None and 'numDerivativesAtEnd' not in already_processed:
            already_processed.add('numDerivativesAtEnd')
            outfile.write(' numDerivativesAtEnd="%s"' % self.gds_format_integer(self.numDerivativesAtEnd, input_name='numDerivativesAtEnd'))
        if self.numDerivativeInterior is not None and 'numDerivativeInterior' not in already_processed:
            already_processed.add('numDerivativeInterior')
            outfile.write(' numDerivativeInterior="%s"' % self.gds_format_integer(self.numDerivativeInterior, input_name='numDerivativeInterior'))
        if self.numDerivativesAtStart is not None and 'numDerivativesAtStart' not in already_processed:
            already_processed.add('numDerivativesAtStart')
            outfile.write(' numDerivativesAtStart="%s"' % self.gds_format_integer(self.numDerivativesAtStart, input_name='numDerivativesAtStart'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractCurveSegmentType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractCurveSegmentType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.numDerivativesAtEnd is not None and 'numDerivativesAtEnd' not in already_processed:
            already_processed.add('numDerivativesAtEnd')
            showIndent(outfile, level)
            outfile.write('numDerivativesAtEnd=%d,\n' % (self.numDerivativesAtEnd,))
        if self.numDerivativeInterior is not None and 'numDerivativeInterior' not in already_processed:
            already_processed.add('numDerivativeInterior')
            showIndent(outfile, level)
            outfile.write('numDerivativeInterior=%d,\n' % (self.numDerivativeInterior,))
        if self.numDerivativesAtStart is not None and 'numDerivativesAtStart' not in already_processed:
            already_processed.add('numDerivativesAtStart')
            showIndent(outfile, level)
            outfile.write('numDerivativesAtStart=%d,\n' % (self.numDerivativesAtStart,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('numDerivativesAtEnd', node)
        if value is not None and 'numDerivativesAtEnd' not in already_processed:
            already_processed.add('numDerivativesAtEnd')
            try:
                self.numDerivativesAtEnd = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('numDerivativeInterior', node)
        if value is not None and 'numDerivativeInterior' not in already_processed:
            already_processed.add('numDerivativeInterior')
            try:
                self.numDerivativeInterior = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('numDerivativesAtStart', node)
        if value is not None and 'numDerivativesAtStart' not in already_processed:
            already_processed.add('numDerivativesAtStart')
            try:
                self.numDerivativesAtStart = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractCurveSegmentType


class CurveSegmentArrayPropertyType(GeneratedsSuper):
    """gml:CurveSegmentArrayPropertyType is a container for an array of
    curve segments."""
    subclass = None
    superclass = None
    def __init__(self, AbstractCurveSegment=None):
        self.original_tagname_ = None
        if AbstractCurveSegment is None:
            self.AbstractCurveSegment = []
        else:
            self.AbstractCurveSegment = AbstractCurveSegment
    def factory(*args_, **kwargs_):
        if CurveSegmentArrayPropertyType.subclass:
            return CurveSegmentArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return CurveSegmentArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCurveSegment(self): return self.AbstractCurveSegment
    def set_AbstractCurveSegment(self, AbstractCurveSegment): self.AbstractCurveSegment = AbstractCurveSegment
    def add_AbstractCurveSegment(self, value): self.AbstractCurveSegment.append(value)
    def insert_AbstractCurveSegment_at(self, index, value): self.AbstractCurveSegment.insert(index, value)
    def replace_AbstractCurveSegment_at(self, index, value): self.AbstractCurveSegment[index] = value
    def hasContent_(self):
        if (
            self.AbstractCurveSegment
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CurveSegmentArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CurveSegmentArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CurveSegmentArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CurveSegmentArrayPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CurveSegmentArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractCurveSegment_ in self.AbstractCurveSegment:
            AbstractCurveSegment_.export(outfile, level, namespace_, name_='AbstractCurveSegment', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CurveSegmentArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractCurveSegment=[\n')
        level += 1
        for AbstractCurveSegment_ in self.AbstractCurveSegment:
            showIndent(outfile, level)
            outfile.write('model_.AbstractCurveSegmentType(\n')
            AbstractCurveSegment_.exportLiteral(outfile, level, name_='AbstractCurveSegmentType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCurveSegment':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurveSegment> element')
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'AbstractCurveSegment'
        elif nodeName_ == 'LineStringSegment':
            obj_ = LineStringSegmentType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'LineStringSegment'
        elif nodeName_ == 'ArcString':
            obj_ = ArcStringType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'ArcString'
        elif nodeName_ == 'ArcStringByBulge':
            obj_ = ArcStringByBulgeType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'ArcStringByBulge'
        elif nodeName_ == 'ArcByCenterPoint':
            obj_ = ArcByCenterPointType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'ArcByCenterPoint'
        elif nodeName_ == 'CubicSpline':
            obj_ = CubicSplineType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'CubicSpline'
        elif nodeName_ == 'BSpline':
            obj_ = BSplineType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'BSpline'
        elif nodeName_ == 'OffsetCurve':
            obj_ = OffsetCurveType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'OffsetCurve'
        elif nodeName_ == 'Clothoid':
            obj_ = ClothoidType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'Clothoid'
        elif nodeName_ == 'GeodesicString':
            class_obj_ = self.get_class_obj_(child_, GeodesicStringType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'GeodesicString'
        elif nodeName_ == 'Arc':
            class_obj_ = self.get_class_obj_(child_, ArcType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.ArcString.append(obj_)
            obj_.original_tagname_ = 'Arc'
        elif nodeName_ == 'Circle':
            obj_ = CircleType.factory()
            obj_.build(child_)
            self.Arc.append(obj_)
            obj_.original_tagname_ = 'Circle'
        elif nodeName_ == 'ArcByBulge':
            obj_ = ArcByBulgeType.factory()
            obj_.build(child_)
            self.ArcStringByBulge.append(obj_)
            obj_.original_tagname_ = 'ArcByBulge'
        elif nodeName_ == 'CircleByCenterPoint':
            obj_ = CircleByCenterPointType.factory()
            obj_.build(child_)
            self.ArcByCenterPoint.append(obj_)
            obj_.original_tagname_ = 'CircleByCenterPoint'
        elif nodeName_ == 'Bezier':
            obj_ = BezierType.factory()
            obj_.build(child_)
            self.BSpline.append(obj_)
            obj_.original_tagname_ = 'Bezier'
        elif nodeName_ == 'Geodesic':
            obj_ = GeodesicType.factory()
            obj_.build(child_)
            self.GeodesicString.append(obj_)
            obj_.original_tagname_ = 'Geodesic'
# end class CurveSegmentArrayPropertyType


class LineStringSegmentType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, interpolation=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None):
        self.original_tagname_ = None
        super(LineStringSegmentType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.interpolation = _cast(None, interpolation)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
    def factory(*args_, **kwargs_):
        if LineStringSegmentType.subclass:
            return LineStringSegmentType.subclass(*args_, **kwargs_)
        else:
            return LineStringSegmentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            super(LineStringSegmentType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LineStringSegmentType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LineStringSegmentType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LineStringSegmentType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LineStringSegmentType'):
        super(LineStringSegmentType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LineStringSegmentType')
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LineStringSegmentType', fromsubclass_=False, pretty_print=True):
        super(LineStringSegmentType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LineStringSegmentType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(LineStringSegmentType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LineStringSegmentType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(LineStringSegmentType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        super(LineStringSegmentType, self).buildChildren(child_, node, nodeName_, True)
# end class LineStringSegmentType


class ArcStringType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, numArc=None, interpolation=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None):
        self.original_tagname_ = None
        super(ArcStringType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.numArc = _cast(int, numArc)
        self.interpolation = _cast(None, interpolation)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
    def factory(*args_, **kwargs_):
        if ArcStringType.subclass:
            return ArcStringType.subclass(*args_, **kwargs_)
        else:
            return ArcStringType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_numArc(self): return self.numArc
    def set_numArc(self, numArc): self.numArc = numArc
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            super(ArcStringType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArcStringType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArcStringType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArcStringType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArcStringType'):
        super(ArcStringType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ArcStringType')
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            outfile.write(' numArc="%s"' % self.gds_format_integer(self.numArc, input_name='numArc'))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArcStringType', fromsubclass_=False, pretty_print=True):
        super(ArcStringType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArcStringType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            showIndent(outfile, level)
            outfile.write('numArc=%d,\n' % (self.numArc,))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(ArcStringType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ArcStringType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('numArc', node)
        if value is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            try:
                self.numArc = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(ArcStringType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        super(ArcStringType, self).buildChildren(child_, node, nodeName_, True)
# end class ArcStringType


class ArcType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, numArc=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, extensiontype_=None):
        self.original_tagname_ = None
        self.numArc = _cast(int, numArc)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if ArcType.subclass:
            return ArcType.subclass(*args_, **kwargs_)
        else:
            return ArcType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_numArc(self): return self.numArc
    def set_numArc(self, numArc): self.numArc = numArc
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArcType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArcType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArcType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArcType'):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            outfile.write(' numArc="%s"' % self.gds_format_integer(self.numArc, input_name='numArc'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArcType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArcType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            showIndent(outfile, level)
            outfile.write('numArc=%d,\n' % (self.numArc,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('numArc', node)
        if value is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            try:
                self.numArc = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
# end class ArcType


class CircleType(ArcType):
    subclass = None
    superclass = ArcType
    def __init__(self, numArc=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None):
        self.original_tagname_ = None
        super(CircleType, self).__init__(numArc, pos, pointProperty, pointRep, posList, coordinates, )
    def factory(*args_, **kwargs_):
        if CircleType.subclass:
            return CircleType.subclass(*args_, **kwargs_)
        else:
            return CircleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(CircleType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CircleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CircleType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CircleType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CircleType'):
        super(CircleType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CircleType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CircleType', fromsubclass_=False, pretty_print=True):
        super(CircleType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CircleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CircleType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CircleType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CircleType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(CircleType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class CircleType


class ArcStringByBulgeType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, numArc=None, interpolation=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, bulge=None, normal=None):
        self.original_tagname_ = None
        super(ArcStringByBulgeType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.numArc = _cast(int, numArc)
        self.interpolation = _cast(None, interpolation)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        if bulge is None:
            self.bulge = []
        else:
            self.bulge = bulge
        if normal is None:
            self.normal = []
        else:
            self.normal = normal
    def factory(*args_, **kwargs_):
        if ArcStringByBulgeType.subclass:
            return ArcStringByBulgeType.subclass(*args_, **kwargs_)
        else:
            return ArcStringByBulgeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_bulge(self): return self.bulge
    def set_bulge(self, bulge): self.bulge = bulge
    def add_bulge(self, value): self.bulge.append(value)
    def insert_bulge_at(self, index, value): self.bulge.insert(index, value)
    def replace_bulge_at(self, index, value): self.bulge[index] = value
    def get_normal(self): return self.normal
    def set_normal(self, normal): self.normal = normal
    def add_normal(self, value): self.normal.append(value)
    def insert_normal_at(self, index, value): self.normal.insert(index, value)
    def replace_normal_at(self, index, value): self.normal[index] = value
    def get_numArc(self): return self.numArc
    def set_numArc(self, numArc): self.numArc = numArc
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            self.bulge or
            self.normal or
            super(ArcStringByBulgeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArcStringByBulgeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArcStringByBulgeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArcStringByBulgeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArcStringByBulgeType'):
        super(ArcStringByBulgeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ArcStringByBulgeType')
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            outfile.write(' numArc="%s"' % self.gds_format_integer(self.numArc, input_name='numArc'))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArcStringByBulgeType', fromsubclass_=False, pretty_print=True):
        super(ArcStringByBulgeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        for bulge_ in self.bulge:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sbulge>%s</%sbulge>%s' % (namespace_, self.gds_format_double(bulge_, input_name='bulge'), namespace_, eol_))
        for normal_ in self.normal:
            normal_.export(outfile, level, namespace_, name_='normal', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArcStringByBulgeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            showIndent(outfile, level)
            outfile.write('numArc=%d,\n' % (self.numArc,))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(ArcStringByBulgeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ArcStringByBulgeType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('bulge=[\n')
        level += 1
        for bulge_ in self.bulge:
            showIndent(outfile, level)
            outfile.write('%e,\n' % bulge_)
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('normal=[\n')
        level += 1
        for normal_ in self.normal:
            showIndent(outfile, level)
            outfile.write('model_.VectorType(\n')
            normal_.exportLiteral(outfile, level, name_='VectorType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('numArc', node)
        if value is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            try:
                self.numArc = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(ArcStringByBulgeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'bulge':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'bulge')
            self.bulge.append(fval_)
        elif nodeName_ == 'normal':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.normal.append(obj_)
            obj_.original_tagname_ = 'normal'
        super(ArcStringByBulgeType, self).buildChildren(child_, node, nodeName_, True)
# end class ArcStringByBulgeType


class ArcByBulgeType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, numArc=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, bulge=None, normal=None):
        self.original_tagname_ = None
        self.numArc = _cast(int, numArc)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.bulge = bulge
        self.normal = normal
    def factory(*args_, **kwargs_):
        if ArcByBulgeType.subclass:
            return ArcByBulgeType.subclass(*args_, **kwargs_)
        else:
            return ArcByBulgeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_bulge(self): return self.bulge
    def set_bulge(self, bulge): self.bulge = bulge
    def get_normal(self): return self.normal
    def set_normal(self, normal): self.normal = normal
    def get_numArc(self): return self.numArc
    def set_numArc(self, numArc): self.numArc = numArc
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            self.bulge is not None or
            self.normal is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArcByBulgeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArcByBulgeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArcByBulgeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArcByBulgeType'):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            outfile.write(' numArc="%s"' % self.gds_format_integer(self.numArc, input_name='numArc'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArcByBulgeType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        if self.bulge is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sbulge>%s</%sbulge>%s' % (namespace_, self.gds_format_double(self.bulge, input_name='bulge'), namespace_, eol_))
        if self.normal is not None:
            self.normal.export(outfile, level, namespace_, name_='normal', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArcByBulgeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            showIndent(outfile, level)
            outfile.write('numArc=%d,\n' % (self.numArc,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.bulge is not None:
            showIndent(outfile, level)
            outfile.write('bulge=%e,\n' % self.bulge)
        if self.normal is not None:
            showIndent(outfile, level)
            outfile.write('normal=model_.VectorType(\n')
            self.normal.exportLiteral(outfile, level, name_='normal')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('numArc', node)
        if value is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            try:
                self.numArc = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'bulge':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'bulge')
            self.bulge = fval_
        elif nodeName_ == 'normal':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.normal = obj_
            obj_.original_tagname_ = 'normal'
# end class ArcByBulgeType


class ArcByCenterPointType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, numArc=None, interpolation=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, radius=None, startAngle=None, endAngle=None):
        self.original_tagname_ = None
        super(ArcByCenterPointType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.numArc = _cast(int, numArc)
        self.interpolation = _cast(None, interpolation)
        self.pos = pos
        self.pointProperty = pointProperty
        self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.radius = radius
        self.startAngle = startAngle
        self.endAngle = endAngle
    def factory(*args_, **kwargs_):
        if ArcByCenterPointType.subclass:
            return ArcByCenterPointType.subclass(*args_, **kwargs_)
        else:
            return ArcByCenterPointType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_radius(self): return self.radius
    def set_radius(self, radius): self.radius = radius
    def get_startAngle(self): return self.startAngle
    def set_startAngle(self, startAngle): self.startAngle = startAngle
    def get_endAngle(self): return self.endAngle
    def set_endAngle(self, endAngle): self.endAngle = endAngle
    def get_numArc(self): return self.numArc
    def set_numArc(self, numArc): self.numArc = numArc
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos is not None or
            self.pointProperty is not None or
            self.pointRep is not None or
            self.posList is not None or
            self.coordinates is not None or
            self.radius is not None or
            self.startAngle is not None or
            self.endAngle is not None or
            super(ArcByCenterPointType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArcByCenterPointType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArcByCenterPointType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArcByCenterPointType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArcByCenterPointType'):
        super(ArcByCenterPointType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ArcByCenterPointType')
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            outfile.write(' numArc="%s"' % self.gds_format_integer(self.numArc, input_name='numArc'))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArcByCenterPointType', fromsubclass_=False, pretty_print=True):
        super(ArcByCenterPointType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.pointProperty is not None:
            self.pointProperty.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        if self.pointRep is not None:
            self.pointRep.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        if self.radius is not None:
            self.radius.export(outfile, level, namespace_, name_='radius', pretty_print=pretty_print)
        if self.startAngle is not None:
            self.startAngle.export(outfile, level, namespace_, name_='startAngle', pretty_print=pretty_print)
        if self.endAngle is not None:
            self.endAngle.export(outfile, level, namespace_, name_='endAngle', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArcByCenterPointType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.numArc is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            showIndent(outfile, level)
            outfile.write('numArc=%d,\n' % (self.numArc,))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(ArcByCenterPointType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ArcByCenterPointType, self).exportLiteralChildren(outfile, level, name_)
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.pos(\n')
            self.pos.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointProperty is not None:
            showIndent(outfile, level)
            outfile.write('pointProperty=model_.pointProperty(\n')
            self.pointProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointRep is not None:
            showIndent(outfile, level)
            outfile.write('pointRep=model_.pointRep(\n')
            self.pointRep.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.radius is not None:
            showIndent(outfile, level)
            outfile.write('radius=model_.LengthType(\n')
            self.radius.exportLiteral(outfile, level, name_='radius')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.startAngle is not None:
            showIndent(outfile, level)
            outfile.write('startAngle=model_.AngleType(\n')
            self.startAngle.exportLiteral(outfile, level, name_='startAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.endAngle is not None:
            showIndent(outfile, level)
            outfile.write('endAngle=model_.AngleType(\n')
            self.endAngle.exportLiteral(outfile, level, name_='endAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('numArc', node)
        if value is not None and 'numArc' not in already_processed:
            already_processed.add('numArc')
            try:
                self.numArc = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(ArcByCenterPointType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty = obj_
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep = obj_
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'radius':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.radius = obj_
            obj_.original_tagname_ = 'radius'
        elif nodeName_ == 'startAngle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.startAngle = obj_
            obj_.original_tagname_ = 'startAngle'
        elif nodeName_ == 'endAngle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.endAngle = obj_
            obj_.original_tagname_ = 'endAngle'
        super(ArcByCenterPointType, self).buildChildren(child_, node, nodeName_, True)
# end class ArcByCenterPointType


class CircleByCenterPointType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, radius=None):
        self.original_tagname_ = None
        self.pos = pos
        self.pointProperty = pointProperty
        self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.radius = radius
    def factory(*args_, **kwargs_):
        if CircleByCenterPointType.subclass:
            return CircleByCenterPointType.subclass(*args_, **kwargs_)
        else:
            return CircleByCenterPointType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_radius(self): return self.radius
    def set_radius(self, radius): self.radius = radius
    def hasContent_(self):
        if (
            self.pos is not None or
            self.pointProperty is not None or
            self.pointRep is not None or
            self.posList is not None or
            self.coordinates is not None or
            self.radius is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CircleByCenterPointType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CircleByCenterPointType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CircleByCenterPointType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CircleByCenterPointType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CircleByCenterPointType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.pointProperty is not None:
            self.pointProperty.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        if self.pointRep is not None:
            self.pointRep.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        if self.radius is not None:
            self.radius.export(outfile, level, namespace_, name_='radius', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CircleByCenterPointType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.pos(\n')
            self.pos.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointProperty is not None:
            showIndent(outfile, level)
            outfile.write('pointProperty=model_.pointProperty(\n')
            self.pointProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointRep is not None:
            showIndent(outfile, level)
            outfile.write('pointRep=model_.pointRep(\n')
            self.pointRep.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.radius is not None:
            showIndent(outfile, level)
            outfile.write('radius=model_.LengthType(\n')
            self.radius.exportLiteral(outfile, level, name_='radius')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty = obj_
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep = obj_
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'radius':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.radius = obj_
            obj_.original_tagname_ = 'radius'
# end class CircleByCenterPointType


class CubicSplineType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, degree=None, interpolation=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, vectorAtStart=None, vectorAtEnd=None):
        self.original_tagname_ = None
        super(CubicSplineType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.degree = _cast(int, degree)
        self.interpolation = _cast(None, interpolation)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.vectorAtStart = vectorAtStart
        self.vectorAtEnd = vectorAtEnd
    def factory(*args_, **kwargs_):
        if CubicSplineType.subclass:
            return CubicSplineType.subclass(*args_, **kwargs_)
        else:
            return CubicSplineType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_vectorAtStart(self): return self.vectorAtStart
    def set_vectorAtStart(self, vectorAtStart): self.vectorAtStart = vectorAtStart
    def get_vectorAtEnd(self): return self.vectorAtEnd
    def set_vectorAtEnd(self, vectorAtEnd): self.vectorAtEnd = vectorAtEnd
    def get_degree(self): return self.degree
    def set_degree(self, degree): self.degree = degree
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            self.vectorAtStart is not None or
            self.vectorAtEnd is not None or
            super(CubicSplineType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CubicSplineType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CubicSplineType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CubicSplineType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CubicSplineType'):
        super(CubicSplineType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CubicSplineType')
        if self.degree is not None and 'degree' not in already_processed:
            already_processed.add('degree')
            outfile.write(' degree="%s"' % self.gds_format_integer(self.degree, input_name='degree'))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CubicSplineType', fromsubclass_=False, pretty_print=True):
        super(CubicSplineType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        if self.vectorAtStart is not None:
            self.vectorAtStart.export(outfile, level, namespace_, name_='vectorAtStart', pretty_print=pretty_print)
        if self.vectorAtEnd is not None:
            self.vectorAtEnd.export(outfile, level, namespace_, name_='vectorAtEnd', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CubicSplineType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.degree is not None and 'degree' not in already_processed:
            already_processed.add('degree')
            showIndent(outfile, level)
            outfile.write('degree=%d,\n' % (self.degree,))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(CubicSplineType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CubicSplineType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.vectorAtStart is not None:
            showIndent(outfile, level)
            outfile.write('vectorAtStart=model_.VectorType(\n')
            self.vectorAtStart.exportLiteral(outfile, level, name_='vectorAtStart')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.vectorAtEnd is not None:
            showIndent(outfile, level)
            outfile.write('vectorAtEnd=model_.VectorType(\n')
            self.vectorAtEnd.exportLiteral(outfile, level, name_='vectorAtEnd')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('degree', node)
        if value is not None and 'degree' not in already_processed:
            already_processed.add('degree')
            try:
                self.degree = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(CubicSplineType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'vectorAtStart':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.vectorAtStart = obj_
            obj_.original_tagname_ = 'vectorAtStart'
        elif nodeName_ == 'vectorAtEnd':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.vectorAtEnd = obj_
            obj_.original_tagname_ = 'vectorAtEnd'
        super(CubicSplineType, self).buildChildren(child_, node, nodeName_, True)
# end class CubicSplineType


class BSplineType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, knotType=None, isPolynomial=None, interpolation='polynomialSpline', pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, degree=None, knot=None):
        self.original_tagname_ = None
        super(BSplineType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.knotType = _cast(None, knotType)
        self.isPolynomial = _cast(bool, isPolynomial)
        self.interpolation = _cast(None, interpolation)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.degree = degree
        if knot is None:
            self.knot = []
        else:
            self.knot = knot
    def factory(*args_, **kwargs_):
        if BSplineType.subclass:
            return BSplineType.subclass(*args_, **kwargs_)
        else:
            return BSplineType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_degree(self): return self.degree
    def set_degree(self, degree): self.degree = degree
    def get_knot(self): return self.knot
    def set_knot(self, knot): self.knot = knot
    def add_knot(self, value): self.knot.append(value)
    def insert_knot_at(self, index, value): self.knot.insert(index, value)
    def replace_knot_at(self, index, value): self.knot[index] = value
    def get_knotType(self): return self.knotType
    def set_knotType(self, knotType): self.knotType = knotType
    def get_isPolynomial(self): return self.isPolynomial
    def set_isPolynomial(self, isPolynomial): self.isPolynomial = isPolynomial
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            self.degree is not None or
            self.knot or
            super(BSplineType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BSplineType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BSplineType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BSplineType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BSplineType'):
        super(BSplineType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='BSplineType')
        if self.knotType is not None and 'knotType' not in already_processed:
            already_processed.add('knotType')
            outfile.write(' knotType=%s' % (quote_attrib(self.knotType), ))
        if self.isPolynomial is not None and 'isPolynomial' not in already_processed:
            already_processed.add('isPolynomial')
            outfile.write(' isPolynomial="%s"' % self.gds_format_boolean(self.isPolynomial, input_name='isPolynomial'))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BSplineType', fromsubclass_=False, pretty_print=True):
        super(BSplineType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        if self.degree is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdegree>%s</%sdegree>%s' % (namespace_, self.gds_format_integer(self.degree, input_name='degree'), namespace_, eol_))
        for knot_ in self.knot:
            knot_.export(outfile, level, namespace_, name_='knot', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='BSplineType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.knotType is not None and 'knotType' not in already_processed:
            already_processed.add('knotType')
            showIndent(outfile, level)
            outfile.write('knotType=%s,\n' % (self.knotType,))
        if self.isPolynomial is not None and 'isPolynomial' not in already_processed:
            already_processed.add('isPolynomial')
            showIndent(outfile, level)
            outfile.write('isPolynomial=%s,\n' % (self.isPolynomial,))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(BSplineType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(BSplineType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.degree is not None:
            showIndent(outfile, level)
            outfile.write('degree=%d,\n' % self.degree)
        showIndent(outfile, level)
        outfile.write('knot=[\n')
        level += 1
        for knot_ in self.knot:
            showIndent(outfile, level)
            outfile.write('model_.KnotPropertyType(\n')
            knot_.exportLiteral(outfile, level, name_='KnotPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('knotType', node)
        if value is not None and 'knotType' not in already_processed:
            already_processed.add('knotType')
            self.knotType = value
        value = find_attr_value_('isPolynomial', node)
        if value is not None and 'isPolynomial' not in already_processed:
            already_processed.add('isPolynomial')
            if value in ('true', '1'):
                self.isPolynomial = True
            elif value in ('false', '0'):
                self.isPolynomial = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(BSplineType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'degree':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ < 0:
                raise_parse_error(child_, 'requires nonNegativeInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'degree')
            self.degree = ival_
        elif nodeName_ == 'knot':
            obj_ = KnotPropertyType.factory()
            obj_.build(child_)
            self.knot.append(obj_)
            obj_.original_tagname_ = 'knot'
        super(BSplineType, self).buildChildren(child_, node, nodeName_, True)
# end class BSplineType


class KnotType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, value=None, multiplicity=None, weight=None):
        self.original_tagname_ = None
        self.value = value
        self.multiplicity = multiplicity
        self.weight = weight
    def factory(*args_, **kwargs_):
        if KnotType.subclass:
            return KnotType.subclass(*args_, **kwargs_)
        else:
            return KnotType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_value(self): return self.value
    def set_value(self, value): self.value = value
    def get_multiplicity(self): return self.multiplicity
    def set_multiplicity(self, multiplicity): self.multiplicity = multiplicity
    def get_weight(self): return self.weight
    def set_weight(self, weight): self.weight = weight
    def hasContent_(self):
        if (
            self.value is not None or
            self.multiplicity is not None or
            self.weight is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='KnotType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='KnotType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='KnotType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='KnotType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='KnotType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.value is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%svalue>%s</%svalue>%s' % (namespace_, self.gds_format_double(self.value, input_name='value'), namespace_, eol_))
        if self.multiplicity is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smultiplicity>%s</%smultiplicity>%s' % (namespace_, self.gds_format_integer(self.multiplicity, input_name='multiplicity'), namespace_, eol_))
        if self.weight is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sweight>%s</%sweight>%s' % (namespace_, self.gds_format_double(self.weight, input_name='weight'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='KnotType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.value is not None:
            showIndent(outfile, level)
            outfile.write('value=%e,\n' % self.value)
        if self.multiplicity is not None:
            showIndent(outfile, level)
            outfile.write('multiplicity=%d,\n' % self.multiplicity)
        if self.weight is not None:
            showIndent(outfile, level)
            outfile.write('weight=%e,\n' % self.weight)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'value':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'value')
            self.value = fval_
        elif nodeName_ == 'multiplicity':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ < 0:
                raise_parse_error(child_, 'requires nonNegativeInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'multiplicity')
            self.multiplicity = ival_
        elif nodeName_ == 'weight':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'weight')
            self.weight = fval_
# end class KnotType


class KnotPropertyType(GeneratedsSuper):
    """gml:KnotPropertyType encapsulates a knot to use it in a geometric
    type."""
    subclass = None
    superclass = None
    def __init__(self, Knot=None):
        self.original_tagname_ = None
        self.Knot = Knot
    def factory(*args_, **kwargs_):
        if KnotPropertyType.subclass:
            return KnotPropertyType.subclass(*args_, **kwargs_)
        else:
            return KnotPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Knot(self): return self.Knot
    def set_Knot(self, Knot): self.Knot = Knot
    def hasContent_(self):
        if (
            self.Knot is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='KnotPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='KnotPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='KnotPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='KnotPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='KnotPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Knot is not None:
            self.Knot.export(outfile, level, namespace_, name_='Knot', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='KnotPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Knot is not None:
            showIndent(outfile, level)
            outfile.write('Knot=model_.KnotType(\n')
            self.Knot.exportLiteral(outfile, level, name_='Knot')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Knot':
            obj_ = KnotType.factory()
            obj_.build(child_)
            self.Knot = obj_
            obj_.original_tagname_ = 'Knot'
# end class KnotPropertyType


class BezierType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, knotType=None, isPolynomial=None, interpolation=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None, degree=None, knot=None):
        self.original_tagname_ = None
        self.knotType = _cast(None, knotType)
        self.isPolynomial = _cast(bool, isPolynomial)
        self.interpolation = _cast(None, interpolation)
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
        self.degree = degree
        if knot is None:
            self.knot = []
        else:
            self.knot = knot
    def factory(*args_, **kwargs_):
        if BezierType.subclass:
            return BezierType.subclass(*args_, **kwargs_)
        else:
            return BezierType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_degree(self): return self.degree
    def set_degree(self, degree): self.degree = degree
    def get_knot(self): return self.knot
    def set_knot(self, knot): self.knot = knot
    def add_knot(self, value): self.knot.append(value)
    def insert_knot_at(self, index, value): self.knot.insert(index, value)
    def replace_knot_at(self, index, value): self.knot[index] = value
    def get_knotType(self): return self.knotType
    def set_knotType(self, knotType): self.knotType = knotType
    def get_isPolynomial(self): return self.isPolynomial
    def set_isPolynomial(self, isPolynomial): self.isPolynomial = isPolynomial
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            self.degree is not None or
            self.knot
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BezierType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BezierType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BezierType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BezierType'):
        if self.knotType is not None and 'knotType' not in already_processed:
            already_processed.add('knotType')
            outfile.write(' knotType=%s' % (quote_attrib(self.knotType), ))
        if self.isPolynomial is not None and 'isPolynomial' not in already_processed:
            already_processed.add('isPolynomial')
            outfile.write(' isPolynomial="%s"' % self.gds_format_boolean(self.isPolynomial, input_name='isPolynomial'))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BezierType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
        if self.degree is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdegree>%s</%sdegree>%s' % (namespace_, self.gds_format_integer(self.degree, input_name='degree'), namespace_, eol_))
        for knot_ in self.knot:
            knot_.export(outfile, level, namespace_, name_='knot', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='BezierType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.knotType is not None and 'knotType' not in already_processed:
            already_processed.add('knotType')
            showIndent(outfile, level)
            outfile.write('knotType=%s,\n' % (self.knotType,))
        if self.isPolynomial is not None and 'isPolynomial' not in already_processed:
            already_processed.add('isPolynomial')
            showIndent(outfile, level)
            outfile.write('isPolynomial=%s,\n' % (self.isPolynomial,))
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.degree is not None:
            showIndent(outfile, level)
            outfile.write('degree=%d,\n' % self.degree)
        showIndent(outfile, level)
        outfile.write('knot=[\n')
        level += 1
        for knot_ in self.knot:
            showIndent(outfile, level)
            outfile.write('model_.KnotPropertyType(\n')
            knot_.exportLiteral(outfile, level, name_='KnotPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('knotType', node)
        if value is not None and 'knotType' not in already_processed:
            already_processed.add('knotType')
            self.knotType = value
        value = find_attr_value_('isPolynomial', node)
        if value is not None and 'isPolynomial' not in already_processed:
            already_processed.add('isPolynomial')
            if value in ('true', '1'):
                self.isPolynomial = True
            elif value in ('false', '0'):
                self.isPolynomial = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        elif nodeName_ == 'degree':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ < 0:
                raise_parse_error(child_, 'requires nonNegativeInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'degree')
            self.degree = ival_
        elif nodeName_ == 'knot':
            obj_ = KnotPropertyType.factory()
            obj_.build(child_)
            self.knot.append(obj_)
            obj_.original_tagname_ = 'knot'
# end class BezierType


class OffsetCurveType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, offsetBase=None, distance=None, refDirection=None):
        self.original_tagname_ = None
        super(OffsetCurveType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.offsetBase = offsetBase
        self.distance = distance
        self.refDirection = refDirection
    def factory(*args_, **kwargs_):
        if OffsetCurveType.subclass:
            return OffsetCurveType.subclass(*args_, **kwargs_)
        else:
            return OffsetCurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_offsetBase(self): return self.offsetBase
    def set_offsetBase(self, offsetBase): self.offsetBase = offsetBase
    def get_distance(self): return self.distance
    def set_distance(self, distance): self.distance = distance
    def get_refDirection(self): return self.refDirection
    def set_refDirection(self, refDirection): self.refDirection = refDirection
    def hasContent_(self):
        if (
            self.offsetBase is not None or
            self.distance is not None or
            self.refDirection is not None or
            super(OffsetCurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OffsetCurveType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OffsetCurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OffsetCurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OffsetCurveType'):
        super(OffsetCurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='OffsetCurveType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OffsetCurveType', fromsubclass_=False, pretty_print=True):
        super(OffsetCurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.offsetBase is not None:
            self.offsetBase.export(outfile, level, namespace_, name_='offsetBase', pretty_print=pretty_print)
        if self.distance is not None:
            self.distance.export(outfile, level, namespace_, name_='distance', pretty_print=pretty_print)
        if self.refDirection is not None:
            self.refDirection.export(outfile, level, namespace_, name_='refDirection', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OffsetCurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(OffsetCurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(OffsetCurveType, self).exportLiteralChildren(outfile, level, name_)
        if self.offsetBase is not None:
            showIndent(outfile, level)
            outfile.write('offsetBase=model_.CurvePropertyType(\n')
            self.offsetBase.exportLiteral(outfile, level, name_='offsetBase')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.distance is not None:
            showIndent(outfile, level)
            outfile.write('distance=model_.LengthType(\n')
            self.distance.exportLiteral(outfile, level, name_='distance')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.refDirection is not None:
            showIndent(outfile, level)
            outfile.write('refDirection=model_.VectorType(\n')
            self.refDirection.exportLiteral(outfile, level, name_='refDirection')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(OffsetCurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'offsetBase':
            obj_ = CurvePropertyType.factory()
            obj_.build(child_)
            self.offsetBase = obj_
            obj_.original_tagname_ = 'offsetBase'
        elif nodeName_ == 'distance':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.distance = obj_
            obj_.original_tagname_ = 'distance'
        elif nodeName_ == 'refDirection':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.refDirection = obj_
            obj_.original_tagname_ = 'refDirection'
        super(OffsetCurveType, self).buildChildren(child_, node, nodeName_, True)
# end class OffsetCurveType


class AffinePlacementType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, location=None, refDirection=None, inDimension=None, outDimension=None):
        self.original_tagname_ = None
        self.location = location
        if refDirection is None:
            self.refDirection = []
        else:
            self.refDirection = refDirection
        self.inDimension = inDimension
        self.outDimension = outDimension
    def factory(*args_, **kwargs_):
        if AffinePlacementType.subclass:
            return AffinePlacementType.subclass(*args_, **kwargs_)
        else:
            return AffinePlacementType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_location(self): return self.location
    def set_location(self, location): self.location = location
    def get_refDirection(self): return self.refDirection
    def set_refDirection(self, refDirection): self.refDirection = refDirection
    def add_refDirection(self, value): self.refDirection.append(value)
    def insert_refDirection_at(self, index, value): self.refDirection.insert(index, value)
    def replace_refDirection_at(self, index, value): self.refDirection[index] = value
    def get_inDimension(self): return self.inDimension
    def set_inDimension(self, inDimension): self.inDimension = inDimension
    def get_outDimension(self): return self.outDimension
    def set_outDimension(self, outDimension): self.outDimension = outDimension
    def hasContent_(self):
        if (
            self.location is not None or
            self.refDirection or
            self.inDimension is not None or
            self.outDimension is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AffinePlacementType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AffinePlacementType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AffinePlacementType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AffinePlacementType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AffinePlacementType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.location is not None:
            self.location.export(outfile, level, namespace_, name_='location', pretty_print=pretty_print)
        for refDirection_ in self.refDirection:
            refDirection_.export(outfile, level, namespace_, name_='refDirection', pretty_print=pretty_print)
        if self.inDimension is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sinDimension>%s</%sinDimension>%s' % (namespace_, self.gds_format_integer(self.inDimension, input_name='inDimension'), namespace_, eol_))
        if self.outDimension is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%soutDimension>%s</%soutDimension>%s' % (namespace_, self.gds_format_integer(self.outDimension, input_name='outDimension'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AffinePlacementType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.location is not None:
            showIndent(outfile, level)
            outfile.write('location=model_.DirectPositionType(\n')
            self.location.exportLiteral(outfile, level, name_='location')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('refDirection=[\n')
        level += 1
        for refDirection_ in self.refDirection:
            showIndent(outfile, level)
            outfile.write('model_.VectorType(\n')
            refDirection_.exportLiteral(outfile, level, name_='VectorType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.inDimension is not None:
            showIndent(outfile, level)
            outfile.write('inDimension=%d,\n' % self.inDimension)
        if self.outDimension is not None:
            showIndent(outfile, level)
            outfile.write('outDimension=%d,\n' % self.outDimension)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'location':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'priorityLocation':
            obj_ = PriorityLocationPropertyType.factory()
            obj_.build(child_)
            self.priorityLocation = obj_
            obj_.original_tagname_ = 'priorityLocation'
        elif nodeName_ == 'refDirection':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.refDirection.append(obj_)
            obj_.original_tagname_ = 'refDirection'
        elif nodeName_ == 'inDimension':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'inDimension')
            self.inDimension = ival_
        elif nodeName_ == 'outDimension':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'outDimension')
            self.outDimension = ival_
# end class AffinePlacementType


class ClothoidType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, interpolation=None, refLocation=None, scaleFactor=None, startParameter=None, endParameter=None):
        self.original_tagname_ = None
        super(ClothoidType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, )
        self.interpolation = _cast(None, interpolation)
        self.refLocation = refLocation
        self.scaleFactor = scaleFactor
        self.startParameter = startParameter
        self.endParameter = endParameter
    def factory(*args_, **kwargs_):
        if ClothoidType.subclass:
            return ClothoidType.subclass(*args_, **kwargs_)
        else:
            return ClothoidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_refLocation(self): return self.refLocation
    def set_refLocation(self, refLocation): self.refLocation = refLocation
    def get_scaleFactor(self): return self.scaleFactor
    def set_scaleFactor(self, scaleFactor): self.scaleFactor = scaleFactor
    def get_startParameter(self): return self.startParameter
    def set_startParameter(self, startParameter): self.startParameter = startParameter
    def get_endParameter(self): return self.endParameter
    def set_endParameter(self, endParameter): self.endParameter = endParameter
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.refLocation is not None or
            self.scaleFactor is not None or
            self.startParameter is not None or
            self.endParameter is not None or
            super(ClothoidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ClothoidType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ClothoidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ClothoidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ClothoidType'):
        super(ClothoidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ClothoidType')
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ClothoidType', fromsubclass_=False, pretty_print=True):
        super(ClothoidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.refLocation is not None:
            self.refLocation.export(outfile, level, namespace_, name_='refLocation', pretty_print=pretty_print)
        if self.scaleFactor is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sscaleFactor>%s</%sscaleFactor>%s' % (namespace_, self.gds_format_float(self.scaleFactor, input_name='scaleFactor'), namespace_, eol_))
        if self.startParameter is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sstartParameter>%s</%sstartParameter>%s' % (namespace_, self.gds_format_double(self.startParameter, input_name='startParameter'), namespace_, eol_))
        if self.endParameter is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sendParameter>%s</%sendParameter>%s' % (namespace_, self.gds_format_double(self.endParameter, input_name='endParameter'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='ClothoidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(ClothoidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ClothoidType, self).exportLiteralChildren(outfile, level, name_)
        if self.refLocation is not None:
            showIndent(outfile, level)
            outfile.write('refLocation=model_.refLocation(\n')
            self.refLocation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.scaleFactor is not None:
            showIndent(outfile, level)
            outfile.write('scaleFactor=%f,\n' % self.scaleFactor)
        if self.startParameter is not None:
            showIndent(outfile, level)
            outfile.write('startParameter=%e,\n' % self.startParameter)
        if self.endParameter is not None:
            showIndent(outfile, level)
            outfile.write('endParameter=%e,\n' % self.endParameter)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(ClothoidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'refLocation':
            obj_ = refLocation.factory()
            obj_.build(child_)
            self.refLocation = obj_
            obj_.original_tagname_ = 'refLocation'
        elif nodeName_ == 'scaleFactor':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'scaleFactor')
            self.scaleFactor = fval_
        elif nodeName_ == 'startParameter':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'startParameter')
            self.startParameter = fval_
        elif nodeName_ == 'endParameter':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'endParameter')
            self.endParameter = fval_
        super(ClothoidType, self).buildChildren(child_, node, nodeName_, True)
# end class ClothoidType


class refLocation(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AffinePlacement=None):
        self.original_tagname_ = None
        self.AffinePlacement = AffinePlacement
    def factory(*args_, **kwargs_):
        if refLocation.subclass:
            return refLocation.subclass(*args_, **kwargs_)
        else:
            return refLocation(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AffinePlacement(self): return self.AffinePlacement
    def set_AffinePlacement(self, AffinePlacement): self.AffinePlacement = AffinePlacement
    def hasContent_(self):
        if (
            self.AffinePlacement is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='refLocation', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='refLocation')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='refLocation', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='refLocation'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='refLocation', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AffinePlacement is not None:
            self.AffinePlacement.export(outfile, level, namespace_='gml:', name_='AffinePlacement', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='refLocation'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AffinePlacement is not None:
            showIndent(outfile, level)
            outfile.write('AffinePlacement=model_.AffinePlacementType(\n')
            self.AffinePlacement.exportLiteral(outfile, level, name_='AffinePlacement')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AffinePlacement':
            obj_ = AffinePlacementType.factory()
            obj_.build(child_)
            self.AffinePlacement = obj_
            obj_.original_tagname_ = 'AffinePlacement'
# end class refLocation


class GeodesicStringType(AbstractCurveSegmentType):
    subclass = None
    superclass = AbstractCurveSegmentType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, interpolation=None, posList=None, pos=None, pointProperty=None, extensiontype_=None):
        self.original_tagname_ = None
        super(GeodesicStringType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, extensiontype_, )
        self.interpolation = _cast(None, interpolation)
        self.posList = posList
        self.pos = pos
        self.pointProperty = pointProperty
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if GeodesicStringType.subclass:
            return GeodesicStringType.subclass(*args_, **kwargs_)
        else:
            return GeodesicStringType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.posList is not None or
            self.pos is not None or
            self.pointProperty is not None or
            super(GeodesicStringType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeodesicStringType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeodesicStringType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeodesicStringType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeodesicStringType'):
        super(GeodesicStringType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeodesicStringType')
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeodesicStringType', fromsubclass_=False, pretty_print=True):
        super(GeodesicStringType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.pointProperty is not None:
            self.pointProperty.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeodesicStringType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(GeodesicStringType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeodesicStringType, self).exportLiteralChildren(outfile, level, name_)
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.DirectPositionType(\n')
            self.pos.exportLiteral(outfile, level, name_='pos')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointProperty is not None:
            showIndent(outfile, level)
            outfile.write('pointProperty=model_.pointProperty(\n')
            self.pointProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(GeodesicStringType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty = obj_
            obj_.original_tagname_ = 'pointProperty'
        super(GeodesicStringType, self).buildChildren(child_, node, nodeName_, True)
# end class GeodesicStringType


class GeodesicType(GeodesicStringType):
    subclass = None
    superclass = GeodesicStringType
    def __init__(self, numDerivativesAtEnd=0, numDerivativeInterior=0, numDerivativesAtStart=0, interpolation=None, posList=None, pos=None, pointProperty=None):
        self.original_tagname_ = None
        super(GeodesicType, self).__init__(numDerivativesAtEnd, numDerivativeInterior, numDerivativesAtStart, interpolation, posList, pos, pointProperty, )
    def factory(*args_, **kwargs_):
        if GeodesicType.subclass:
            return GeodesicType.subclass(*args_, **kwargs_)
        else:
            return GeodesicType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(GeodesicType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeodesicType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeodesicType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeodesicType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeodesicType'):
        super(GeodesicType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeodesicType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeodesicType', fromsubclass_=False, pretty_print=True):
        super(GeodesicType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeodesicType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GeodesicType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeodesicType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GeodesicType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(GeodesicType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class GeodesicType


class AbstractSurfacePatchType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, extensiontype_=None):
        self.original_tagname_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractSurfacePatchType.subclass:
            return AbstractSurfacePatchType.subclass(*args_, **kwargs_)
        else:
            return AbstractSurfacePatchType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractSurfacePatchType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractSurfacePatchType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractSurfacePatchType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractSurfacePatchType'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractSurfacePatchType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractSurfacePatchType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractSurfacePatchType


class SurfacePatchArrayPropertyType(GeneratedsSuper):
    """gml:SurfacePatchArrayPropertyType is a container for a sequence of
    surface patches."""
    subclass = None
    superclass = None
    def __init__(self, AbstractSurfacePatch=None):
        self.original_tagname_ = None
        if AbstractSurfacePatch is None:
            self.AbstractSurfacePatch = []
        else:
            self.AbstractSurfacePatch = AbstractSurfacePatch
    def factory(*args_, **kwargs_):
        if SurfacePatchArrayPropertyType.subclass:
            return SurfacePatchArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return SurfacePatchArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSurfacePatch(self): return self.AbstractSurfacePatch
    def set_AbstractSurfacePatch(self, AbstractSurfacePatch): self.AbstractSurfacePatch = AbstractSurfacePatch
    def add_AbstractSurfacePatch(self, value): self.AbstractSurfacePatch.append(value)
    def insert_AbstractSurfacePatch_at(self, index, value): self.AbstractSurfacePatch.insert(index, value)
    def replace_AbstractSurfacePatch_at(self, index, value): self.AbstractSurfacePatch[index] = value
    def hasContent_(self):
        if (
            self.AbstractSurfacePatch
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SurfacePatchArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SurfacePatchArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SurfacePatchArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SurfacePatchArrayPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SurfacePatchArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractSurfacePatch_ in self.AbstractSurfacePatch:
            AbstractSurfacePatch_.export(outfile, level, namespace_, name_='AbstractSurfacePatch', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SurfacePatchArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractSurfacePatch=[\n')
        level += 1
        for AbstractSurfacePatch_ in self.AbstractSurfacePatch:
            showIndent(outfile, level)
            outfile.write('model_.AbstractSurfacePatchType(\n')
            AbstractSurfacePatch_.exportLiteral(outfile, level, name_='AbstractSurfacePatchType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSurfacePatch':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurfacePatch> element')
            self.AbstractSurfacePatch.append(obj_)
            obj_.original_tagname_ = 'AbstractSurfacePatch'
        elif nodeName_ == 'PolygonPatch':
            obj_ = PolygonPatchType.factory()
            obj_.build(child_)
            self.AbstractSurfacePatch.append(obj_)
            obj_.original_tagname_ = 'PolygonPatch'
        elif nodeName_ == 'Triangle':
            obj_ = TriangleType.factory()
            obj_.build(child_)
            self.AbstractSurfacePatch.append(obj_)
            obj_.original_tagname_ = 'Triangle'
        elif nodeName_ == 'Rectangle':
            obj_ = RectangleType.factory()
            obj_.build(child_)
            self.AbstractSurfacePatch.append(obj_)
            obj_.original_tagname_ = 'Rectangle'
        elif nodeName_ == 'AbstractParametricCurveSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractParametricCurveSurface> element')
            self.AbstractSurfacePatch.append(obj_)
            obj_.original_tagname_ = 'AbstractParametricCurveSurface'
        elif nodeName_ == 'AbstractGriddedSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGriddedSurface> element')
            self.AbstractParametricCurveSurface.append(obj_)
            obj_.original_tagname_ = 'AbstractGriddedSurface'
        elif nodeName_ == 'Cone':
            obj_ = ConeType.factory()
            obj_.build(child_)
            self.AbstractGriddedSurface.append(obj_)
            obj_.original_tagname_ = 'Cone'
        elif nodeName_ == 'Cylinder':
            obj_ = CylinderType.factory()
            obj_.build(child_)
            self.AbstractGriddedSurface.append(obj_)
            obj_.original_tagname_ = 'Cylinder'
        elif nodeName_ == 'Sphere':
            obj_ = SphereType.factory()
            obj_.build(child_)
            self.AbstractGriddedSurface.append(obj_)
            obj_.original_tagname_ = 'Sphere'
# end class SurfacePatchArrayPropertyType


class PolygonPatchType(AbstractSurfacePatchType):
    subclass = None
    superclass = AbstractSurfacePatchType
    def __init__(self, interpolation=None, exterior=None, interior=None):
        self.original_tagname_ = None
        super(PolygonPatchType, self).__init__()
        self.interpolation = _cast(None, interpolation)
        self.exterior = exterior
        if interior is None:
            self.interior = []
        else:
            self.interior = interior
    def factory(*args_, **kwargs_):
        if PolygonPatchType.subclass:
            return PolygonPatchType.subclass(*args_, **kwargs_)
        else:
            return PolygonPatchType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_exterior(self): return self.exterior
    def set_exterior(self, exterior): self.exterior = exterior
    def get_interior(self): return self.interior
    def set_interior(self, interior): self.interior = interior
    def add_interior(self, value): self.interior.append(value)
    def insert_interior_at(self, index, value): self.interior.insert(index, value)
    def replace_interior_at(self, index, value): self.interior[index] = value
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.exterior is not None or
            self.interior or
            super(PolygonPatchType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PolygonPatchType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PolygonPatchType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PolygonPatchType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PolygonPatchType'):
        super(PolygonPatchType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PolygonPatchType')
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PolygonPatchType', fromsubclass_=False, pretty_print=True):
        super(PolygonPatchType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.exterior is not None:
            self.exterior.export(outfile, level, namespace_='gml:', name_='exterior', pretty_print=pretty_print)
        for interior_ in self.interior:
            interior_.export(outfile, level, namespace_='gml:', name_='interior', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PolygonPatchType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(PolygonPatchType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PolygonPatchType, self).exportLiteralChildren(outfile, level, name_)
        if self.exterior is not None:
            showIndent(outfile, level)
            outfile.write('exterior=model_.exterior(\n')
            self.exterior.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('interior=[\n')
        level += 1
        for interior_ in self.interior:
            showIndent(outfile, level)
            outfile.write('model_.interior(\n')
            interior_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(PolygonPatchType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'exterior':
            obj_ = AbstractRingPropertyType.factory()
            obj_.build(child_)
            self.exterior = obj_
            obj_.original_tagname_ = 'exterior'
        elif nodeName_ == 'interior':
            obj_ = AbstractRingPropertyType.factory()
            obj_.build(child_)
            self.interior.append(obj_)
            obj_.original_tagname_ = 'interior'
        super(PolygonPatchType, self).buildChildren(child_, node, nodeName_, True)
# end class PolygonPatchType


class TriangleType(AbstractSurfacePatchType):
    subclass = None
    superclass = AbstractSurfacePatchType
    def __init__(self, interpolation=None, exterior=None):
        self.original_tagname_ = None
        super(TriangleType, self).__init__()
        self.interpolation = _cast(None, interpolation)
        self.exterior = exterior
    def factory(*args_, **kwargs_):
        if TriangleType.subclass:
            return TriangleType.subclass(*args_, **kwargs_)
        else:
            return TriangleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_exterior(self): return self.exterior
    def set_exterior(self, exterior): self.exterior = exterior
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.exterior is not None or
            super(TriangleType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TriangleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TriangleType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TriangleType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TriangleType'):
        super(TriangleType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TriangleType')
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TriangleType', fromsubclass_=False, pretty_print=True):
        super(TriangleType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.exterior is not None:
            self.exterior.export(outfile, level, namespace_='gml:', name_='exterior', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TriangleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(TriangleType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TriangleType, self).exportLiteralChildren(outfile, level, name_)
        if self.exterior is not None:
            showIndent(outfile, level)
            outfile.write('exterior=model_.exterior(\n')
            self.exterior.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(TriangleType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'exterior':
            obj_ = AbstractRingPropertyType.factory()
            obj_.build(child_)
            self.exterior = obj_
            obj_.original_tagname_ = 'exterior'
        super(TriangleType, self).buildChildren(child_, node, nodeName_, True)
# end class TriangleType


class RectangleType(AbstractSurfacePatchType):
    subclass = None
    superclass = AbstractSurfacePatchType
    def __init__(self, interpolation=None, exterior=None):
        self.original_tagname_ = None
        super(RectangleType, self).__init__()
        self.interpolation = _cast(None, interpolation)
        self.exterior = exterior
    def factory(*args_, **kwargs_):
        if RectangleType.subclass:
            return RectangleType.subclass(*args_, **kwargs_)
        else:
            return RectangleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_exterior(self): return self.exterior
    def set_exterior(self, exterior): self.exterior = exterior
    def get_interpolation(self): return self.interpolation
    def set_interpolation(self, interpolation): self.interpolation = interpolation
    def hasContent_(self):
        if (
            self.exterior is not None or
            super(RectangleType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RectangleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RectangleType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RectangleType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RectangleType'):
        super(RectangleType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RectangleType')
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            outfile.write(' interpolation=%s' % (quote_attrib(self.interpolation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RectangleType', fromsubclass_=False, pretty_print=True):
        super(RectangleType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.exterior is not None:
            self.exterior.export(outfile, level, namespace_='gml:', name_='exterior', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RectangleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.interpolation is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            showIndent(outfile, level)
            outfile.write('interpolation=%s,\n' % (self.interpolation,))
        super(RectangleType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(RectangleType, self).exportLiteralChildren(outfile, level, name_)
        if self.exterior is not None:
            showIndent(outfile, level)
            outfile.write('exterior=model_.exterior(\n')
            self.exterior.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('interpolation', node)
        if value is not None and 'interpolation' not in already_processed:
            already_processed.add('interpolation')
            self.interpolation = value
        super(RectangleType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'exterior':
            obj_ = AbstractRingPropertyType.factory()
            obj_.build(child_)
            self.exterior = obj_
            obj_.original_tagname_ = 'exterior'
        super(RectangleType, self).buildChildren(child_, node, nodeName_, True)
# end class RectangleType


class RingPropertyType(GeneratedsSuper):
    """A property with the content model of gml:RingPropertyType
    encapsulates a ring to represent a component of a surface
    boundary."""
    subclass = None
    superclass = None
    def __init__(self, Ring=None):
        self.original_tagname_ = None
        self.Ring = Ring
    def factory(*args_, **kwargs_):
        if RingPropertyType.subclass:
            return RingPropertyType.subclass(*args_, **kwargs_)
        else:
            return RingPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Ring(self): return self.Ring
    def set_Ring(self, Ring): self.Ring = Ring
    def hasContent_(self):
        if (
            self.Ring is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RingPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RingPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RingPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RingPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RingPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ring is not None:
            self.Ring.export(outfile, level, namespace_='gml:', name_='Ring', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RingPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Ring is not None:
            showIndent(outfile, level)
            outfile.write('Ring=model_.RingType(\n')
            self.Ring.exportLiteral(outfile, level, name_='Ring')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Ring':
            obj_ = RingType.factory()
            obj_.build(child_)
            self.Ring = obj_
            obj_.original_tagname_ = 'Ring'
# end class RingPropertyType


class AbstractParametricCurveSurfaceType(AbstractSurfacePatchType):
    subclass = None
    superclass = AbstractSurfacePatchType
    def __init__(self, aggregationType=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractParametricCurveSurfaceType, self).__init__(extensiontype_, )
        self.aggregationType = _cast(None, aggregationType)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractParametricCurveSurfaceType.subclass:
            return AbstractParametricCurveSurfaceType.subclass(*args_, **kwargs_)
        else:
            return AbstractParametricCurveSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractParametricCurveSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractParametricCurveSurfaceType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractParametricCurveSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractParametricCurveSurfaceType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractParametricCurveSurfaceType'):
        super(AbstractParametricCurveSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractParametricCurveSurfaceType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractParametricCurveSurfaceType', fromsubclass_=False, pretty_print=True):
        super(AbstractParametricCurveSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='AbstractParametricCurveSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(AbstractParametricCurveSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractParametricCurveSurfaceType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractParametricCurveSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractParametricCurveSurfaceType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractParametricCurveSurfaceType


class AbstractGriddedSurfaceType(AbstractParametricCurveSurfaceType):
    subclass = None
    superclass = AbstractParametricCurveSurfaceType
    def __init__(self, aggregationType=None, rows_attr=None, columns=None, rows=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractGriddedSurfaceType, self).__init__(aggregationType, extensiontype_, )
        self.rows_attr = _cast(None, rows_attr)
        self.columns = _cast(int, columns)
        self.rows = rows
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGriddedSurfaceType.subclass:
            return AbstractGriddedSurfaceType.subclass(*args_, **kwargs_)
        else:
            return AbstractGriddedSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_rows(self): return self.rows
    def set_rows(self, rows): self.rows = rows
    def get_rows_attr(self): return self.rows_attr
    def set_rows_attr(self, rows_attr): self.rows_attr = rows_attr
    def get_columns(self): return self.columns
    def set_columns(self, columns): self.columns = columns
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.rows is not None or
            super(AbstractGriddedSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGriddedSurfaceType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGriddedSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGriddedSurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGriddedSurfaceType'):
        super(AbstractGriddedSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGriddedSurfaceType')
        if self.rows_attr is not None and 'rows_attr' not in already_processed:
            already_processed.add('rows_attr')
            outfile.write(' rows=%s' % (quote_attrib(self.rows_attr), ))
        if self.columns is not None and 'columns' not in already_processed:
            already_processed.add('columns')
            outfile.write(' columns="%s"' % self.gds_format_integer(self.columns, input_name='columns'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGriddedSurfaceType', fromsubclass_=False, pretty_print=True):
        super(AbstractGriddedSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.rows is not None:
            self.rows.export(outfile, level, namespace_, name_='rows', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGriddedSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.rows_attr is not None and 'rows_attr' not in already_processed:
            already_processed.add('rows_attr')
            showIndent(outfile, level)
            outfile.write('rows_attr=%s,\n' % (self.rows_attr,))
        if self.columns is not None and 'columns' not in already_processed:
            already_processed.add('columns')
            showIndent(outfile, level)
            outfile.write('columns=%d,\n' % (self.columns,))
        super(AbstractGriddedSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractGriddedSurfaceType, self).exportLiteralChildren(outfile, level, name_)
        if self.rows is not None:
            showIndent(outfile, level)
            outfile.write('rows=model_.rows(\n')
            self.rows.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('rows', node)
        if value is not None and 'rows_attr' not in already_processed:
            already_processed.add('rows_attr')
            self.rows_attr = value
        value = find_attr_value_('columns', node)
        if value is not None and 'columns' not in already_processed:
            already_processed.add('columns')
            try:
                self.columns = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractGriddedSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'rows':
            obj_ = rows.factory()
            obj_.build(child_)
            self.rows = obj_
            obj_.original_tagname_ = 'rows'
        super(AbstractGriddedSurfaceType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractGriddedSurfaceType


class rows(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, Row=None):
        self.original_tagname_ = None
        if Row is None:
            self.Row = []
        else:
            self.Row = Row
    def factory(*args_, **kwargs_):
        if rows.subclass:
            return rows.subclass(*args_, **kwargs_)
        else:
            return rows(*args_, **kwargs_)
    factory = staticmethod(factory)
    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 hasContent_(self):
        if (
            self.Row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='rows', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='rows')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='rows', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='rows'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='rows', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Row_ in self.Row:
            Row_.export(outfile, level, namespace_, name_='Row', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='rows'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('Row=[\n')
        level += 1
        for Row_ in self.Row:
            showIndent(outfile, level)
            outfile.write('model_.Row(\n')
            Row_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Row':
            obj_ = Row.factory()
            obj_.build(child_)
            self.Row.append(obj_)
            obj_.original_tagname_ = 'Row'
# end class rows


class Row(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, posList=None, pos=None, pointProperty=None):
        self.original_tagname_ = None
        self.posList = posList
        self.pos = pos
        self.pointProperty = pointProperty
    def factory(*args_, **kwargs_):
        if Row.subclass:
            return Row.subclass(*args_, **kwargs_)
        else:
            return Row(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def hasContent_(self):
        if (
            self.posList is not None or
            self.pos is not None or
            self.pointProperty is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Row', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Row')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Row', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Row'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Row', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.pointProperty is not None:
            self.pointProperty.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Row'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.DirectPositionListType(\n')
            self.posList.exportLiteral(outfile, level, name_='posList')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.DirectPositionType(\n')
            self.pos.exportLiteral(outfile, level, name_='pos')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointProperty is not None:
            showIndent(outfile, level)
            outfile.write('pointProperty=model_.pointProperty(\n')
            self.pointProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty = obj_
            obj_.original_tagname_ = 'pointProperty'
# end class Row


class ConeType(AbstractGriddedSurfaceType):
    subclass = None
    superclass = AbstractGriddedSurfaceType
    def __init__(self, aggregationType=None, rows_attr=None, columns=None, rows=None, horizontalCurveType=None, verticalCurveType=None):
        self.original_tagname_ = None
        super(ConeType, self).__init__(aggregationType, rows_attr, columns, rows, )
        self.horizontalCurveType = _cast(None, horizontalCurveType)
        self.verticalCurveType = _cast(None, verticalCurveType)
    def factory(*args_, **kwargs_):
        if ConeType.subclass:
            return ConeType.subclass(*args_, **kwargs_)
        else:
            return ConeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_horizontalCurveType(self): return self.horizontalCurveType
    def set_horizontalCurveType(self, horizontalCurveType): self.horizontalCurveType = horizontalCurveType
    def get_verticalCurveType(self): return self.verticalCurveType
    def set_verticalCurveType(self, verticalCurveType): self.verticalCurveType = verticalCurveType
    def hasContent_(self):
        if (
            super(ConeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConeType'):
        super(ConeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ConeType')
        if self.horizontalCurveType is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            outfile.write(' horizontalCurveType=%s' % (quote_attrib(self.horizontalCurveType), ))
        if self.verticalCurveType is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            outfile.write(' verticalCurveType=%s' % (quote_attrib(self.verticalCurveType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConeType', fromsubclass_=False, pretty_print=True):
        super(ConeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.horizontalCurveType is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            showIndent(outfile, level)
            outfile.write('horizontalCurveType=%s,\n' % (self.horizontalCurveType,))
        if self.verticalCurveType is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            showIndent(outfile, level)
            outfile.write('verticalCurveType=%s,\n' % (self.verticalCurveType,))
        super(ConeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ConeType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('horizontalCurveType', node)
        if value is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            self.horizontalCurveType = value
        value = find_attr_value_('verticalCurveType', node)
        if value is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            self.verticalCurveType = value
        super(ConeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(ConeType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class ConeType


class CylinderType(AbstractGriddedSurfaceType):
    subclass = None
    superclass = AbstractGriddedSurfaceType
    def __init__(self, aggregationType=None, rows_attr=None, columns=None, rows=None, horizontalCurveType=None, verticalCurveType=None):
        self.original_tagname_ = None
        super(CylinderType, self).__init__(aggregationType, rows_attr, columns, rows, )
        self.horizontalCurveType = _cast(None, horizontalCurveType)
        self.verticalCurveType = _cast(None, verticalCurveType)
    def factory(*args_, **kwargs_):
        if CylinderType.subclass:
            return CylinderType.subclass(*args_, **kwargs_)
        else:
            return CylinderType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_horizontalCurveType(self): return self.horizontalCurveType
    def set_horizontalCurveType(self, horizontalCurveType): self.horizontalCurveType = horizontalCurveType
    def get_verticalCurveType(self): return self.verticalCurveType
    def set_verticalCurveType(self, verticalCurveType): self.verticalCurveType = verticalCurveType
    def hasContent_(self):
        if (
            super(CylinderType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CylinderType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CylinderType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CylinderType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CylinderType'):
        super(CylinderType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CylinderType')
        if self.horizontalCurveType is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            outfile.write(' horizontalCurveType=%s' % (quote_attrib(self.horizontalCurveType), ))
        if self.verticalCurveType is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            outfile.write(' verticalCurveType=%s' % (quote_attrib(self.verticalCurveType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CylinderType', fromsubclass_=False, pretty_print=True):
        super(CylinderType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CylinderType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.horizontalCurveType is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            showIndent(outfile, level)
            outfile.write('horizontalCurveType=%s,\n' % (self.horizontalCurveType,))
        if self.verticalCurveType is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            showIndent(outfile, level)
            outfile.write('verticalCurveType=%s,\n' % (self.verticalCurveType,))
        super(CylinderType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CylinderType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('horizontalCurveType', node)
        if value is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            self.horizontalCurveType = value
        value = find_attr_value_('verticalCurveType', node)
        if value is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            self.verticalCurveType = value
        super(CylinderType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(CylinderType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class CylinderType


class SphereType(AbstractGriddedSurfaceType):
    subclass = None
    superclass = AbstractGriddedSurfaceType
    def __init__(self, aggregationType=None, rows_attr=None, columns=None, rows=None, horizontalCurveType=None, verticalCurveType=None):
        self.original_tagname_ = None
        super(SphereType, self).__init__(aggregationType, rows_attr, columns, rows, )
        self.horizontalCurveType = _cast(None, horizontalCurveType)
        self.verticalCurveType = _cast(None, verticalCurveType)
    def factory(*args_, **kwargs_):
        if SphereType.subclass:
            return SphereType.subclass(*args_, **kwargs_)
        else:
            return SphereType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_horizontalCurveType(self): return self.horizontalCurveType
    def set_horizontalCurveType(self, horizontalCurveType): self.horizontalCurveType = horizontalCurveType
    def get_verticalCurveType(self): return self.verticalCurveType
    def set_verticalCurveType(self, verticalCurveType): self.verticalCurveType = verticalCurveType
    def hasContent_(self):
        if (
            super(SphereType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SphereType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SphereType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SphereType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SphereType'):
        super(SphereType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SphereType')
        if self.horizontalCurveType is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            outfile.write(' horizontalCurveType=%s' % (quote_attrib(self.horizontalCurveType), ))
        if self.verticalCurveType is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            outfile.write(' verticalCurveType=%s' % (quote_attrib(self.verticalCurveType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SphereType', fromsubclass_=False, pretty_print=True):
        super(SphereType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SphereType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.horizontalCurveType is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            showIndent(outfile, level)
            outfile.write('horizontalCurveType=%s,\n' % (self.horizontalCurveType,))
        if self.verticalCurveType is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            showIndent(outfile, level)
            outfile.write('verticalCurveType=%s,\n' % (self.verticalCurveType,))
        super(SphereType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(SphereType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('horizontalCurveType', node)
        if value is not None and 'horizontalCurveType' not in already_processed:
            already_processed.add('horizontalCurveType')
            self.horizontalCurveType = value
        value = find_attr_value_('verticalCurveType', node)
        if value is not None and 'verticalCurveType' not in already_processed:
            already_processed.add('verticalCurveType')
            self.verticalCurveType = value
        super(SphereType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(SphereType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class SphereType


class controlPoint(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, posList=None, pos=None, pointProperty=None):
        self.original_tagname_ = None
        self.posList = posList
        self.pos = pos
        self.pointProperty = pointProperty
    def factory(*args_, **kwargs_):
        if controlPoint.subclass:
            return controlPoint.subclass(*args_, **kwargs_)
        else:
            return controlPoint(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def hasContent_(self):
        if (
            self.posList is not None or
            self.pos is not None or
            self.pointProperty is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='controlPoint', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='controlPoint')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='controlPoint', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='controlPoint'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='controlPoint', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.pointProperty is not None:
            self.pointProperty.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='controlPoint'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.DirectPositionType(\n')
            self.pos.exportLiteral(outfile, level, name_='pos')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointProperty is not None:
            showIndent(outfile, level)
            outfile.write('pointProperty=model_.pointProperty(\n')
            self.pointProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty = obj_
            obj_.original_tagname_ = 'pointProperty'
# end class controlPoint


class LineStringSegmentArrayPropertyType(GeneratedsSuper):
    """gml:LineStringSegmentArrayPropertyType provides a container for line
    strings."""
    subclass = None
    superclass = None
    def __init__(self, LineStringSegment=None):
        self.original_tagname_ = None
        if LineStringSegment is None:
            self.LineStringSegment = []
        else:
            self.LineStringSegment = LineStringSegment
    def factory(*args_, **kwargs_):
        if LineStringSegmentArrayPropertyType.subclass:
            return LineStringSegmentArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return LineStringSegmentArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LineStringSegment(self): return self.LineStringSegment
    def set_LineStringSegment(self, LineStringSegment): self.LineStringSegment = LineStringSegment
    def add_LineStringSegment(self, value): self.LineStringSegment.append(value)
    def insert_LineStringSegment_at(self, index, value): self.LineStringSegment.insert(index, value)
    def replace_LineStringSegment_at(self, index, value): self.LineStringSegment[index] = value
    def hasContent_(self):
        if (
            self.LineStringSegment
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LineStringSegmentArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LineStringSegmentArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LineStringSegmentArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LineStringSegmentArrayPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LineStringSegmentArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for LineStringSegment_ in self.LineStringSegment:
            LineStringSegment_.export(outfile, level, namespace_='gml:', name_='LineStringSegment', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LineStringSegmentArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('LineStringSegment=[\n')
        level += 1
        for LineStringSegment_ in self.LineStringSegment:
            showIndent(outfile, level)
            outfile.write('model_.LineStringSegmentType(\n')
            LineStringSegment_.exportLiteral(outfile, level, name_='LineStringSegmentType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LineStringSegment':
            obj_ = LineStringSegmentType.factory()
            obj_.build(child_)
            self.LineStringSegment.append(obj_)
            obj_.original_tagname_ = 'LineStringSegment'
# end class LineStringSegmentArrayPropertyType


class SolidPropertyType(GeneratedsSuper):
    """A property that has a solid as its value domain may either be an
    appropriate geometry element encapsulated in an element of this
    type or an XLink reference to a remote geometry element (where
    remote includes geometry elements located elsewhere in the same
    document). Either the reference or the contained element shall
    be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractSolid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractSolid = AbstractSolid
    def factory(*args_, **kwargs_):
        if SolidPropertyType.subclass:
            return SolidPropertyType.subclass(*args_, **kwargs_)
        else:
            return SolidPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSolid(self): return self.AbstractSolid
    def set_AbstractSolid(self, AbstractSolid): self.AbstractSolid = AbstractSolid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractSolid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SolidPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SolidPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SolidPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SolidPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SolidPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractSolid is not None:
            self.AbstractSolid.export(outfile, level, namespace_='gml:', name_='AbstractSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SolidPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractSolid is not None:
            showIndent(outfile, level)
            outfile.write('AbstractSolid=model_.AbstractSolidType(\n')
            self.AbstractSolid.exportLiteral(outfile, level, name_='AbstractSolid')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
# end class SolidPropertyType


class SolidArrayPropertyType(GeneratedsSuper):
    """gml:SolidArrayPropertyType is a container for an array of solids.
    The elements are always contained in the array property,
    referencing geometry elements or arrays of geometry elements is
    not supported."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractSolid=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractSolid is None:
            self.AbstractSolid = []
        else:
            self.AbstractSolid = AbstractSolid
    def factory(*args_, **kwargs_):
        if SolidArrayPropertyType.subclass:
            return SolidArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return SolidArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSolid(self): return self.AbstractSolid
    def set_AbstractSolid(self, AbstractSolid): self.AbstractSolid = AbstractSolid
    def add_AbstractSolid(self, value): self.AbstractSolid.append(value)
    def insert_AbstractSolid_at(self, index, value): self.AbstractSolid.insert(index, value)
    def replace_AbstractSolid_at(self, index, value): self.AbstractSolid[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractSolid
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SolidArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SolidArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SolidArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SolidArrayPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SolidArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractSolid_ in self.AbstractSolid:
            AbstractSolid_.export(outfile, level, namespace_='gml:', name_='AbstractSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SolidArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractSolid=[\n')
        level += 1
        for AbstractSolid_ in self.AbstractSolid:
            showIndent(outfile, level)
            outfile.write('model_.AbstractSolidType(\n')
            AbstractSolid_.exportLiteral(outfile, level, name_='AbstractSolidType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'Solid'
# end class SolidArrayPropertyType


class ShellType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, aggregationType=None, surfaceMember=None):
        self.original_tagname_ = None
        self.aggregationType = _cast(None, aggregationType)
        if surfaceMember is None:
            self.surfaceMember = []
        else:
            self.surfaceMember = surfaceMember
    def factory(*args_, **kwargs_):
        if ShellType.subclass:
            return ShellType.subclass(*args_, **kwargs_)
        else:
            return ShellType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_surfaceMember(self): return self.surfaceMember
    def set_surfaceMember(self, surfaceMember): self.surfaceMember = surfaceMember
    def add_surfaceMember(self, value): self.surfaceMember.append(value)
    def insert_surfaceMember_at(self, index, value): self.surfaceMember.insert(index, value)
    def replace_surfaceMember_at(self, index, value): self.surfaceMember[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.surfaceMember
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ShellType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ShellType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ShellType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ShellType'):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ShellType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for surfaceMember_ in self.surfaceMember:
            surfaceMember_.export(outfile, level, namespace_='gml:', name_='surfaceMember', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ShellType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('surfaceMember=[\n')
        level += 1
        for surfaceMember_ in self.surfaceMember:
            showIndent(outfile, level)
            outfile.write('model_.surfaceMember(\n')
            surfaceMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'surfaceMember':
            obj_ = SurfacePropertyType.factory()
            obj_.build(child_)
            self.surfaceMember.append(obj_)
            obj_.original_tagname_ = 'surfaceMember'
# end class ShellType


class ShellPropertyType(GeneratedsSuper):
    """A property with the content model of gml:ShellPropertyType
    encapsulates a shell to represent a component of a solid
    boundary."""
    subclass = None
    superclass = None
    def __init__(self, Shell=None):
        self.original_tagname_ = None
        self.Shell = Shell
    def factory(*args_, **kwargs_):
        if ShellPropertyType.subclass:
            return ShellPropertyType.subclass(*args_, **kwargs_)
        else:
            return ShellPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Shell(self): return self.Shell
    def set_Shell(self, Shell): self.Shell = Shell
    def hasContent_(self):
        if (
            self.Shell is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ShellPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ShellPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ShellPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ShellPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ShellPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Shell is not None:
            self.Shell.export(outfile, level, namespace_='gml:', name_='Shell', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ShellPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Shell is not None:
            showIndent(outfile, level)
            outfile.write('Shell=model_.ShellType(\n')
            self.Shell.exportLiteral(outfile, level, name_='Shell')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Shell':
            obj_ = ShellType.factory()
            obj_.build(child_)
            self.Shell = obj_
            obj_.original_tagname_ = 'Shell'
# end class ShellPropertyType


class SurfacePropertyType(GeneratedsSuper):
    """A property that has a surface as its value domain may either be an
    appropriate geometry element encapsulated in an element of this
    type or an XLink reference to a remote geometry element (where
    remote includes geometry elements located elsewhere in the same
    document). Either the reference or the contained element shall
    be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractSurface=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractSurface = AbstractSurface
    def factory(*args_, **kwargs_):
        if SurfacePropertyType.subclass:
            return SurfacePropertyType.subclass(*args_, **kwargs_)
        else:
            return SurfacePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSurface(self): return self.AbstractSurface
    def set_AbstractSurface(self, AbstractSurface): self.AbstractSurface = AbstractSurface
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractSurface is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SurfacePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SurfacePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SurfacePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SurfacePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SurfacePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractSurface is not None:
            self.AbstractSurface.export(outfile, level, namespace_, name_='AbstractSurface', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SurfacePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractSurfaceType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractSurfaceType=model_.AbstractSurfaceType(\n')
            self.AbstractSurfaceType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
# end class SurfacePropertyType


class SurfaceArrayPropertyType(GeneratedsSuper):
    """gml:SurfaceArrayPropertyType is a container for an array of
    surfaces. The elements are always contained in the array
    property, referencing geometry elements or arrays of geometry
    elements via XLinks is not supported."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractSurface=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractSurface is None:
            self.AbstractSurface = []
        else:
            self.AbstractSurface = AbstractSurface
    def factory(*args_, **kwargs_):
        if SurfaceArrayPropertyType.subclass:
            return SurfaceArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return SurfaceArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSurface(self): return self.AbstractSurface
    def set_AbstractSurface(self, AbstractSurface): self.AbstractSurface = AbstractSurface
    def add_AbstractSurface(self, value): self.AbstractSurface.append(value)
    def insert_AbstractSurface_at(self, index, value): self.AbstractSurface.insert(index, value)
    def replace_AbstractSurface_at(self, index, value): self.AbstractSurface[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractSurface
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SurfaceArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SurfaceArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SurfaceArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SurfaceArrayPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SurfaceArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractSurface_ in self.AbstractSurface:
            AbstractSurface_.export(outfile, level, namespace_, name_='AbstractSurface', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SurfaceArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractSurface=[\n')
        level += 1
        for AbstractSurface_ in self.AbstractSurface:
            showIndent(outfile, level)
            outfile.write('model_.AbstractSurfaceType(\n')
            AbstractSurface_.exportLiteral(outfile, level, name_='AbstractSurfaceType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface.append(obj_)
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface.append(obj_)
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.TriangulatedSurface.append(obj_)
            obj_.original_tagname_ = 'Tin'
# end class SurfaceArrayPropertyType


class AbstractRingType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, extensiontype_=None):
        self.original_tagname_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractRingType.subclass:
            return AbstractRingType.subclass(*args_, **kwargs_)
        else:
            return AbstractRingType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractRingType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractRingType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractRingType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractRingType'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractRingType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractRingType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractRingType


class AbstractRingPropertyType(GeneratedsSuper):
    """A property with the content model of gml:AbstractRingPropertyType
    encapsulates a ring to represent the surface boundary property
    of a surface."""
    subclass = None
    superclass = None
    def __init__(self, AbstractRing=None):
        self.original_tagname_ = None
        self.AbstractRing = AbstractRing
    def factory(*args_, **kwargs_):
        if AbstractRingPropertyType.subclass:
            return AbstractRingPropertyType.subclass(*args_, **kwargs_)
        else:
            return AbstractRingPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractRing(self): return self.AbstractRing
    def set_AbstractRing(self, AbstractRing): self.AbstractRing = AbstractRing
    def hasContent_(self):
        if (
            self.AbstractRing is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractRingPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractRingPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractRingPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractRingPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractRingPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractRing is not None:
            self.AbstractRing.export(outfile, level, namespace_, name_='AbstractRing', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractRingPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractRingType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractRingType=model_.AbstractRingType(\n')
            self.AbstractRingType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractRing':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractRing> element')
            self.AbstractRing = obj_
            obj_.original_tagname_ = 'AbstractRing'
        elif nodeName_ == 'Ring':
            obj_ = RingType.factory()
            obj_.build(child_)
            self.Ring = obj_
            obj_.original_tagname_ = 'Ring'
        elif nodeName_ == 'LinearRing':
            obj_ = LinearRingType.factory()
            obj_.build(child_)
            self.LinearRing = obj_
            obj_.original_tagname_ = 'LinearRing'
# end class AbstractRingPropertyType


class LinearRingType(AbstractRingType):
    subclass = None
    superclass = AbstractRingType
    def __init__(self, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None):
        self.original_tagname_ = None
        super(LinearRingType, self).__init__()
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
    def factory(*args_, **kwargs_):
        if LinearRingType.subclass:
            return LinearRingType.subclass(*args_, **kwargs_)
        else:
            return LinearRingType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            super(LinearRingType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LinearRingType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LinearRingType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LinearRingType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LinearRingType'):
        super(LinearRingType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LinearRingType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LinearRingType', fromsubclass_=False, pretty_print=True):
        super(LinearRingType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LinearRingType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LinearRingType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LinearRingType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.pos(\n')
            pos_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.pointProperty(\n')
            pointProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.posList(\n')
            self.posList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LinearRingType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        super(LinearRingType, self).buildChildren(child_, node, nodeName_, True)
# end class LinearRingType


class LinearRingPropertyType(GeneratedsSuper):
    """A property with the content model of gml:LinearRingPropertyType
    encapsulates a linear ring to represent a component of a surface
    boundary."""
    subclass = None
    superclass = None
    def __init__(self, LinearRing=None):
        self.original_tagname_ = None
        self.LinearRing = LinearRing
    def factory(*args_, **kwargs_):
        if LinearRingPropertyType.subclass:
            return LinearRingPropertyType.subclass(*args_, **kwargs_)
        else:
            return LinearRingPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LinearRing(self): return self.LinearRing
    def set_LinearRing(self, LinearRing): self.LinearRing = LinearRing
    def hasContent_(self):
        if (
            self.LinearRing is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LinearRingPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LinearRingPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LinearRingPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LinearRingPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LinearRingPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LinearRing is not None:
            self.LinearRing.export(outfile, level, namespace_='gml:', name_='LinearRing', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LinearRingPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LinearRing is not None:
            showIndent(outfile, level)
            outfile.write('LinearRing=model_.LinearRingType(\n')
            self.LinearRing.exportLiteral(outfile, level, name_='LinearRing')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LinearRing':
            obj_ = LinearRingType.factory()
            obj_.build(child_)
            self.LinearRing = obj_
            obj_.original_tagname_ = 'LinearRing'
# end class LinearRingPropertyType


class GeometryPropertyType(GeneratedsSuper):
    """A geometric property may either be any geometry element encapsulated
    in an element of this type or an XLink reference to a remote
    geometry element (where remote includes geometry elements
    located elsewhere in the same or another document). Note that
    either the reference or the contained element shall be given,
    but not both or none. If a feature has a property that takes a
    geometry element as its value, this is called a geometry
    property. A generic type for such a geometry property is
    GeometryPropertyType."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeometry=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractGeometry = AbstractGeometry
    def factory(*args_, **kwargs_):
        if GeometryPropertyType.subclass:
            return GeometryPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeometryPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeometry is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeometryPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeometryPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeometryPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeometryPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeometryPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeometryPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
# end class GeometryPropertyType


class GeometryArrayPropertyType(GeneratedsSuper):
    """If a feature has a property which takes an array of geometry
    elements as its value, this is called a geometry array property.
    A generic type for such a geometry property is
    GeometryArrayPropertyType. The elements are always contained
    inline in the array property, referencing geometry elements or
    arrays of geometry elements via XLinks is not supported."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractGeometry=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractGeometry is None:
            self.AbstractGeometry = []
        else:
            self.AbstractGeometry = AbstractGeometry
    def factory(*args_, **kwargs_):
        if GeometryArrayPropertyType.subclass:
            return GeometryArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeometryArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def add_AbstractGeometry(self, value): self.AbstractGeometry.append(value)
    def insert_AbstractGeometry_at(self, index, value): self.AbstractGeometry.insert(index, value)
    def replace_AbstractGeometry_at(self, index, value): self.AbstractGeometry[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractGeometry
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeometryArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeometryArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeometryArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeometryArrayPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeometryArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractGeometry_ in self.AbstractGeometry:
            AbstractGeometry_.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeometryArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractGeometry=[\n')
        level += 1
        for AbstractGeometry_ in self.AbstractGeometry:
            showIndent(outfile, level)
            outfile.write('model_.AbstractGeometryType(\n')
            AbstractGeometry_.exportLiteral(outfile, level, name_='AbstractGeometryType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface.append(obj_)
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface.append(obj_)
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.TriangulatedSurface.append(obj_)
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractImplicitGeometry.append(obj_)
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.Grid.append(obj_)
            obj_.original_tagname_ = 'RectifiedGrid'
# end class GeometryArrayPropertyType


class DirectPositionType(GeneratedsSuper):
    """Direct position instances hold the coordinates for a position within
    some coordinate reference system (CRS). Since direct positions,
    as data types, will often be included in larger objects (such as
    geometry elements) that have references to CRS, the srsName
    attribute will in general be missing, if this particular direct
    position is included in a larger element with such a reference
    to a CRS. In this case, the CRS is implicitly assumed to take on
    the value of the containing object's CRS. if no srsName
    attribute is given, the CRS shall be specified as part of the
    larger context this geometry element is part of, typically a
    geometric object like a point, curve, etc."""
    subclass = None
    superclass = None
    def __init__(self, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.srsName = _cast(None, srsName)
        self.axisLabels = _cast(None, axisLabels)
        self.uomLabels = _cast(None, uomLabels)
        self.srsDimension = _cast(int, srsDimension)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DirectPositionType.subclass:
            return DirectPositionType.subclass(*args_, **kwargs_)
        else:
            return DirectPositionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_srsName(self): return self.srsName
    def set_srsName(self, srsName): self.srsName = srsName
    def get_axisLabels(self): return self.axisLabels
    def set_axisLabels(self, axisLabels): self.axisLabels = axisLabels
    def get_uomLabels(self): return self.uomLabels
    def set_uomLabels(self, uomLabels): self.uomLabels = uomLabels
    def get_srsDimension(self): return self.srsDimension
    def set_srsDimension(self, srsDimension): self.srsDimension = srsDimension
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectPositionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectPositionType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectPositionType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectPositionType'):
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            outfile.write(' srsName=%s' % (self.gds_format_string(quote_attrib(self.srsName).encode(ExternalEncoding), input_name='srsName'), ))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            outfile.write(' axisLabels=%s' % (quote_attrib(self.axisLabels), ))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            outfile.write(' uomLabels=%s' % (quote_attrib(self.uomLabels), ))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            outfile.write(' srsDimension="%s"' % self.gds_format_integer(self.srsDimension, input_name='srsDimension'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectPositionType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='DirectPositionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            showIndent(outfile, level)
            outfile.write('srsName="%s",\n' % (self.srsName,))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            showIndent(outfile, level)
            outfile.write('axisLabels=%s,\n' % (self.axisLabels,))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            showIndent(outfile, level)
            outfile.write('uomLabels=%s,\n' % (self.uomLabels,))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            showIndent(outfile, level)
            outfile.write('srsDimension=%d,\n' % (self.srsDimension,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('srsName', node)
        if value is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            self.srsName = value
        value = find_attr_value_('axisLabels', node)
        if value is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            self.axisLabels = value
        value = find_attr_value_('uomLabels', node)
        if value is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            self.uomLabels = value
        value = find_attr_value_('srsDimension', node)
        if value is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            try:
                self.srsDimension = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.srsDimension <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class DirectPositionType


class DirectPositionListType(GeneratedsSuper):
    """posList instances (and other instances with the content model
    specified by DirectPositionListType) hold the coordinates for a
    sequence of direct positions within the same coordinate
    reference system (CRS). if no srsName attribute is given, the
    CRS shall be specified as part of the larger context this
    geometry element is part of, typically a geometric object like a
    point, curve, etc. The optional attribute count specifies the
    number of direct positions in the list. If the attribute count
    is present then the attribute srsDimension shall be present,
    too. The number of entries in the list is equal to the product
    of the dimensionality of the coordinate reference system (i.e.
    it is a derived value of the coordinate reference system
    definition) and the number of direct positions."""
    subclass = None
    superclass = None
    def __init__(self, count=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, valueOf_=None):
        self.original_tagname_ = None
        self.count = _cast(int, count)
        self.srsName = _cast(None, srsName)
        self.axisLabels = _cast(None, axisLabels)
        self.uomLabels = _cast(None, uomLabels)
        self.srsDimension = _cast(int, srsDimension)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if DirectPositionListType.subclass:
            return DirectPositionListType.subclass(*args_, **kwargs_)
        else:
            return DirectPositionListType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_count(self): return self.count
    def set_count(self, count): self.count = count
    def get_srsName(self): return self.srsName
    def set_srsName(self, srsName): self.srsName = srsName
    def get_axisLabels(self): return self.axisLabels
    def set_axisLabels(self, axisLabels): self.axisLabels = axisLabels
    def get_uomLabels(self): return self.uomLabels
    def set_uomLabels(self, uomLabels): self.uomLabels = uomLabels
    def get_srsDimension(self): return self.srsDimension
    def set_srsDimension(self, srsDimension): self.srsDimension = srsDimension
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectPositionListType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectPositionListType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectPositionListType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectPositionListType'):
        if self.count is not None and 'count' not in already_processed:
            already_processed.add('count')
            outfile.write(' count="%s"' % self.gds_format_integer(self.count, input_name='count'))
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            outfile.write(' srsName=%s' % (self.gds_format_string(quote_attrib(self.srsName).encode(ExternalEncoding), input_name='srsName'), ))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            outfile.write(' axisLabels=%s' % (quote_attrib(self.axisLabels), ))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            outfile.write(' uomLabels=%s' % (quote_attrib(self.uomLabels), ))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            outfile.write(' srsDimension="%s"' % self.gds_format_integer(self.srsDimension, input_name='srsDimension'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectPositionListType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='DirectPositionListType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.count is not None and 'count' not in already_processed:
            already_processed.add('count')
            showIndent(outfile, level)
            outfile.write('count=%d,\n' % (self.count,))
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            showIndent(outfile, level)
            outfile.write('srsName="%s",\n' % (self.srsName,))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            showIndent(outfile, level)
            outfile.write('axisLabels=%s,\n' % (self.axisLabels,))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            showIndent(outfile, level)
            outfile.write('uomLabels=%s,\n' % (self.uomLabels,))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            showIndent(outfile, level)
            outfile.write('srsDimension=%d,\n' % (self.srsDimension,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('count', node)
        if value is not None and 'count' not in already_processed:
            already_processed.add('count')
            try:
                self.count = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.count <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
        value = find_attr_value_('srsName', node)
        if value is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            self.srsName = value
        value = find_attr_value_('axisLabels', node)
        if value is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            self.axisLabels = value
        value = find_attr_value_('uomLabels', node)
        if value is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            self.uomLabels = value
        value = find_attr_value_('srsDimension', node)
        if value is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            try:
                self.srsDimension = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.srsDimension <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class DirectPositionListType


class VectorType(DirectPositionType):
    """For some applications the components of the position may be adjusted
    to yield a unit vector."""
    subclass = None
    superclass = DirectPositionType
    def __init__(self, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, valueOf_=None):
        self.original_tagname_ = None
        super(VectorType, self).__init__(srsName, axisLabels, uomLabels, srsDimension, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if VectorType.subclass:
            return VectorType.subclass(*args_, **kwargs_)
        else:
            return VectorType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(VectorType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VectorType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VectorType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VectorType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VectorType'):
        super(VectorType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='VectorType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VectorType', fromsubclass_=False, pretty_print=True):
        super(VectorType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='VectorType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(VectorType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(VectorType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(VectorType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class VectorType


class EnvelopeType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, lowerCorner=None, upperCorner=None, pos=None, coordinates=None, extensiontype_=None):
        self.original_tagname_ = None
        self.srsName = _cast(None, srsName)
        self.axisLabels = _cast(None, axisLabels)
        self.uomLabels = _cast(None, uomLabels)
        self.srsDimension = _cast(int, srsDimension)
        self.lowerCorner = lowerCorner
        self.upperCorner = upperCorner
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        self.coordinates = coordinates
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if EnvelopeType.subclass:
            return EnvelopeType.subclass(*args_, **kwargs_)
        else:
            return EnvelopeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_lowerCorner(self): return self.lowerCorner
    def set_lowerCorner(self, lowerCorner): self.lowerCorner = lowerCorner
    def get_upperCorner(self): return self.upperCorner
    def set_upperCorner(self, upperCorner): self.upperCorner = upperCorner
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def get_srsName(self): return self.srsName
    def set_srsName(self, srsName): self.srsName = srsName
    def get_axisLabels(self): return self.axisLabels
    def set_axisLabels(self, axisLabels): self.axisLabels = axisLabels
    def get_uomLabels(self): return self.uomLabels
    def set_uomLabels(self, uomLabels): self.uomLabels = uomLabels
    def get_srsDimension(self): return self.srsDimension
    def set_srsDimension(self, srsDimension): self.srsDimension = srsDimension
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.lowerCorner is not None or
            self.upperCorner is not None or
            self.pos or
            self.coordinates is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EnvelopeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EnvelopeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EnvelopeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EnvelopeType'):
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            outfile.write(' srsName=%s' % (self.gds_format_string(quote_attrib(self.srsName).encode(ExternalEncoding), input_name='srsName'), ))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            outfile.write(' axisLabels=%s' % (quote_attrib(self.axisLabels), ))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            outfile.write(' uomLabels=%s' % (quote_attrib(self.uomLabels), ))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            outfile.write(' srsDimension="%s"' % self.gds_format_integer(self.srsDimension, input_name='srsDimension'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EnvelopeType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.lowerCorner is not None:
            self.lowerCorner.export(outfile, level, namespace_, name_='lowerCorner', pretty_print=pretty_print)
        if self.upperCorner is not None:
            self.upperCorner.export(outfile, level, namespace_, name_='upperCorner', pretty_print=pretty_print)
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EnvelopeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            showIndent(outfile, level)
            outfile.write('srsName="%s",\n' % (self.srsName,))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            showIndent(outfile, level)
            outfile.write('axisLabels=%s,\n' % (self.axisLabels,))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            showIndent(outfile, level)
            outfile.write('uomLabels=%s,\n' % (self.uomLabels,))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            showIndent(outfile, level)
            outfile.write('srsDimension=%d,\n' % (self.srsDimension,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.lowerCorner is not None:
            showIndent(outfile, level)
            outfile.write('lowerCorner=model_.DirectPositionType(\n')
            self.lowerCorner.exportLiteral(outfile, level, name_='lowerCorner')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.upperCorner is not None:
            showIndent(outfile, level)
            outfile.write('upperCorner=model_.DirectPositionType(\n')
            self.upperCorner.exportLiteral(outfile, level, name_='upperCorner')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.DirectPositionType(\n')
            pos_.exportLiteral(outfile, level, name_='DirectPositionType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('srsName', node)
        if value is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            self.srsName = value
        value = find_attr_value_('axisLabels', node)
        if value is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            self.axisLabels = value
        value = find_attr_value_('uomLabels', node)
        if value is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            self.uomLabels = value
        value = find_attr_value_('srsDimension', node)
        if value is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            try:
                self.srsDimension = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.srsDimension <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'lowerCorner':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.lowerCorner = obj_
            obj_.original_tagname_ = 'lowerCorner'
        elif nodeName_ == 'upperCorner':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.upperCorner = obj_
            obj_.original_tagname_ = 'upperCorner'
        elif nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
# end class EnvelopeType


class GeometricPrimitivePropertyType(GeneratedsSuper):
    """A property that has a geometric primitive as its value domain may
    either be an appropriate geometry element encapsulated in an
    element of this type or an XLink reference to a remote geometry
    element (where remote includes geometry elements located
    elsewhere in the same document). Either the reference or the
    contained element shall be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, AbstractGeometricPrimitive=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.AbstractGeometricPrimitive = AbstractGeometricPrimitive
    def factory(*args_, **kwargs_):
        if GeometricPrimitivePropertyType.subclass:
            return GeometricPrimitivePropertyType.subclass(*args_, **kwargs_)
        else:
            return GeometricPrimitivePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometricPrimitive(self): return self.AbstractGeometricPrimitive
    def set_AbstractGeometricPrimitive(self, AbstractGeometricPrimitive): self.AbstractGeometricPrimitive = AbstractGeometricPrimitive
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeometricPrimitive is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeometricPrimitivePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeometricPrimitivePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeometricPrimitivePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeometricPrimitivePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeometricPrimitivePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeometricPrimitive is not None:
            self.AbstractGeometricPrimitive.export(outfile, level, namespace_, name_='AbstractGeometricPrimitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeometricPrimitivePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeometricPrimitiveType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometricPrimitiveType=model_.AbstractGeometricPrimitiveType(\n')
            self.AbstractGeometricPrimitiveType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
# end class GeometricPrimitivePropertyType


class PointPropertyType(GeneratedsSuper):
    """A property that has a point as its value domain may either be an
    appropriate geometry element encapsulated in an element of this
    type or an XLink reference to a remote geometry element (where
    remote includes geometry elements located elsewhere in the same
    document). Either the reference or the contained element shall
    be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Point=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Point = Point
    def factory(*args_, **kwargs_):
        if PointPropertyType.subclass:
            return PointPropertyType.subclass(*args_, **kwargs_)
        else:
            return PointPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Point(self): return self.Point
    def set_Point(self, Point): self.Point = Point
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Point is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PointPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PointPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PointPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PointPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PointPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Point is not None:
            self.Point.export(outfile, level, namespace_='gml:', name_='Point', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PointPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Point is not None:
            showIndent(outfile, level)
            outfile.write('Point=model_.PointType(\n')
            self.Point.exportLiteral(outfile, level, name_='Point')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
# end class PointPropertyType


class PointArrayPropertyType(GeneratedsSuper):
    """gml:PointArrayPropertyType is a container for an array of points.
    The elements are always contained inline in the array property,
    referencing geometry elements or arrays of geometry elements via
    XLinks is not supported."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, Point=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if Point is None:
            self.Point = []
        else:
            self.Point = Point
    def factory(*args_, **kwargs_):
        if PointArrayPropertyType.subclass:
            return PointArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return PointArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Point(self): return self.Point
    def set_Point(self, Point): self.Point = Point
    def add_Point(self, value): self.Point.append(value)
    def insert_Point_at(self, index, value): self.Point.insert(index, value)
    def replace_Point_at(self, index, value): self.Point[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.Point
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PointArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PointArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PointArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PointArrayPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PointArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for Point_ in self.Point:
            Point_.export(outfile, level, namespace_='gml:', name_='Point', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PointArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('Point=[\n')
        level += 1
        for Point_ in self.Point:
            showIndent(outfile, level)
            outfile.write('model_.PointType(\n')
            Point_.exportLiteral(outfile, level, name_='PointType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point.append(obj_)
            obj_.original_tagname_ = 'Point'
# end class PointArrayPropertyType


class CurvePropertyType(GeneratedsSuper):
    """A property that has a curve as its value domain may either be an
    appropriate geometry element encapsulated in an element of this
    type or an XLink reference to a remote geometry element (where
    remote includes geometry elements located elsewhere in the same
    document). Either the reference or the contained element shall
    be given, but neither both nor none."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractCurve=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractCurve = AbstractCurve
    def factory(*args_, **kwargs_):
        if CurvePropertyType.subclass:
            return CurvePropertyType.subclass(*args_, **kwargs_)
        else:
            return CurvePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCurve(self): return self.AbstractCurve
    def set_AbstractCurve(self, AbstractCurve): self.AbstractCurve = AbstractCurve
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractCurve is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CurvePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CurvePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CurvePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CurvePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CurvePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractCurve is not None:
            self.AbstractCurve.export(outfile, level, namespace_, name_='AbstractCurve', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CurvePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCurveType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCurveType=model_.AbstractCurveType(\n')
            self.AbstractCurveType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
# end class CurvePropertyType


class CurveArrayPropertyType(GeneratedsSuper):
    """A container for an array of curves. The elements are always
    contained in the array property, referencing geometry elements
    or arrays of geometry elements via XLinks is not supported."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractCurve=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractCurve is None:
            self.AbstractCurve = []
        else:
            self.AbstractCurve = AbstractCurve
    def factory(*args_, **kwargs_):
        if CurveArrayPropertyType.subclass:
            return CurveArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return CurveArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCurve(self): return self.AbstractCurve
    def set_AbstractCurve(self, AbstractCurve): self.AbstractCurve = AbstractCurve
    def add_AbstractCurve(self, value): self.AbstractCurve.append(value)
    def insert_AbstractCurve_at(self, index, value): self.AbstractCurve.insert(index, value)
    def replace_AbstractCurve_at(self, index, value): self.AbstractCurve[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractCurve
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CurveArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CurveArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CurveArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CurveArrayPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CurveArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractCurve_ in self.AbstractCurve:
            AbstractCurve_.export(outfile, level, namespace_, name_='AbstractCurve', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CurveArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractCurve=[\n')
        level += 1
        for AbstractCurve_ in self.AbstractCurve:
            showIndent(outfile, level)
            outfile.write('model_.AbstractCurveType(\n')
            AbstractCurve_.exportLiteral(outfile, level, name_='AbstractCurveType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'LineString'
# end class CurveArrayPropertyType


class UnitOfMeasureType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, uom=None, extensiontype_=None):
        self.original_tagname_ = None
        self.uom = _cast(None, uom)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if UnitOfMeasureType.subclass:
            return UnitOfMeasureType.subclass(*args_, **kwargs_)
        else:
            return UnitOfMeasureType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_uom(self): return self.uom
    def set_uom(self, uom): self.uom = uom
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UnitOfMeasureType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnitOfMeasureType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UnitOfMeasureType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UnitOfMeasureType'):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            outfile.write(' uom=%s' % (quote_attrib(self.uom), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UnitOfMeasureType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='UnitOfMeasureType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            showIndent(outfile, level)
            outfile.write('uom=%s,\n' % (self.uom,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('uom', node)
        if value is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            self.uom = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class UnitOfMeasureType


class DerivationUnitTermType(UnitOfMeasureType):
    subclass = None
    superclass = UnitOfMeasureType
    def __init__(self, uom=None, exponent=None):
        self.original_tagname_ = None
        super(DerivationUnitTermType, self).__init__(uom, )
        self.exponent = _cast(int, exponent)
    def factory(*args_, **kwargs_):
        if DerivationUnitTermType.subclass:
            return DerivationUnitTermType.subclass(*args_, **kwargs_)
        else:
            return DerivationUnitTermType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_exponent(self): return self.exponent
    def set_exponent(self, exponent): self.exponent = exponent
    def hasContent_(self):
        if (
            super(DerivationUnitTermType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DerivationUnitTermType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DerivationUnitTermType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DerivationUnitTermType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DerivationUnitTermType'):
        super(DerivationUnitTermType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DerivationUnitTermType')
        if self.exponent is not None and 'exponent' not in already_processed:
            already_processed.add('exponent')
            outfile.write(' exponent="%s"' % self.gds_format_integer(self.exponent, input_name='exponent'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DerivationUnitTermType', fromsubclass_=False, pretty_print=True):
        super(DerivationUnitTermType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='DerivationUnitTermType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.exponent is not None and 'exponent' not in already_processed:
            already_processed.add('exponent')
            showIndent(outfile, level)
            outfile.write('exponent=%d,\n' % (self.exponent,))
        super(DerivationUnitTermType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DerivationUnitTermType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('exponent', node)
        if value is not None and 'exponent' not in already_processed:
            already_processed.add('exponent')
            try:
                self.exponent = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
        super(DerivationUnitTermType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DerivationUnitTermType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DerivationUnitTermType


class ConversionToPreferredUnitType(UnitOfMeasureType):
    """The inherited attribute uom references the preferred unit that this
    conversion applies to. The conversion of a unit to the preferred
    unit for this physical quantity type is specified by an
    arithmetic conversion (scaling and/or offset). The content model
    extends gml:UnitOfMeasureType, which has a mandatory attribute
    uom which identifies the preferred unit for the physical
    quantity type that this conversion applies to. The conversion is
    specified by a choice of - gml:factor, which defines the scale
    factor, or - gml:formula, which defines a formula by which a
    value using the conventional unit of measure can be converted to
    obtain the corresponding value using the preferred unit of
    measure. The formula defines the parameters of a simple formula
    by which a value using the conventional unit of measure can be
    converted to the corresponding value using the preferred unit of
    measure. The formula element contains elements a, b, c and d,
    whose values use the XML Schema type double. These values are
    used in the formula y = (a + bx) / (c + dx), where x is a value
    using this unit, and y is the corresponding value using the base
    unit. The elements a and d are optional, and if values are not
    provided, those parameters are considered to be zero. If values
    are not provided for both a and d, the formula is equivalent to
    a fraction with numerator and denominator parameters."""
    subclass = None
    superclass = UnitOfMeasureType
    def __init__(self, uom=None, factor=None, formula=None):
        self.original_tagname_ = None
        super(ConversionToPreferredUnitType, self).__init__(uom, )
        self.factor = factor
        self.formula = formula
    def factory(*args_, **kwargs_):
        if ConversionToPreferredUnitType.subclass:
            return ConversionToPreferredUnitType.subclass(*args_, **kwargs_)
        else:
            return ConversionToPreferredUnitType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_factor(self): return self.factor
    def set_factor(self, factor): self.factor = factor
    def get_formula(self): return self.formula
    def set_formula(self, formula): self.formula = formula
    def hasContent_(self):
        if (
            self.factor is not None or
            self.formula is not None or
            super(ConversionToPreferredUnitType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConversionToPreferredUnitType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConversionToPreferredUnitType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConversionToPreferredUnitType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConversionToPreferredUnitType'):
        super(ConversionToPreferredUnitType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ConversionToPreferredUnitType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConversionToPreferredUnitType', fromsubclass_=False, pretty_print=True):
        super(ConversionToPreferredUnitType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.factor is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfactor>%s</%sfactor>%s' % (namespace_, self.gds_format_double(self.factor, input_name='factor'), namespace_, eol_))
        if self.formula is not None:
            self.formula.export(outfile, level, namespace_, name_='formula', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConversionToPreferredUnitType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ConversionToPreferredUnitType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ConversionToPreferredUnitType, self).exportLiteralChildren(outfile, level, name_)
        if self.factor is not None:
            showIndent(outfile, level)
            outfile.write('factor=%e,\n' % self.factor)
        if self.formula is not None:
            showIndent(outfile, level)
            outfile.write('formula=model_.FormulaType(\n')
            self.formula.exportLiteral(outfile, level, name_='formula')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ConversionToPreferredUnitType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'factor':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'factor')
            self.factor = fval_
        elif nodeName_ == 'formula':
            obj_ = FormulaType.factory()
            obj_.build(child_)
            self.formula = obj_
            obj_.original_tagname_ = 'formula'
        elif nodeName_ == 'methodFormula':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.methodFormula = obj_
            obj_.original_tagname_ = 'methodFormula'
        super(ConversionToPreferredUnitType, self).buildChildren(child_, node, nodeName_, True)
# end class ConversionToPreferredUnitType


class FormulaType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, a=None, b=None, c=None, d=None):
        self.original_tagname_ = None
        self.a = a
        self.b = b
        self.c = c
        self.d = d
    def factory(*args_, **kwargs_):
        if FormulaType.subclass:
            return FormulaType.subclass(*args_, **kwargs_)
        else:
            return FormulaType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_a(self): return self.a
    def set_a(self, a): self.a = a
    def get_b(self): return self.b
    def set_b(self, b): self.b = b
    def get_c(self): return self.c
    def set_c(self, c): self.c = c
    def get_d(self): return self.d
    def set_d(self, d): self.d = d
    def hasContent_(self):
        if (
            self.a is not None or
            self.b is not None or
            self.c is not None or
            self.d is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FormulaType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FormulaType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FormulaType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FormulaType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FormulaType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.a is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sa>%s</%sa>%s' % (namespace_, self.gds_format_double(self.a, input_name='a'), namespace_, eol_))
        if self.b is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sb>%s</%sb>%s' % (namespace_, self.gds_format_double(self.b, input_name='b'), namespace_, eol_))
        if self.c is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sc>%s</%sc>%s' % (namespace_, self.gds_format_double(self.c, input_name='c'), namespace_, eol_))
        if self.d is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sd>%s</%sd>%s' % (namespace_, self.gds_format_double(self.d, input_name='d'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='FormulaType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.a is not None:
            showIndent(outfile, level)
            outfile.write('a=%e,\n' % self.a)
        if self.b is not None:
            showIndent(outfile, level)
            outfile.write('b=%e,\n' % self.b)
        if self.c is not None:
            showIndent(outfile, level)
            outfile.write('c=%e,\n' % self.c)
        if self.d is not None:
            showIndent(outfile, level)
            outfile.write('d=%e,\n' % self.d)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'a':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'a')
            self.a = fval_
        elif nodeName_ == 'b':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'b')
            self.b = fval_
        elif nodeName_ == 'c':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'c')
            self.c = fval_
        elif nodeName_ == 'd':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'd')
            self.d = fval_
# end class FormulaType


class DefinitionBaseType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        if metaDataProperty is None:
            self.metaDataProperty = []
        else:
            self.metaDataProperty = metaDataProperty
        self.description = description
        self.descriptionReference = descriptionReference
        self.identifier = identifier
        if name is None:
            self.name = []
        else:
            self.name = name
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DefinitionBaseType.subclass:
            return DefinitionBaseType.subclass(*args_, **kwargs_)
        else:
            return DefinitionBaseType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metaDataProperty(self): return self.metaDataProperty
    def set_metaDataProperty(self, metaDataProperty): self.metaDataProperty = metaDataProperty
    def add_metaDataProperty(self, value): self.metaDataProperty.append(value)
    def insert_metaDataProperty_at(self, index, value): self.metaDataProperty.insert(index, value)
    def replace_metaDataProperty_at(self, index, value): self.metaDataProperty[index] = value
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_descriptionReference(self): return self.descriptionReference
    def set_descriptionReference(self, descriptionReference): self.descriptionReference = descriptionReference
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def add_name(self, value): self.name.append(value)
    def insert_name_at(self, index, value): self.name.insert(index, value)
    def replace_name_at(self, index, value): self.name[index] = value
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.metaDataProperty or
            self.description is not None or
            self.descriptionReference is not None or
            self.identifier is not None or
            self.name
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DefinitionBaseType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionBaseType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DefinitionBaseType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DefinitionBaseType'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DefinitionBaseType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for metaDataProperty_ in self.metaDataProperty:
            metaDataProperty_.export(outfile, level, namespace_='gml:', name_='metaDataProperty', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_='gml:', name_='description', pretty_print=pretty_print)
        if self.descriptionReference is not None:
            self.descriptionReference.export(outfile, level, namespace_='gml:', name_='descriptionReference', pretty_print=pretty_print)
        if self.identifier is not None:
            self.identifier.export(outfile, level, namespace_='gml:', name_='identifier', pretty_print=pretty_print)
        for name_ in self.name:
            name_.export(outfile, level, namespace_='gml:', name_='name', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DefinitionBaseType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id="%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('metaDataProperty=[\n')
        level += 1
        for metaDataProperty_ in self.metaDataProperty:
            showIndent(outfile, level)
            outfile.write('model_.metaDataProperty(\n')
            metaDataProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.description(\n')
            self.description.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptionReference is not None:
            showIndent(outfile, level)
            outfile.write('descriptionReference=model_.descriptionReference(\n')
            self.descriptionReference.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.identifier is not None:
            showIndent(outfile, level)
            outfile.write('identifier=model_.identifier(\n')
            self.identifier.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('name=[\n')
        level += 1
        for name_ in self.name:
            showIndent(outfile, level)
            outfile.write('model_.name(\n')
            name_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metaDataProperty':
            obj_ = MetaDataPropertyType.factory()
            obj_.build(child_)
            self.metaDataProperty.append(obj_)
            obj_.original_tagname_ = 'metaDataProperty'
        elif nodeName_ == 'description':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'descriptionReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.descriptionReference = obj_
            obj_.original_tagname_ = 'descriptionReference'
        elif nodeName_ == 'identifier':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.identifier = obj_
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name.append(obj_)
            obj_.original_tagname_ = 'name'
# end class DefinitionBaseType


class DefinitionType(DefinitionBaseType):
    subclass = None
    superclass = DefinitionBaseType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, extensiontype_=None):
        self.original_tagname_ = None
        super(DefinitionType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.remarks = remarks
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DefinitionType.subclass:
            return DefinitionType.subclass(*args_, **kwargs_)
        else:
            return DefinitionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_remarks(self): return self.remarks
    def set_remarks(self, remarks): self.remarks = remarks
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.remarks is not None or
            super(DefinitionType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DefinitionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DefinitionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DefinitionType'):
        super(DefinitionType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DefinitionType', fromsubclass_=False, pretty_print=True):
        super(DefinitionType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.remarks is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sremarks>%s</%sremarks>%s' % (namespace_, self.gds_format_string(quote_xml(self.remarks).encode(ExternalEncoding), input_name='remarks'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='DefinitionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DefinitionType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DefinitionType, self).exportLiteralChildren(outfile, level, name_)
        if self.remarks is not None:
            showIndent(outfile, level)
            outfile.write('remarks=%s,\n' % quote_python(self.remarks).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(DefinitionType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'remarks':
            remarks_ = child_.text
            remarks_ = self.gds_validate_string(remarks_, node, 'remarks')
            self.remarks = remarks_
        super(DefinitionType, self).buildChildren(child_, node, nodeName_, True)
# end class DefinitionType


class DictionaryType(DefinitionType):
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, dictionaryEntry=None, indirectEntry=None):
        self.original_tagname_ = None
        super(DictionaryType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.aggregationType = _cast(None, aggregationType)
        if dictionaryEntry is None:
            self.dictionaryEntry = []
        else:
            self.dictionaryEntry = dictionaryEntry
        if indirectEntry is None:
            self.indirectEntry = []
        else:
            self.indirectEntry = indirectEntry
    def factory(*args_, **kwargs_):
        if DictionaryType.subclass:
            return DictionaryType.subclass(*args_, **kwargs_)
        else:
            return DictionaryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_dictionaryEntry(self): return self.dictionaryEntry
    def set_dictionaryEntry(self, dictionaryEntry): self.dictionaryEntry = dictionaryEntry
    def add_dictionaryEntry(self, value): self.dictionaryEntry.append(value)
    def insert_dictionaryEntry_at(self, index, value): self.dictionaryEntry.insert(index, value)
    def replace_dictionaryEntry_at(self, index, value): self.dictionaryEntry[index] = value
    def get_indirectEntry(self): return self.indirectEntry
    def set_indirectEntry(self, indirectEntry): self.indirectEntry = indirectEntry
    def add_indirectEntry(self, value): self.indirectEntry.append(value)
    def insert_indirectEntry_at(self, index, value): self.indirectEntry.insert(index, value)
    def replace_indirectEntry_at(self, index, value): self.indirectEntry[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.dictionaryEntry or
            self.indirectEntry or
            super(DictionaryType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DictionaryType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DictionaryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DictionaryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DictionaryType'):
        super(DictionaryType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DictionaryType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DictionaryType', fromsubclass_=False, pretty_print=True):
        super(DictionaryType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for dictionaryEntry_ in self.dictionaryEntry:
            dictionaryEntry_.export(outfile, level, namespace_='gml:', name_='dictionaryEntry', pretty_print=pretty_print)
        for indirectEntry_ in self.indirectEntry:
            indirectEntry_.export(outfile, level, namespace_='gml:', name_='indirectEntry', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DictionaryType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(DictionaryType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DictionaryType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('dictionaryEntry=[\n')
        level += 1
        for dictionaryEntry_ in self.dictionaryEntry:
            showIndent(outfile, level)
            outfile.write('model_.dictionaryEntry(\n')
            dictionaryEntry_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('indirectEntry=[\n')
        level += 1
        for indirectEntry_ in self.indirectEntry:
            showIndent(outfile, level)
            outfile.write('model_.indirectEntry(\n')
            indirectEntry_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(DictionaryType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'dictionaryEntry':
            obj_ = DictionaryEntryType.factory()
            obj_.build(child_)
            self.dictionaryEntry.append(obj_)
            obj_.original_tagname_ = 'dictionaryEntry'
        elif nodeName_ == 'definitionMember':
            obj_ = DictionaryEntryType.factory()
            obj_.build(child_)
            self.dictionaryEntry.append(obj_)
            obj_.original_tagname_ = 'definitionMember'
        elif nodeName_ == 'indirectEntry':
            obj_ = IndirectEntryType.factory()
            obj_.build(child_)
            self.indirectEntry.append(obj_)
            obj_.original_tagname_ = 'indirectEntry'
        super(DictionaryType, self).buildChildren(child_, node, nodeName_, True)
# end class DictionaryType


class AbstractObject(GeneratedsSuper):
    """This element has no type defined, and is therefore implicitly
    (according to the rules of W3C XML Schema) an XML Schema
    anyType. It is used as the head of an XML Schema substitution
    group which unifies complex content and certain simple content
    elements used for datatypes in GML, including the
    gml:AbstractGML substitution group."""
    subclass = None
    superclass = None
    def __init__(self):
        self.original_tagname_ = None
    def factory(*args_, **kwargs_):
        if AbstractObject.subclass:
            return AbstractObject.subclass(*args_, **kwargs_)
        else:
            return AbstractObject(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractObject', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractObject')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractObject', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractObject'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractObject', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractObject'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractObject


class AbstractGMLType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        if metaDataProperty is None:
            self.metaDataProperty = []
        else:
            self.metaDataProperty = metaDataProperty
        self.description = description
        self.descriptionReference = descriptionReference
        self.identifier = identifier
        if name is None:
            self.name = []
        else:
            self.name = name
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGMLType.subclass:
            return AbstractGMLType.subclass(*args_, **kwargs_)
        else:
            return AbstractGMLType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metaDataProperty(self): return self.metaDataProperty
    def set_metaDataProperty(self, metaDataProperty): self.metaDataProperty = metaDataProperty
    def add_metaDataProperty(self, value): self.metaDataProperty.append(value)
    def insert_metaDataProperty_at(self, index, value): self.metaDataProperty.insert(index, value)
    def replace_metaDataProperty_at(self, index, value): self.metaDataProperty[index] = value
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_descriptionReference(self): return self.descriptionReference
    def set_descriptionReference(self, descriptionReference): self.descriptionReference = descriptionReference
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def add_name(self, value): self.name.append(value)
    def insert_name_at(self, index, value): self.name.insert(index, value)
    def replace_name_at(self, index, value): self.name[index] = value
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.metaDataProperty or
            self.description is not None or
            self.descriptionReference is not None or
            self.identifier is not None or
            self.name
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGMLType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGMLType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGMLType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGMLType'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGMLType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for metaDataProperty_ in self.metaDataProperty:
            metaDataProperty_.export(outfile, level, namespace_='gml:', name_='metaDataProperty', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_='gml:', name_='description', pretty_print=pretty_print)
        if self.descriptionReference is not None:
            self.descriptionReference.export(outfile, level, namespace_='gml:', name_='descriptionReference', pretty_print=pretty_print)
        if self.identifier is not None:
            self.identifier.export(outfile, level, namespace_='gml:', name_='identifier', pretty_print=pretty_print)
        for name_ in self.name:
            name_.export(outfile, level, namespace_='gml:', name_='name', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGMLType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id="%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('metaDataProperty=[\n')
        level += 1
        for metaDataProperty_ in self.metaDataProperty:
            showIndent(outfile, level)
            outfile.write('model_.metaDataProperty(\n')
            metaDataProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.description(\n')
            self.description.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptionReference is not None:
            showIndent(outfile, level)
            outfile.write('descriptionReference=model_.descriptionReference(\n')
            self.descriptionReference.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.identifier is not None:
            showIndent(outfile, level)
            outfile.write('identifier=model_.identifier(\n')
            self.identifier.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('name=[\n')
        level += 1
        for name_ in self.name:
            showIndent(outfile, level)
            outfile.write('model_.name(\n')
            name_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metaDataProperty':
            obj_ = MetaDataPropertyType.factory()
            obj_.build(child_)
            self.metaDataProperty.append(obj_)
            obj_.original_tagname_ = 'metaDataProperty'
        elif nodeName_ == 'description':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'descriptionReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.descriptionReference = obj_
            obj_.original_tagname_ = 'descriptionReference'
        elif nodeName_ == 'identifier':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.identifier = obj_
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name.append(obj_)
            obj_.original_tagname_ = 'name'
# end class AbstractGMLType


class AssociationRoleType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, anytypeobjs_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.anytypeobjs_ = anytypeobjs_
    def factory(*args_, **kwargs_):
        if AssociationRoleType.subclass:
            return AssociationRoleType.subclass(*args_, **kwargs_)
        else:
            return AssociationRoleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.anytypeobjs_ is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AssociationRoleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AssociationRoleType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AssociationRoleType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AssociationRoleType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AssociationRoleType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.anytypeobjs_ is not None:
            self.anytypeobjs_.export(outfile, level, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AssociationRoleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.anytypeobjs_ is not None:
            showIndent(outfile, level)
            outfile.write('anytypeobjs_=model_.anytypeobjs_(\n')
            self.anytypeobjs_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        obj_ = self.gds_build_any(child_, 'AssociationRoleType')
        if obj_ is not None:
            self.set_anytypeobjs_(obj_)
# end class AssociationRoleType


class ReferenceType(GeneratedsSuper):
    """gml:ReferenceType is intended to be used in application schemas
    directly, if a property element shall use a "by-reference only"
    encoding."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
    def factory(*args_, **kwargs_):
        if ReferenceType.subclass:
            return ReferenceType.subclass(*args_, **kwargs_)
        else:
            return ReferenceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ReferenceType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ReferenceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ReferenceType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ReferenceType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ReferenceType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='ReferenceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class ReferenceType


class InlinePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, anytypeobjs_=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.anytypeobjs_ = anytypeobjs_
    def factory(*args_, **kwargs_):
        if InlinePropertyType.subclass:
            return InlinePropertyType.subclass(*args_, **kwargs_)
        else:
            return InlinePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.anytypeobjs_ is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='InlinePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='InlinePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='InlinePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='InlinePropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='InlinePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.anytypeobjs_ is not None:
            self.anytypeobjs_.export(outfile, level, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='InlinePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.anytypeobjs_ is not None:
            showIndent(outfile, level)
            outfile.write('anytypeobjs_=model_.anytypeobjs_(\n')
            self.anytypeobjs_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        obj_ = self.gds_build_any(child_, 'InlinePropertyType')
        if obj_ is not None:
            self.set_anytypeobjs_(obj_)
# end class InlinePropertyType


class AbstractMemberType(GeneratedsSuper):
    """To create a collection of GML Objects that are not all features, a
    property type shall be derived by extension from
    gml:AbstractMemberType. This abstract property type is intended
    to be used only in object types where software shall be able to
    identify that an instance of such an object type is to be
    interpreted as a collection of objects. By default, this
    abstract property type does not imply any ownership of the
    objects in the collection. The owns attribute of
    gml:OwnershipAttributeGroup may be used on a property element
    instance to assert ownership of an object in the collection. A
    collection shall not own an object already owned by another
    object."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, extensiontype_=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractMemberType.subclass:
            return AbstractMemberType.subclass(*args_, **kwargs_)
        else:
            return AbstractMemberType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractMemberType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMemberType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractMemberType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractMemberType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractMemberType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractMemberType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractMemberType


class AbstractMetadataPropertyType(GeneratedsSuper):
    """To associate metadata described by any XML Schema with a GML object,
    a property element shall be defined whose content model is
    derived by extension from gml:AbstractMetadataPropertyType. The
    value of such a property shall be metadata. The content model of
    such a property type, i.e. the metadata application schema shall
    be specified by the GML Application Schema. By default, this
    abstract property type does not imply any ownership of the
    metadata. The owns attribute of gml:OwnershipAttributeGroup may
    be used on a metadata property element instance to assert
    ownership of the metadata. If metadata following the conceptual
    model of ISO 19115 is to be encoded in a GML document, the
    corresponding Implementation Specification specified in ISO/TS
    19139 shall be used to encode the metadata information."""
    subclass = None
    superclass = None
    def __init__(self, owns=False):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
    def factory(*args_, **kwargs_):
        if AbstractMetadataPropertyType.subclass:
            return AbstractMetadataPropertyType.subclass(*args_, **kwargs_)
        else:
            return AbstractMetadataPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractMetadataPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMetadataPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractMetadataPropertyType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractMetadataPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractMetadataPropertyType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractMetadataPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractMetadataPropertyType


class CodeType(GeneratedsSuper):
    """gml:CodeType is a generalized type to be used for a term, keyword or
    name. It adds a XML attribute codeSpace to a term, where the
    value of the codeSpace attribute (if present) shall indicate a
    dictionary, thesaurus, classification scheme, authority, or
    pattern for the term."""
    subclass = None
    superclass = None
    def __init__(self, codeSpace=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.codeSpace = _cast(None, codeSpace)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CodeType.subclass:
            return CodeType.subclass(*args_, **kwargs_)
        else:
            return CodeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CodeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CodeType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CodeType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CodeType'):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            outfile.write(' codeSpace=%s' % (self.gds_format_string(quote_attrib(self.codeSpace).encode(ExternalEncoding), input_name='codeSpace'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CodeType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='CodeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            showIndent(outfile, level)
            outfile.write('codeSpace="%s",\n' % (self.codeSpace,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('codeSpace', node)
        if value is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            self.codeSpace = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CodeType


class CodeWithAuthorityType(CodeType):
    """gml:CodeWithAuthorityType requires that the codeSpace attribute is
    provided in an instance."""
    subclass = None
    superclass = CodeType
    def __init__(self, codeSpace=None, valueOf_=None):
        self.original_tagname_ = None
        super(CodeWithAuthorityType, self).__init__(codeSpace, valueOf_, )
        self.codeSpace = _cast(None, codeSpace)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if CodeWithAuthorityType.subclass:
            return CodeWithAuthorityType.subclass(*args_, **kwargs_)
        else:
            return CodeWithAuthorityType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(CodeWithAuthorityType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CodeWithAuthorityType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CodeWithAuthorityType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CodeWithAuthorityType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CodeWithAuthorityType'):
        super(CodeWithAuthorityType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CodeWithAuthorityType')
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            outfile.write(' codeSpace=%s' % (self.gds_format_string(quote_attrib(self.codeSpace).encode(ExternalEncoding), input_name='codeSpace'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CodeWithAuthorityType', fromsubclass_=False, pretty_print=True):
        super(CodeWithAuthorityType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='CodeWithAuthorityType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            showIndent(outfile, level)
            outfile.write('codeSpace="%s",\n' % (self.codeSpace,))
        super(CodeWithAuthorityType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CodeWithAuthorityType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('codeSpace', node)
        if value is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            self.codeSpace = value
        super(CodeWithAuthorityType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CodeWithAuthorityType


class MeasureType(GeneratedsSuper):
    """gml:MeasureType supports recording an amount encoded as a value of
    XML Schema double, together with a units of measure indicated by
    an attribute uom, short for "units Of measure". The value of the
    uom attribute identifies a reference system for the amount,
    usually a ratio or interval scale."""
    subclass = None
    superclass = None
    def __init__(self, uom=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.uom = _cast(None, uom)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MeasureType.subclass:
            return MeasureType.subclass(*args_, **kwargs_)
        else:
            return MeasureType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_uom(self): return self.uom
    def set_uom(self, uom): self.uom = uom
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MeasureType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MeasureType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MeasureType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MeasureType'):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            outfile.write(' uom=%s' % (quote_attrib(self.uom), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MeasureType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='MeasureType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            showIndent(outfile, level)
            outfile.write('uom=%s,\n' % (self.uom,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('uom', node)
        if value is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            self.uom = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class MeasureType


class CoordinatesType(GeneratedsSuper):
    """This type is deprecated for tuples with ordinate values that are
    numbers. CoordinatesType is a text string, intended to be used
    to record an array of tuples or coordinates. While it is not
    possible to enforce the internal structure of the string through
    schema validation, some optional attributes have been provided
    in previous versions of GML to support a description of the
    internal structure. These attributes are deprecated. The
    attributes were intended to be used as follows: Decimal symbol
    used for a decimal point (default="." a stop or period) cs
    symbol used to separate components within a tuple or coordinate
    string (default="," a comma) ts symbol used to separate tuples
    or coordinate strings (default=" " a space) Since it is based on
    the XML Schema string type, CoordinatesType may be used in the
    construction of tables of tuples or arrays of tuples, including
    ones that contain mixed text and numeric values."""
    subclass = None
    superclass = None
    def __init__(self, cs=',', decimal='.', ts=' ', valueOf_=None):
        self.original_tagname_ = None
        self.cs = _cast(None, cs)
        self.decimal = _cast(None, decimal)
        self.ts = _cast(None, ts)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if CoordinatesType.subclass:
            return CoordinatesType.subclass(*args_, **kwargs_)
        else:
            return CoordinatesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_cs(self): return self.cs
    def set_cs(self, cs): self.cs = cs
    def get_decimal(self): return self.decimal
    def set_decimal(self, decimal): self.decimal = decimal
    def get_ts(self): return self.ts
    def set_ts(self, ts): self.ts = ts
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CoordinatesType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CoordinatesType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CoordinatesType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CoordinatesType'):
        if self.cs is not None and 'cs' not in already_processed:
            already_processed.add('cs')
            outfile.write(' cs=%s' % (self.gds_format_string(quote_attrib(self.cs).encode(ExternalEncoding), input_name='cs'), ))
        if self.decimal is not None and 'decimal' not in already_processed:
            already_processed.add('decimal')
            outfile.write(' decimal=%s' % (self.gds_format_string(quote_attrib(self.decimal).encode(ExternalEncoding), input_name='decimal'), ))
        if self.ts is not None and 'ts' not in already_processed:
            already_processed.add('ts')
            outfile.write(' ts=%s' % (self.gds_format_string(quote_attrib(self.ts).encode(ExternalEncoding), input_name='ts'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CoordinatesType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='CoordinatesType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.cs is not None and 'cs' not in already_processed:
            already_processed.add('cs')
            showIndent(outfile, level)
            outfile.write('cs="%s",\n' % (self.cs,))
        if self.decimal is not None and 'decimal' not in already_processed:
            already_processed.add('decimal')
            showIndent(outfile, level)
            outfile.write('decimal="%s",\n' % (self.decimal,))
        if self.ts is not None and 'ts' not in already_processed:
            already_processed.add('ts')
            showIndent(outfile, level)
            outfile.write('ts="%s",\n' % (self.ts,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('cs', node)
        if value is not None and 'cs' not in already_processed:
            already_processed.add('cs')
            self.cs = value
        value = find_attr_value_('decimal', node)
        if value is not None and 'decimal' not in already_processed:
            already_processed.add('decimal')
            self.decimal = value
        value = find_attr_value_('ts', node)
        if value is not None and 'ts' not in already_processed:
            already_processed.add('ts')
            self.ts = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CoordinatesType


class CodeListType(GeneratedsSuper):
    """gml:CodeListType provides for lists of terms. The values in an
    instance element shall all be valid according to the rules of
    the dictionary, classification scheme, or authority identified
    by the value of its codeSpace attribute."""
    subclass = None
    superclass = None
    def __init__(self, codeSpace=None, valueOf_=None):
        self.original_tagname_ = None
        self.codeSpace = _cast(None, codeSpace)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if CodeListType.subclass:
            return CodeListType.subclass(*args_, **kwargs_)
        else:
            return CodeListType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CodeListType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CodeListType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CodeListType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CodeListType'):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            outfile.write(' codeSpace=%s' % (self.gds_format_string(quote_attrib(self.codeSpace).encode(ExternalEncoding), input_name='codeSpace'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CodeListType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='CodeListType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            showIndent(outfile, level)
            outfile.write('codeSpace="%s",\n' % (self.codeSpace,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('codeSpace', node)
        if value is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            self.codeSpace = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CodeListType


class CodeOrNilReasonListType(GeneratedsSuper):
    """gml:CodeOrNilReasonListType provides for lists of terms. The values
    in an instance element shall all be valid according to the rules
    of the dictionary, classification scheme, or authority
    identified by the value of its codeSpace attribute. An instance
    element may also include embedded values from NilReasonType. It
    is intended to be used in situations where a term or
    classification is expected, but the value may be absent for some
    reason."""
    subclass = None
    superclass = None
    def __init__(self, codeSpace=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.codeSpace = _cast(None, codeSpace)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CodeOrNilReasonListType.subclass:
            return CodeOrNilReasonListType.subclass(*args_, **kwargs_)
        else:
            return CodeOrNilReasonListType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CodeOrNilReasonListType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CodeOrNilReasonListType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CodeOrNilReasonListType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CodeOrNilReasonListType'):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            outfile.write(' codeSpace=%s' % (self.gds_format_string(quote_attrib(self.codeSpace).encode(ExternalEncoding), input_name='codeSpace'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CodeOrNilReasonListType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='CodeOrNilReasonListType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            showIndent(outfile, level)
            outfile.write('codeSpace="%s",\n' % (self.codeSpace,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('codeSpace', node)
        if value is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            self.codeSpace = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CodeOrNilReasonListType


class MeasureListType(GeneratedsSuper):
    """gml:MeasureListType provides for a list of quantities."""
    subclass = None
    superclass = None
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        self.uom = _cast(None, uom)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if MeasureListType.subclass:
            return MeasureListType.subclass(*args_, **kwargs_)
        else:
            return MeasureListType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_uom(self): return self.uom
    def set_uom(self, uom): self.uom = uom
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MeasureListType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MeasureListType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MeasureListType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MeasureListType'):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            outfile.write(' uom=%s' % (quote_attrib(self.uom), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MeasureListType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='MeasureListType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            showIndent(outfile, level)
            outfile.write('uom=%s,\n' % (self.uom,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('uom', node)
        if value is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            self.uom = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class MeasureListType


class MeasureOrNilReasonListType(GeneratedsSuper):
    """gml:MeasureOrNilReasonListType provides for a list of quantities. An
    instance element may also include embedded values from
    NilReasonType. It is intended to be used in situations where a
    value is expected, but the value may be absent for some reason."""
    subclass = None
    superclass = None
    def __init__(self, uom=None, valueOf_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.uom = _cast(None, uom)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MeasureOrNilReasonListType.subclass:
            return MeasureOrNilReasonListType.subclass(*args_, **kwargs_)
        else:
            return MeasureOrNilReasonListType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_uom(self): return self.uom
    def set_uom(self, uom): self.uom = uom
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MeasureOrNilReasonListType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MeasureOrNilReasonListType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MeasureOrNilReasonListType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MeasureOrNilReasonListType'):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            outfile.write(' uom=%s' % (quote_attrib(self.uom), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MeasureOrNilReasonListType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='MeasureOrNilReasonListType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            showIndent(outfile, level)
            outfile.write('uom=%s,\n' % (self.uom,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('uom', node)
        if value is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            self.uom = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class MeasureOrNilReasonListType


class simple(GeneratedsSuper):
    """Intended for use as the type of user-declared elements to make them
    simple links."""
    subclass = None
    superclass = None
    def __init__(self, title=None, arcrole=None, actuate=None, href=None, role=None, show=None, type_=None, anytypeobjs_=None, valueOf_=None, mixedclass_=None, content_=None):
        self.original_tagname_ = None
        self.title = _cast(None, title)
        self.arcrole = _cast(None, arcrole)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.show = _cast(None, show)
        self.type_ = _cast(None, type_)
        if anytypeobjs_ is None:
            self.anytypeobjs_ = []
        else:
            self.anytypeobjs_ = anytypeobjs_
        self.valueOf_ = valueOf_
        if mixedclass_ is None:
            self.mixedclass_ = MixedContainer
        else:
            self.mixedclass_ = mixedclass_
        if content_ is None:
            self.content_ = []
        else:
            self.content_ = content_
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if simple.subclass:
            return simple.subclass(*args_, **kwargs_)
        else:
            return simple(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)
    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.anytypeobjs_ or
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='simple', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='simple')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='simple', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='simple'):
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='simple', fromsubclass_=False, pretty_print=True):
        if not fromsubclass_:
            for item_ in self.content_:
                item_.export(outfile, level, item_.name, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='simple'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('content_ = [\n')
        for item_ in self.content_:
            item_.exportLiteral(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('],\n')
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        if node.text is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', node.text)
            self.content_.append(obj_)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == '':
            obj_ = __ANY__.factory()
            obj_.build(child_)
            obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
                MixedContainer.TypeNone, '', obj_)
            self.content_.append(obj_)
            if hasattr(self, 'add_'):
              self.add_(obj_.value)
            elif hasattr(self, 'set_'):
              self.set_(obj_.value)
        if not fromsubclass_ and child_.tail is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', child_.tail)
            self.content_.append(obj_)
# end class simple


class extended(GeneratedsSuper):
    """Intended for use as the type of user-declared elements to make them
    extended links. Note that the elements referenced in the content
    model are all abstract. The intention is that by simply
    declaring elements with these as their substitutionGroup, all
    the right things will happen."""
    subclass = None
    superclass = None
    def __init__(self, type_=None, role=None, title_attr=None, title=None, resource=None, locator=None, arc=None):
        self.original_tagname_ = None
        self.type_ = _cast(None, type_)
        self.role = _cast(None, role)
        self.title_attr = _cast(None, title_attr)
        self.title = title
        self.resource = resource
        self.locator = locator
        self.arc = arc
    def factory(*args_, **kwargs_):
        if extended.subclass:
            return extended.subclass(*args_, **kwargs_)
        else:
            return extended(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_resource(self): return self.resource
    def set_resource(self, resource): self.resource = resource
    def get_locator(self): return self.locator
    def set_locator(self, locator): self.locator = locator
    def get_arc(self): return self.arc
    def set_arc(self, arc): self.arc = arc
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_title_attr(self): return self.title_attr
    def set_title_attr(self, title_attr): self.title_attr = title_attr
    def hasContent_(self):
        if (
            self.title is not None or
            self.resource is not None or
            self.locator is not None or
            self.arc is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='extended', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='extended')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='extended', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='extended'):
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.title_attr is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            outfile.write(' title=%s' % (quote_attrib(self.title_attr), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='extended', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.title is not None:
            self.title.export(outfile, level, namespace_, name_='title', pretty_print=pretty_print)
        if self.resource is not None:
            self.resource.export(outfile, level, namespace_, name_='resource', pretty_print=pretty_print)
        if self.locator is not None:
            self.locator.export(outfile, level, namespace_, name_='locator', pretty_print=pretty_print)
        if self.arc is not None:
            self.arc.export(outfile, level, namespace_, name_='arc', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='extended'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.title_attr is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            showIndent(outfile, level)
            outfile.write('title_attr=%s,\n' % (self.title_attr,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.title is not None:
            showIndent(outfile, level)
            outfile.write('title=model_.title(\n')
            self.title.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.resource is not None:
            showIndent(outfile, level)
            outfile.write('resource=model_.resource(\n')
            self.resource.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.locator is not None:
            showIndent(outfile, level)
            outfile.write('locator=model_.locator(\n')
            self.locator.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.arc is not None:
            showIndent(outfile, level)
            outfile.write('arc=model_.arc(\n')
            self.arc.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('title', node)
        if value is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            self.title_attr = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'title':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <title> element')
            self.title = obj_
            obj_.original_tagname_ = 'title'
        elif nodeName_ == 'resource':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <resource> element')
            self.resource = obj_
            obj_.original_tagname_ = 'resource'
        elif nodeName_ == 'locator':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <locator> element')
            self.locator = obj_
            obj_.original_tagname_ = 'locator'
        elif nodeName_ == 'arc':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <arc> element')
            self.arc = obj_
            obj_.original_tagname_ = 'arc'
# end class extended


class titleEltType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, lang=None, type_=None, anytypeobjs_=None, valueOf_=None, mixedclass_=None, content_=None):
        self.original_tagname_ = None
        self.lang = _cast(None, lang)
        self.type_ = _cast(None, type_)
        if anytypeobjs_ is None:
            self.anytypeobjs_ = []
        else:
            self.anytypeobjs_ = anytypeobjs_
        self.valueOf_ = valueOf_
        if mixedclass_ is None:
            self.mixedclass_ = MixedContainer
        else:
            self.mixedclass_ = mixedclass_
        if content_ is None:
            self.content_ = []
        else:
            self.content_ = content_
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if titleEltType.subclass:
            return titleEltType.subclass(*args_, **kwargs_)
        else:
            return titleEltType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)
    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value
    def get_lang(self): return self.lang
    def set_lang(self, lang): self.lang = lang
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.anytypeobjs_ or
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='titleEltType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='titleEltType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='titleEltType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='titleEltType'):
        if self.lang is not None and 'lang' not in already_processed:
            already_processed.add('lang')
            outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='titleEltType', fromsubclass_=False, pretty_print=True):
        if not fromsubclass_:
            for item_ in self.content_:
                item_.export(outfile, level, item_.name, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='titleEltType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.lang is not None and 'lang' not in already_processed:
            already_processed.add('lang')
            showIndent(outfile, level)
            outfile.write('lang="%s",\n' % (self.lang,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('content_ = [\n')
        for item_ in self.content_:
            item_.exportLiteral(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('],\n')
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        if node.text is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', node.text)
            self.content_.append(obj_)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('lang', node)
        if value is not None and 'lang' not in already_processed:
            already_processed.add('lang')
            self.lang = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == '':
            obj_ = __ANY__.factory()
            obj_.build(child_)
            obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
                MixedContainer.TypeNone, '', obj_)
            self.content_.append(obj_)
            if hasattr(self, 'add_'):
              self.add_(obj_.value)
            elif hasattr(self, 'set_'):
              self.set_(obj_.value)
        if not fromsubclass_ and child_.tail is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', child_.tail)
            self.content_.append(obj_)
# end class titleEltType


class resourceType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, type_=None, title=None, role=None, label=None, anytypeobjs_=None, valueOf_=None, mixedclass_=None, content_=None):
        self.original_tagname_ = None
        self.type_ = _cast(None, type_)
        self.title = _cast(None, title)
        self.role = _cast(None, role)
        self.label = _cast(None, label)
        if anytypeobjs_ is None:
            self.anytypeobjs_ = []
        else:
            self.anytypeobjs_ = anytypeobjs_
        self.valueOf_ = valueOf_
        if mixedclass_ is None:
            self.mixedclass_ = MixedContainer
        else:
            self.mixedclass_ = mixedclass_
        if content_ is None:
            self.content_ = []
        else:
            self.content_ = content_
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if resourceType.subclass:
            return resourceType.subclass(*args_, **kwargs_)
        else:
            return resourceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)
    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_label(self): return self.label
    def set_label(self, label): self.label = label
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.anytypeobjs_ or
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='resourceType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='resourceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='resourceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='resourceType'):
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.label is not None and 'label' not in already_processed:
            already_processed.add('label')
            outfile.write(' label=%s' % (self.gds_format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='resourceType', fromsubclass_=False, pretty_print=True):
        if not fromsubclass_:
            for item_ in self.content_:
                item_.export(outfile, level, item_.name, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='resourceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.label is not None and 'label' not in already_processed:
            already_processed.add('label')
            showIndent(outfile, level)
            outfile.write('label="%s",\n' % (self.label,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('content_ = [\n')
        for item_ in self.content_:
            item_.exportLiteral(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('],\n')
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        if node.text is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', node.text)
            self.content_.append(obj_)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('label', node)
        if value is not None and 'label' not in already_processed:
            already_processed.add('label')
            self.label = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == '':
            obj_ = __ANY__.factory()
            obj_.build(child_)
            obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
                MixedContainer.TypeNone, '', obj_)
            self.content_.append(obj_)
            if hasattr(self, 'add_'):
              self.add_(obj_.value)
            elif hasattr(self, 'set_'):
              self.set_(obj_.value)
        if not fromsubclass_ and child_.tail is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', child_.tail)
            self.content_.append(obj_)
# end class resourceType


class locatorType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, title_attr=None, label=None, href=None, role=None, type_=None, title=None):
        self.original_tagname_ = None
        self.title_attr = _cast(None, title_attr)
        self.label = _cast(None, label)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.type_ = _cast(None, type_)
        if title is None:
            self.title = []
        else:
            self.title = title
    def factory(*args_, **kwargs_):
        if locatorType.subclass:
            return locatorType.subclass(*args_, **kwargs_)
        else:
            return locatorType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def add_title(self, value): self.title.append(value)
    def insert_title_at(self, index, value): self.title.insert(index, value)
    def replace_title_at(self, index, value): self.title[index] = value
    def get_title_attr(self): return self.title_attr
    def set_title_attr(self, title_attr): self.title_attr = title_attr
    def get_label(self): return self.label
    def set_label(self, label): self.label = label
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.title
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='locatorType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='locatorType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='locatorType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='locatorType'):
        if self.title_attr is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            outfile.write(' title=%s' % (quote_attrib(self.title_attr), ))
        if self.label is not None and 'label' not in already_processed:
            already_processed.add('label')
            outfile.write(' label=%s' % (self.gds_format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='locatorType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for title_ in self.title:
            title_.export(outfile, level, namespace_, name_='title', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='locatorType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.title_attr is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            showIndent(outfile, level)
            outfile.write('title_attr=%s,\n' % (self.title_attr,))
        if self.label is not None and 'label' not in already_processed:
            already_processed.add('label')
            showIndent(outfile, level)
            outfile.write('label="%s",\n' % (self.label,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('title=[\n')
        level += 1
        for title_ in self.title:
            showIndent(outfile, level)
            outfile.write('model_.title(\n')
            title_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('title', node)
        if value is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            self.title_attr = value
        value = find_attr_value_('label', node)
        if value is not None and 'label' not in already_processed:
            already_processed.add('label')
            self.label = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'title':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <title> element')
            self.title.append(obj_)
            obj_.original_tagname_ = 'title'
# end class locatorType


class arcType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, from_=None, title_attr=None, arcrole=None, actuate=None, to=None, show=None, type_=None, title=None):
        self.original_tagname_ = None
        self.from_ = _cast(None, from_)
        self.title_attr = _cast(None, title_attr)
        self.arcrole = _cast(None, arcrole)
        self.actuate = _cast(None, actuate)
        self.to = _cast(None, to)
        self.show = _cast(None, show)
        self.type_ = _cast(None, type_)
        if title is None:
            self.title = []
        else:
            self.title = title
    def factory(*args_, **kwargs_):
        if arcType.subclass:
            return arcType.subclass(*args_, **kwargs_)
        else:
            return arcType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def add_title(self, value): self.title.append(value)
    def insert_title_at(self, index, value): self.title.insert(index, value)
    def replace_title_at(self, index, value): self.title[index] = value
    def get_from(self): return self.from_
    def set_from(self, from_): self.from_ = from_
    def get_title_attr(self): return self.title_attr
    def set_title_attr(self, title_attr): self.title_attr = title_attr
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_to(self): return self.to
    def set_to(self, to): self.to = to
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.title
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='arcType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='arcType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='arcType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='arcType'):
        if self.from_ is not None and 'from_' not in already_processed:
            already_processed.add('from_')
            outfile.write(' from=%s' % (self.gds_format_string(quote_attrib(self.from_).encode(ExternalEncoding), input_name='from'), ))
        if self.title_attr is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            outfile.write(' title=%s' % (quote_attrib(self.title_attr), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.to is not None and 'to' not in already_processed:
            already_processed.add('to')
            outfile.write(' to=%s' % (self.gds_format_string(quote_attrib(self.to).encode(ExternalEncoding), input_name='to'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='arcType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for title_ in self.title:
            title_.export(outfile, level, namespace_, name_='title', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='arcType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.from_ is not None and 'from_' not in already_processed:
            already_processed.add('from_')
            showIndent(outfile, level)
            outfile.write('from_="%s",\n' % (self.from_,))
        if self.title_attr is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            showIndent(outfile, level)
            outfile.write('title_attr=%s,\n' % (self.title_attr,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.to is not None and 'to' not in already_processed:
            already_processed.add('to')
            showIndent(outfile, level)
            outfile.write('to="%s",\n' % (self.to,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('title=[\n')
        level += 1
        for title_ in self.title:
            showIndent(outfile, level)
            outfile.write('model_.title(\n')
            title_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('from', node)
        if value is not None and 'from' not in already_processed:
            already_processed.add('from')
            self.from_ = value
        value = find_attr_value_('title', node)
        if value is not None and 'title_attr' not in already_processed:
            already_processed.add('title_attr')
            self.title_attr = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('to', node)
        if value is not None and 'to' not in already_processed:
            already_processed.add('to')
            self.to = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'title':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <title> element')
            self.title.append(obj_)
            obj_.original_tagname_ = 'title'
# end class arcType


class DomainSetType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, AbstractGeometry=None, AbstractTimeObject=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.AbstractGeometry = AbstractGeometry
        self.AbstractTimeObject = AbstractTimeObject
    def factory(*args_, **kwargs_):
        if DomainSetType.subclass:
            return DomainSetType.subclass(*args_, **kwargs_)
        else:
            return DomainSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_AbstractTimeObject(self): return self.AbstractTimeObject
    def set_AbstractTimeObject(self, AbstractTimeObject): self.AbstractTimeObject = AbstractTimeObject
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeometry is not None or
            self.AbstractTimeObject is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DomainSetType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DomainSetType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DomainSetType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DomainSetType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DomainSetType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
        if self.AbstractTimeObject is not None:
            self.AbstractTimeObject.export(outfile, level, namespace_, name_='AbstractTimeObject', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DomainSetType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AbstractTimeObject is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTimeObject=model_.AbstractTimeObject(\n')
            self.AbstractTimeObject.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
        elif nodeName_ == 'AbstractTimeObject':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeObject> element')
            self.AbstractTimeObject = obj_
            obj_.original_tagname_ = 'AbstractTimeObject'
        elif nodeName_ == 'AbstractTimePrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimePrimitive> element')
            self.AbstractTimePrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimePrimitive'
        elif nodeName_ == 'AbstractTimeComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeComplex> element')
            self.AbstractTimeComplex = obj_
            obj_.original_tagname_ = 'AbstractTimeComplex'
        elif nodeName_ == 'AbstractTimeGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeGeometricPrimitive> element')
            self.AbstractTimeGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeGeometricPrimitive'
        elif nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimeTopologyPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.TimeInstant = obj_
            obj_.original_tagname_ = 'TimeInstant'
        elif nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.TimePeriod = obj_
            obj_.original_tagname_ = 'TimePeriod'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
        elif nodeName_ == 'TimeTopologyComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <TimeTopologyComplex> element')
            self.TimeTopologyComplex = obj_
            obj_.original_tagname_ = 'TimeTopologyComplex'
# end class DomainSetType


class RangeSetType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ValueArray=None, AbstractScalarValueList=None, DataBlock=None, File=None):
        self.original_tagname_ = None
        if ValueArray is None:
            self.ValueArray = []
        else:
            self.ValueArray = ValueArray
        if AbstractScalarValueList is None:
            self.AbstractScalarValueList = []
        else:
            self.AbstractScalarValueList = AbstractScalarValueList
        self.DataBlock = DataBlock
        self.File = File
    def factory(*args_, **kwargs_):
        if RangeSetType.subclass:
            return RangeSetType.subclass(*args_, **kwargs_)
        else:
            return RangeSetType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ValueArray(self): return self.ValueArray
    def set_ValueArray(self, ValueArray): self.ValueArray = ValueArray
    def add_ValueArray(self, value): self.ValueArray.append(value)
    def insert_ValueArray_at(self, index, value): self.ValueArray.insert(index, value)
    def replace_ValueArray_at(self, index, value): self.ValueArray[index] = value
    def get_AbstractScalarValueList(self): return self.AbstractScalarValueList
    def set_AbstractScalarValueList(self, AbstractScalarValueList): self.AbstractScalarValueList = AbstractScalarValueList
    def add_AbstractScalarValueList(self, value): self.AbstractScalarValueList.append(value)
    def insert_AbstractScalarValueList_at(self, index, value): self.AbstractScalarValueList.insert(index, value)
    def replace_AbstractScalarValueList_at(self, index, value): self.AbstractScalarValueList[index] = value
    def get_DataBlock(self): return self.DataBlock
    def set_DataBlock(self, DataBlock): self.DataBlock = DataBlock
    def get_File(self): return self.File
    def set_File(self, File): self.File = File
    def hasContent_(self):
        if (
            self.ValueArray or
            self.AbstractScalarValueList or
            self.DataBlock is not None or
            self.File is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RangeSetType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RangeSetType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RangeSetType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RangeSetType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RangeSetType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for ValueArray_ in self.ValueArray:
            ValueArray_.export(outfile, level, namespace_='gml:', name_='ValueArray', pretty_print=pretty_print)
        for AbstractScalarValueList_ in self.AbstractScalarValueList:
            AbstractScalarValueList_.export(outfile, level, namespace_, name_='AbstractScalarValueList', pretty_print=pretty_print)
        if self.DataBlock is not None:
            self.DataBlock.export(outfile, level, namespace_='gml:', name_='DataBlock', pretty_print=pretty_print)
        if self.File is not None:
            self.File.export(outfile, level, namespace_='gml:', name_='File', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RangeSetType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('ValueArray=[\n')
        level += 1
        for ValueArray_ in self.ValueArray:
            showIndent(outfile, level)
            outfile.write('model_.ValueArray(\n')
            ValueArray_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('AbstractScalarValueList=[\n')
        level += 1
        for AbstractScalarValueList_ in self.AbstractScalarValueList:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(AbstractScalarValueList_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.DataBlock is not None:
            showIndent(outfile, level)
            outfile.write('DataBlock=model_.DataBlock(\n')
            self.DataBlock.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.File is not None:
            showIndent(outfile, level)
            outfile.write('File=model_.File(\n')
            self.File.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ValueArray':
            obj_ = ValueArrayType.factory()
            obj_.build(child_)
            self.ValueArray.append(obj_)
            obj_.original_tagname_ = 'ValueArray'
        elif nodeName_ == 'AbstractScalarValueList':
            AbstractScalarValueList_ = child_.text
            AbstractScalarValueList_ = self.gds_validate_string(AbstractScalarValueList_, node, 'AbstractScalarValueList')
            self.AbstractScalarValueList.append(AbstractScalarValueList_)
        elif nodeName_ == 'BooleanList':
            BooleanList_ = child_.text
            self.BooleanList = BooleanList_
            self.BooleanList = self.BooleanList.split()
            self.validate_booleanOrNilReasonList(self.BooleanList)    # validate type booleanOrNilReasonList
        elif nodeName_ == 'CategoryList':
            class_obj_ = self.get_class_obj_(child_, CodeOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractScalarValueList.append(obj_)
            obj_.original_tagname_ = 'CategoryList'
        elif nodeName_ == 'CountList':
            CountList_ = child_.text
            self.CountList = CountList_
            self.CountList = self.CountList.split()
            self.validate_integerOrNilReasonList(self.CountList)    # validate type integerOrNilReasonList
        elif nodeName_ == 'QuantityList':
            class_obj_ = self.get_class_obj_(child_, MeasureOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractScalarValueList.append(obj_)
            obj_.original_tagname_ = 'QuantityList'
        elif nodeName_ == 'DataBlock':
            obj_ = DataBlockType.factory()
            obj_.build(child_)
            self.DataBlock = obj_
            obj_.original_tagname_ = 'DataBlock'
        elif nodeName_ == 'File':
            obj_ = FileType.factory()
            obj_.build(child_)
            self.File = obj_
            obj_.original_tagname_ = 'File'
# end class RangeSetType


class DataBlockType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, rangeParameters=None, tupleList=None, doubleOrNilReasonTupleList=None):
        self.original_tagname_ = None
        self.rangeParameters = rangeParameters
        self.tupleList = tupleList
        self.doubleOrNilReasonTupleList = doubleOrNilReasonTupleList
    def factory(*args_, **kwargs_):
        if DataBlockType.subclass:
            return DataBlockType.subclass(*args_, **kwargs_)
        else:
            return DataBlockType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_rangeParameters(self): return self.rangeParameters
    def set_rangeParameters(self, rangeParameters): self.rangeParameters = rangeParameters
    def get_tupleList(self): return self.tupleList
    def set_tupleList(self, tupleList): self.tupleList = tupleList
    def get_doubleOrNilReasonTupleList(self): return self.doubleOrNilReasonTupleList
    def set_doubleOrNilReasonTupleList(self, doubleOrNilReasonTupleList): self.doubleOrNilReasonTupleList = doubleOrNilReasonTupleList
    def hasContent_(self):
        if (
            self.rangeParameters is not None or
            self.tupleList is not None or
            self.doubleOrNilReasonTupleList is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DataBlockType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DataBlockType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DataBlockType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DataBlockType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DataBlockType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.rangeParameters is not None:
            self.rangeParameters.export(outfile, level, namespace_='gml:', name_='rangeParameters', pretty_print=pretty_print)
        if self.tupleList is not None:
            self.tupleList.export(outfile, level, namespace_='gml:', name_='tupleList', pretty_print=pretty_print)
        if self.doubleOrNilReasonTupleList is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdoubleOrNilReasonTupleList>%s</%sdoubleOrNilReasonTupleList>%s' % ('gml:', self.gds_format_string(quote_xml(self.doubleOrNilReasonTupleList).encode(ExternalEncoding), input_name='doubleOrNilReasonTupleList'), 'gml:', eol_))
    def exportLiteral(self, outfile, level, name_='DataBlockType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.rangeParameters is not None:
            showIndent(outfile, level)
            outfile.write('rangeParameters=model_.rangeParameters(\n')
            self.rangeParameters.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.tupleList is not None:
            showIndent(outfile, level)
            outfile.write('tupleList=model_.tupleList(\n')
            self.tupleList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.doubleOrNilReasonTupleList is not None:
            showIndent(outfile, level)
            outfile.write('doubleOrNilReasonTupleList=%s,\n' % quote_python(self.doubleOrNilReasonTupleList).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'rangeParameters':
            obj_ = AssociationRoleType.factory()
            obj_.build(child_)
            self.rangeParameters = obj_
            obj_.original_tagname_ = 'rangeParameters'
        elif nodeName_ == 'tupleList':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.tupleList = obj_
            obj_.original_tagname_ = 'tupleList'
        elif nodeName_ == 'doubleOrNilReasonTupleList':
            doubleOrNilReasonTupleList_ = child_.text
            doubleOrNilReasonTupleList_ = self.gds_validate_string(doubleOrNilReasonTupleList_, node, 'doubleOrNilReasonTupleList')
            self.doubleOrNilReasonTupleList = doubleOrNilReasonTupleList_
# end class DataBlockType


class FileType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, rangeParameters=None, fileName=None, fileReference=None, fileStructure=None, mimeType=None, compression=None):
        self.original_tagname_ = None
        self.rangeParameters = rangeParameters
        self.fileName = fileName
        self.fileReference = fileReference
        self.fileStructure = fileStructure
        self.mimeType = mimeType
        self.compression = compression
    def factory(*args_, **kwargs_):
        if FileType.subclass:
            return FileType.subclass(*args_, **kwargs_)
        else:
            return FileType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_rangeParameters(self): return self.rangeParameters
    def set_rangeParameters(self, rangeParameters): self.rangeParameters = rangeParameters
    def get_fileName(self): return self.fileName
    def set_fileName(self, fileName): self.fileName = fileName
    def get_fileReference(self): return self.fileReference
    def set_fileReference(self, fileReference): self.fileReference = fileReference
    def get_fileStructure(self): return self.fileStructure
    def set_fileStructure(self, fileStructure): self.fileStructure = fileStructure
    def get_mimeType(self): return self.mimeType
    def set_mimeType(self, mimeType): self.mimeType = mimeType
    def get_compression(self): return self.compression
    def set_compression(self, compression): self.compression = compression
    def hasContent_(self):
        if (
            self.rangeParameters is not None or
            self.fileName is not None or
            self.fileReference is not None or
            self.fileStructure is not None or
            self.mimeType is not None or
            self.compression is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FileType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FileType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FileType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FileType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FileType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.rangeParameters is not None:
            self.rangeParameters.export(outfile, level, namespace_='gml:', name_='rangeParameters', pretty_print=pretty_print)
        if self.fileName is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfileName>%s</%sfileName>%s' % (namespace_, self.gds_format_string(quote_xml(self.fileName).encode(ExternalEncoding), input_name='fileName'), namespace_, eol_))
        if self.fileReference is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfileReference>%s</%sfileReference>%s' % (namespace_, self.gds_format_string(quote_xml(self.fileReference).encode(ExternalEncoding), input_name='fileReference'), namespace_, eol_))
        if self.fileStructure is not None:
            self.fileStructure.export(outfile, level, namespace_, name_='fileStructure', pretty_print=pretty_print)
        if self.mimeType is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smimeType>%s</%smimeType>%s' % (namespace_, self.gds_format_string(quote_xml(self.mimeType).encode(ExternalEncoding), input_name='mimeType'), namespace_, eol_))
        if self.compression is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%scompression>%s</%scompression>%s' % (namespace_, self.gds_format_string(quote_xml(self.compression).encode(ExternalEncoding), input_name='compression'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='FileType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.rangeParameters is not None:
            showIndent(outfile, level)
            outfile.write('rangeParameters=model_.AssociationRoleType(\n')
            self.rangeParameters.exportLiteral(outfile, level, name_='rangeParameters')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.fileName is not None:
            showIndent(outfile, level)
            outfile.write('fileName=%s,\n' % quote_python(self.fileName).encode(ExternalEncoding))
        if self.fileReference is not None:
            showIndent(outfile, level)
            outfile.write('fileReference=%s,\n' % quote_python(self.fileReference).encode(ExternalEncoding))
        if self.fileStructure is not None:
            showIndent(outfile, level)
            outfile.write('fileStructure=model_.CodeType(\n')
            self.fileStructure.exportLiteral(outfile, level, name_='fileStructure')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.mimeType is not None:
            showIndent(outfile, level)
            outfile.write('mimeType=%s,\n' % quote_python(self.mimeType).encode(ExternalEncoding))
        if self.compression is not None:
            showIndent(outfile, level)
            outfile.write('compression=%s,\n' % quote_python(self.compression).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'rangeParameters':
            obj_ = AssociationRoleType.factory()
            obj_.build(child_)
            self.rangeParameters = obj_
            obj_.original_tagname_ = 'rangeParameters'
        elif nodeName_ == 'fileName':
            fileName_ = child_.text
            fileName_ = self.gds_validate_string(fileName_, node, 'fileName')
            self.fileName = fileName_
        elif nodeName_ == 'fileReference':
            fileReference_ = child_.text
            fileReference_ = self.gds_validate_string(fileReference_, node, 'fileReference')
            self.fileReference = fileReference_
        elif nodeName_ == 'fileStructure':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fileStructure = obj_
            obj_.original_tagname_ = 'fileStructure'
        elif nodeName_ == 'mimeType':
            mimeType_ = child_.text
            mimeType_ = self.gds_validate_string(mimeType_, node, 'mimeType')
            self.mimeType = mimeType_
        elif nodeName_ == 'compression':
            compression_ = child_.text
            compression_ = self.gds_validate_string(compression_, node, 'compression')
            self.compression = compression_
# end class FileType


class CoverageFunctionType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, MappingRule=None, CoverageMappingRule=None, GridFunction=None):
        self.original_tagname_ = None
        self.MappingRule = MappingRule
        self.CoverageMappingRule = CoverageMappingRule
        self.GridFunction = GridFunction
    def factory(*args_, **kwargs_):
        if CoverageFunctionType.subclass:
            return CoverageFunctionType.subclass(*args_, **kwargs_)
        else:
            return CoverageFunctionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MappingRule(self): return self.MappingRule
    def set_MappingRule(self, MappingRule): self.MappingRule = MappingRule
    def get_CoverageMappingRule(self): return self.CoverageMappingRule
    def set_CoverageMappingRule(self, CoverageMappingRule): self.CoverageMappingRule = CoverageMappingRule
    def get_GridFunction(self): return self.GridFunction
    def set_GridFunction(self, GridFunction): self.GridFunction = GridFunction
    def hasContent_(self):
        if (
            self.MappingRule is not None or
            self.CoverageMappingRule is not None or
            self.GridFunction is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CoverageFunctionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CoverageFunctionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CoverageFunctionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CoverageFunctionType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CoverageFunctionType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MappingRule is not None:
            self.MappingRule.export(outfile, level, namespace_='gml:', name_='MappingRule', pretty_print=pretty_print)
        if self.CoverageMappingRule is not None:
            self.CoverageMappingRule.export(outfile, level, namespace_='gml:', name_='CoverageMappingRule', pretty_print=pretty_print)
        if self.GridFunction is not None:
            self.GridFunction.export(outfile, level, namespace_='gml:', name_='GridFunction', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CoverageFunctionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MappingRule is not None:
            showIndent(outfile, level)
            outfile.write('MappingRule=model_.MappingRule(\n')
            self.MappingRule.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CoverageMappingRule is not None:
            showIndent(outfile, level)
            outfile.write('CoverageMappingRule=model_.CoverageMappingRule(\n')
            self.CoverageMappingRule.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.GridFunction is not None:
            showIndent(outfile, level)
            outfile.write('GridFunction=model_.GridFunction(\n')
            self.GridFunction.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MappingRule':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.MappingRule = obj_
            obj_.original_tagname_ = 'MappingRule'
        elif nodeName_ == 'CoverageMappingRule':
            obj_ = MappingRuleType.factory()
            obj_.build(child_)
            self.CoverageMappingRule = obj_
            obj_.original_tagname_ = 'CoverageMappingRule'
        elif nodeName_ == 'GridFunction':
            obj_ = GridFunctionType.factory()
            obj_.build(child_)
            self.GridFunction = obj_
            obj_.original_tagname_ = 'GridFunction'
# end class CoverageFunctionType


class MappingRuleType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, ruleDefinition=None, ruleReference=None):
        self.original_tagname_ = None
        self.ruleDefinition = ruleDefinition
        self.ruleReference = ruleReference
    def factory(*args_, **kwargs_):
        if MappingRuleType.subclass:
            return MappingRuleType.subclass(*args_, **kwargs_)
        else:
            return MappingRuleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ruleDefinition(self): return self.ruleDefinition
    def set_ruleDefinition(self, ruleDefinition): self.ruleDefinition = ruleDefinition
    def get_ruleReference(self): return self.ruleReference
    def set_ruleReference(self, ruleReference): self.ruleReference = ruleReference
    def hasContent_(self):
        if (
            self.ruleDefinition is not None or
            self.ruleReference is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MappingRuleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MappingRuleType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MappingRuleType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MappingRuleType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MappingRuleType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ruleDefinition is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sruleDefinition>%s</%sruleDefinition>%s' % (namespace_, self.gds_format_string(quote_xml(self.ruleDefinition).encode(ExternalEncoding), input_name='ruleDefinition'), namespace_, eol_))
        if self.ruleReference is not None:
            self.ruleReference.export(outfile, level, namespace_, name_='ruleReference', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MappingRuleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ruleDefinition is not None:
            showIndent(outfile, level)
            outfile.write('ruleDefinition=%s,\n' % quote_python(self.ruleDefinition).encode(ExternalEncoding))
        if self.ruleReference is not None:
            showIndent(outfile, level)
            outfile.write('ruleReference=model_.ReferenceType(\n')
            self.ruleReference.exportLiteral(outfile, level, name_='ruleReference')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ruleDefinition':
            ruleDefinition_ = child_.text
            ruleDefinition_ = self.gds_validate_string(ruleDefinition_, node, 'ruleDefinition')
            self.ruleDefinition = ruleDefinition_
        elif nodeName_ == 'ruleReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.ruleReference = obj_
            obj_.original_tagname_ = 'ruleReference'
# end class MappingRuleType


class GridFunctionType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, sequenceRule=None, startPoint=None):
        self.original_tagname_ = None
        self.sequenceRule = sequenceRule
        self.startPoint = startPoint
    def factory(*args_, **kwargs_):
        if GridFunctionType.subclass:
            return GridFunctionType.subclass(*args_, **kwargs_)
        else:
            return GridFunctionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_sequenceRule(self): return self.sequenceRule
    def set_sequenceRule(self, sequenceRule): self.sequenceRule = sequenceRule
    def get_startPoint(self): return self.startPoint
    def set_startPoint(self, startPoint): self.startPoint = startPoint
    def validate_integerList(self, value):
        # Validate type integerList, a restriction on integer.
        pass
    def hasContent_(self):
        if (
            self.sequenceRule is not None or
            self.startPoint is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GridFunctionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GridFunctionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GridFunctionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GridFunctionType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GridFunctionType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.sequenceRule is not None:
            self.sequenceRule.export(outfile, level, namespace_, name_='sequenceRule', pretty_print=pretty_print)
        if self.startPoint is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sstartPoint>%s</%sstartPoint>%s' % (namespace_, self.gds_format_integer_list(self.startPoint, input_name='startPoint'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='GridFunctionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.sequenceRule is not None:
            showIndent(outfile, level)
            outfile.write('sequenceRule=model_.SequenceRuleType(\n')
            self.sequenceRule.exportLiteral(outfile, level, name_='sequenceRule')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.startPoint is not None:
            showIndent(outfile, level)
            outfile.write('startPoint=%d,\n' % self.startPoint)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'sequenceRule':
            obj_ = SequenceRuleType.factory()
            obj_.build(child_)
            self.sequenceRule = obj_
            obj_.original_tagname_ = 'sequenceRule'
        elif nodeName_ == 'startPoint':
            startPoint_ = child_.text
            startPoint_ = self.gds_validate_integer_list(startPoint_, node, 'startPoint')
            self.startPoint = startPoint_
            self.startPoint = self.startPoint.split()
            self.validate_integerList(self.startPoint)    # validate type integerList
# end class GridFunctionType


class SequenceRuleType(GeneratedsSuper):
    """The gml:SequenceRuleType is derived from the
    gml:SequenceRuleEnumeration through the addition of an axisOrder
    attribute. The gml:SequenceRuleEnumeration is an enumerated
    type. The rule names are defined in ISO 19123. If no rule name
    is specified the default is "Linear"."""
    subclass = None
    superclass = None
    def __init__(self, axisOrder=None, order=None, valueOf_=None):
        self.original_tagname_ = None
        self.axisOrder = _cast(None, axisOrder)
        self.order = _cast(None, order)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SequenceRuleType.subclass:
            return SequenceRuleType.subclass(*args_, **kwargs_)
        else:
            return SequenceRuleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_axisOrder(self): return self.axisOrder
    def set_axisOrder(self, axisOrder): self.axisOrder = axisOrder
    def get_order(self): return self.order
    def set_order(self, order): self.order = order
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SequenceRuleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SequenceRuleType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SequenceRuleType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SequenceRuleType'):
        if self.axisOrder is not None and 'axisOrder' not in already_processed:
            already_processed.add('axisOrder')
            outfile.write(' axisOrder=%s' % (quote_attrib(self.axisOrder), ))
        if self.order is not None and 'order' not in already_processed:
            already_processed.add('order')
            outfile.write(' order=%s' % (quote_attrib(self.order), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SequenceRuleType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='SequenceRuleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.axisOrder is not None and 'axisOrder' not in already_processed:
            already_processed.add('axisOrder')
            showIndent(outfile, level)
            outfile.write('axisOrder=%s,\n' % (self.axisOrder,))
        if self.order is not None and 'order' not in already_processed:
            already_processed.add('order')
            showIndent(outfile, level)
            outfile.write('order=%s,\n' % (self.order,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('axisOrder', node)
        if value is not None and 'axisOrder' not in already_processed:
            already_processed.add('axisOrder')
            self.axisOrder = value
        value = find_attr_value_('order', node)
        if value is not None and 'order' not in already_processed:
            already_processed.add('order')
            self.order = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SequenceRuleType


class AbstractFeatureType(AbstractGMLType):
    """The basic feature model is given by the gml:AbstractFeatureType. The
    content model for gml:AbstractFeatureType adds two specific
    properties suitable for geographic features to the content model
    defined in gml:AbstractGMLType. The value of the gml:boundedBy
    property describes an envelope that encloses the entire feature
    instance, and is primarily useful for supporting rapid searching
    for features that occur in a particular location. The value of
    the gml:location property describes the extent, position or
    relative location of the feature."""
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractFeatureType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.boundedBy = boundedBy
        self.location = location
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractFeatureType.subclass:
            return AbstractFeatureType.subclass(*args_, **kwargs_)
        else:
            return AbstractFeatureType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_boundedBy(self): return self.boundedBy
    def set_boundedBy(self, boundedBy): self.boundedBy = boundedBy
    def get_location(self): return self.location
    def set_location(self, location): self.location = location
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.boundedBy is not None or
            self.location is not None or
            super(AbstractFeatureType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractFeatureType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractFeatureType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractFeatureType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractFeatureType'):
        super(AbstractFeatureType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractFeatureType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractFeatureType', fromsubclass_=False, pretty_print=True):
        super(AbstractFeatureType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.boundedBy is not None:
            self.boundedBy.export(outfile, level, namespace_='gml:', name_='boundedBy', pretty_print=pretty_print)
        if self.location is not None:
            self.location.export(outfile, level, namespace_='gml:', name_='location', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractFeatureType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractFeatureType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractFeatureType, self).exportLiteralChildren(outfile, level, name_)
        if self.boundedBy is not None:
            showIndent(outfile, level)
            outfile.write('boundedBy=model_.boundedBy(\n')
            self.boundedBy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.location is not None:
            showIndent(outfile, level)
            outfile.write('location=model_.DirectPositionType(\n')
            self.location.exportLiteral(outfile, level, name_='location')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractFeatureType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'boundedBy':
            obj_ = BoundingShapeType.factory()
            obj_.build(child_)
            self.boundedBy = obj_
            obj_.original_tagname_ = 'boundedBy'
        elif nodeName_ == 'location':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'priorityLocation':
            obj_ = PriorityLocationPropertyType.factory()
            obj_.build(child_)
            self.priorityLocation = obj_
            obj_.original_tagname_ = 'priorityLocation'
        super(AbstractFeatureType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractFeatureType


class FeaturePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, AbstractFeature=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.AbstractFeature = AbstractFeature
    def factory(*args_, **kwargs_):
        if FeaturePropertyType.subclass:
            return FeaturePropertyType.subclass(*args_, **kwargs_)
        else:
            return FeaturePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractFeature(self): return self.AbstractFeature
    def set_AbstractFeature(self, AbstractFeature): self.AbstractFeature = AbstractFeature
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractFeature is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FeaturePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FeaturePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FeaturePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FeaturePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FeaturePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractFeature is not None:
            self.AbstractFeature.export(outfile, level, namespace_, name_='AbstractFeature', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='FeaturePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractFeatureType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractFeatureType=model_.AbstractFeatureType(\n')
            self.AbstractFeatureType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractFeature':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeature> element')
            self.AbstractFeature = obj_
            obj_.original_tagname_ = 'AbstractFeature'
        elif nodeName_ == 'DynamicFeature':
            class_obj_ = self.get_class_obj_(child_, DynamicFeatureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DynamicFeature = obj_
            obj_.original_tagname_ = 'DynamicFeature'
        elif nodeName_ == 'AbstractCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoverage> element')
            self.AbstractCoverage = obj_
            obj_.original_tagname_ = 'AbstractCoverage'
        elif nodeName_ == 'AbstractContinuousCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractContinuousCoverage> element')
            self.AbstractContinuousCoverage = obj_
            obj_.original_tagname_ = 'AbstractContinuousCoverage'
        elif nodeName_ == 'Observation':
            class_obj_ = self.get_class_obj_(child_, ObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Observation = obj_
            obj_.original_tagname_ = 'Observation'
        elif nodeName_ == 'AbstractFeatureCollection':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeatureCollection> element')
            self.AbstractFeatureCollection = obj_
            obj_.original_tagname_ = 'AbstractFeatureCollection'
        elif nodeName_ == 'FeatureCollection':
            obj_ = FeatureCollectionType.factory()
            obj_.build(child_)
            self.FeatureCollection = obj_
            obj_.original_tagname_ = 'FeatureCollection'
        elif nodeName_ == 'DynamicFeatureCollection':
            obj_ = DynamicFeatureCollectionType.factory()
            obj_.build(child_)
            self.DynamicFeatureCollection = obj_
            obj_.original_tagname_ = 'DynamicFeatureCollection'
        elif nodeName_ == 'AbstractDiscreteCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage = obj_
            obj_.original_tagname_ = 'AbstractDiscreteCoverage'
        elif nodeName_ == 'MultiPointCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiPointCoverage = obj_
            obj_.original_tagname_ = 'MultiPointCoverage'
        elif nodeName_ == 'MultiCurveCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiCurveCoverage = obj_
            obj_.original_tagname_ = 'MultiCurveCoverage'
        elif nodeName_ == 'MultiSurfaceCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiSurfaceCoverage = obj_
            obj_.original_tagname_ = 'MultiSurfaceCoverage'
        elif nodeName_ == 'MultiSolidCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiSolidCoverage = obj_
            obj_.original_tagname_ = 'MultiSolidCoverage'
        elif nodeName_ == 'GridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.GridCoverage = obj_
            obj_.original_tagname_ = 'GridCoverage'
        elif nodeName_ == 'RectifiedGridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.RectifiedGridCoverage = obj_
            obj_.original_tagname_ = 'RectifiedGridCoverage'
        elif nodeName_ == 'DirectedObservation':
            class_obj_ = self.get_class_obj_(child_, DirectedObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DirectedObservation = obj_
            obj_.original_tagname_ = 'DirectedObservation'
        elif nodeName_ == 'DirectedObservationAtDistance':
            obj_ = DirectedObservationAtDistanceType.factory()
            obj_.build(child_)
            self.DirectedObservationAtDistance = obj_
            obj_.original_tagname_ = 'DirectedObservationAtDistance'
# end class FeaturePropertyType


class BoundingShapeType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Envelope=None, Null=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Envelope = Envelope
        self.Null = Null
    def factory(*args_, **kwargs_):
        if BoundingShapeType.subclass:
            return BoundingShapeType.subclass(*args_, **kwargs_)
        else:
            return BoundingShapeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Envelope(self): return self.Envelope
    def set_Envelope(self, Envelope): self.Envelope = Envelope
    def get_Null(self): return self.Null
    def set_Null(self, Null): self.Null = Null
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Envelope is not None or
            self.Null is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BoundingShapeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BoundingShapeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BoundingShapeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BoundingShapeType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BoundingShapeType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Envelope is not None:
            self.Envelope.export(outfile, level, namespace_='gml:', name_='Envelope', pretty_print=pretty_print)
        if self.Null is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNull>%s</%sNull>%s' % ('gml:', self.gds_format_string(quote_xml(self.Null).encode(ExternalEncoding), input_name='Null'), 'gml:', eol_))
    def exportLiteral(self, outfile, level, name_='BoundingShapeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Envelope is not None:
            showIndent(outfile, level)
            outfile.write('Envelope=model_.EnvelopeType(\n')
            self.Envelope.exportLiteral(outfile, level, name_='Envelope')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Null is not None:
            showIndent(outfile, level)
            outfile.write('Null=%s,\n' % quote_python(self.Null).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Envelope':
            class_obj_ = self.get_class_obj_(child_, EnvelopeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Envelope = obj_
            obj_.original_tagname_ = 'Envelope'
        elif nodeName_ == 'EnvelopeWithTimePeriod':
            obj_ = EnvelopeWithTimePeriodType.factory()
            obj_.build(child_)
            self.EnvelopeWithTimePeriod = obj_
            obj_.original_tagname_ = 'EnvelopeWithTimePeriod'
        elif nodeName_ == 'Null':
            Null_ = child_.text
            Null_ = self.gds_validate_string(Null_, node, 'Null')
            self.Null = Null_
# end class BoundingShapeType


class EnvelopeWithTimePeriodType(EnvelopeType):
    subclass = None
    superclass = EnvelopeType
    def __init__(self, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, lowerCorner=None, upperCorner=None, pos=None, coordinates=None, frame='#ISO-8601', beginPosition=None, endPosition=None):
        self.original_tagname_ = None
        super(EnvelopeWithTimePeriodType, self).__init__(srsName, axisLabels, uomLabels, srsDimension, lowerCorner, upperCorner, pos, coordinates, )
        self.frame = _cast(None, frame)
        self.beginPosition = beginPosition
        self.endPosition = endPosition
    def factory(*args_, **kwargs_):
        if EnvelopeWithTimePeriodType.subclass:
            return EnvelopeWithTimePeriodType.subclass(*args_, **kwargs_)
        else:
            return EnvelopeWithTimePeriodType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_beginPosition(self): return self.beginPosition
    def set_beginPosition(self, beginPosition): self.beginPosition = beginPosition
    def get_endPosition(self): return self.endPosition
    def set_endPosition(self, endPosition): self.endPosition = endPosition
    def get_frame(self): return self.frame
    def set_frame(self, frame): self.frame = frame
    def hasContent_(self):
        if (
            self.beginPosition is not None or
            self.endPosition is not None or
            super(EnvelopeWithTimePeriodType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EnvelopeWithTimePeriodType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EnvelopeWithTimePeriodType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EnvelopeWithTimePeriodType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EnvelopeWithTimePeriodType'):
        super(EnvelopeWithTimePeriodType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EnvelopeWithTimePeriodType')
        if self.frame is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            outfile.write(' frame=%s' % (self.gds_format_string(quote_attrib(self.frame).encode(ExternalEncoding), input_name='frame'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EnvelopeWithTimePeriodType', fromsubclass_=False, pretty_print=True):
        super(EnvelopeWithTimePeriodType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.beginPosition is not None:
            self.beginPosition.export(outfile, level, namespace_, name_='beginPosition', pretty_print=pretty_print)
        if self.endPosition is not None:
            self.endPosition.export(outfile, level, namespace_, name_='endPosition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EnvelopeWithTimePeriodType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.frame is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            showIndent(outfile, level)
            outfile.write('frame="%s",\n' % (self.frame,))
        super(EnvelopeWithTimePeriodType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EnvelopeWithTimePeriodType, self).exportLiteralChildren(outfile, level, name_)
        if self.beginPosition is not None:
            showIndent(outfile, level)
            outfile.write('beginPosition=model_.TimePositionType(\n')
            self.beginPosition.exportLiteral(outfile, level, name_='beginPosition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.endPosition is not None:
            showIndent(outfile, level)
            outfile.write('endPosition=model_.TimePositionType(\n')
            self.endPosition.exportLiteral(outfile, level, name_='endPosition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('frame', node)
        if value is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            self.frame = value
        super(EnvelopeWithTimePeriodType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'beginPosition':
            obj_ = TimePositionType.factory()
            obj_.build(child_)
            self.beginPosition = obj_
            obj_.original_tagname_ = 'beginPosition'
        elif nodeName_ == 'endPosition':
            obj_ = TimePositionType.factory()
            obj_.build(child_)
            self.endPosition = obj_
            obj_.original_tagname_ = 'endPosition'
        super(EnvelopeWithTimePeriodType, self).buildChildren(child_, node, nodeName_, True)
# end class EnvelopeWithTimePeriodType


class AbstractFeatureMemberType(GeneratedsSuper):
    """To create a collection of GML features, a property type shall be
    derived by extension from gml:AbstractFeatureMemberType. By
    default, this abstract property type does not imply any
    ownership of the features in the collection. The owns attribute
    of gml:OwnershipAttributeGroup may be used on a property element
    instance to assert ownership of a feature in the collection. A
    collection shall not own a feature already owned by another
    object."""
    subclass = None
    superclass = None
    def __init__(self, owns=False, extensiontype_=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractFeatureMemberType.subclass:
            return AbstractFeatureMemberType.subclass(*args_, **kwargs_)
        else:
            return AbstractFeatureMemberType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractFeatureMemberType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractFeatureMemberType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractFeatureMemberType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractFeatureMemberType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractFeatureMemberType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractFeatureMemberType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractFeatureMemberType


class AbstractTimeObjectType(AbstractGMLType):
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTimeObjectType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTimeObjectType.subclass:
            return AbstractTimeObjectType.subclass(*args_, **kwargs_)
        else:
            return AbstractTimeObjectType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractTimeObjectType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTimeObjectType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeObjectType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTimeObjectType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTimeObjectType'):
        super(AbstractTimeObjectType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeObjectType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTimeObjectType', fromsubclass_=False, pretty_print=True):
        super(AbstractTimeObjectType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTimeObjectType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTimeObjectType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTimeObjectType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTimeObjectType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractTimeObjectType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractTimeObjectType


class AbstractTimePrimitiveType(AbstractTimeObjectType):
    subclass = None
    superclass = AbstractTimeObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTimePrimitiveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        if relatedTime is None:
            self.relatedTime = []
        else:
            self.relatedTime = relatedTime
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTimePrimitiveType.subclass:
            return AbstractTimePrimitiveType.subclass(*args_, **kwargs_)
        else:
            return AbstractTimePrimitiveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_relatedTime(self): return self.relatedTime
    def set_relatedTime(self, relatedTime): self.relatedTime = relatedTime
    def add_relatedTime(self, value): self.relatedTime.append(value)
    def insert_relatedTime_at(self, index, value): self.relatedTime.insert(index, value)
    def replace_relatedTime_at(self, index, value): self.relatedTime[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.relatedTime or
            super(AbstractTimePrimitiveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTimePrimitiveType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimePrimitiveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTimePrimitiveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTimePrimitiveType'):
        super(AbstractTimePrimitiveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimePrimitiveType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTimePrimitiveType', fromsubclass_=False, pretty_print=True):
        super(AbstractTimePrimitiveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for relatedTime_ in self.relatedTime:
            relatedTime_.export(outfile, level, namespace_, name_='relatedTime', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTimePrimitiveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTimePrimitiveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTimePrimitiveType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('relatedTime=[\n')
        level += 1
        for relatedTime_ in self.relatedTime:
            showIndent(outfile, level)
            outfile.write('model_.RelatedTimeType(\n')
            relatedTime_.exportLiteral(outfile, level, name_='RelatedTimeType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTimePrimitiveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'relatedTime':
            obj_ = RelatedTimeType.factory()
            obj_.build(child_)
            self.relatedTime.append(obj_)
            obj_.original_tagname_ = 'relatedTime'
        super(AbstractTimePrimitiveType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractTimePrimitiveType


class TimePrimitivePropertyType(GeneratedsSuper):
    """gml:TimePrimitivePropertyType provides a standard content model for
    associations between an arbitrary member of the substitution
    group whose head is gml:AbstractTimePrimitive and another
    object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractTimePrimitive=None, extensiontype_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractTimePrimitive = AbstractTimePrimitive
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if TimePrimitivePropertyType.subclass:
            return TimePrimitivePropertyType.subclass(*args_, **kwargs_)
        else:
            return TimePrimitivePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractTimePrimitive(self): return self.AbstractTimePrimitive
    def set_AbstractTimePrimitive(self, AbstractTimePrimitive): self.AbstractTimePrimitive = AbstractTimePrimitive
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.AbstractTimePrimitive is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimePrimitivePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimePrimitivePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimePrimitivePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimePrimitivePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimePrimitivePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractTimePrimitive is not None:
            self.AbstractTimePrimitive.export(outfile, level, namespace_, name_='AbstractTimePrimitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimePrimitivePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractTimePrimitiveType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTimePrimitiveType=model_.AbstractTimePrimitiveType(\n')
            self.AbstractTimePrimitiveType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractTimePrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimePrimitive> element')
            self.AbstractTimePrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimePrimitive'
        elif nodeName_ == 'AbstractTimeGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeGeometricPrimitive> element')
            self.AbstractTimeGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeGeometricPrimitive'
        elif nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimeTopologyPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.TimeInstant = obj_
            obj_.original_tagname_ = 'TimeInstant'
        elif nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.TimePeriod = obj_
            obj_.original_tagname_ = 'TimePeriod'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
# end class TimePrimitivePropertyType


class RelatedTimeType(TimePrimitivePropertyType):
    """gml:RelatedTimeType provides a content model for indicating the
    relative position of an arbitrary member of the substitution
    group whose head is gml:AbstractTimePrimitive. It extends the
    generic gml:TimePrimitivePropertyType with an XML attribute
    relativePosition, whose value is selected from the set of 13
    temporal relationships identified by Allen (1983)"""
    subclass = None
    superclass = TimePrimitivePropertyType
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractTimePrimitive=None, relativePosition=None):
        self.original_tagname_ = None
        super(RelatedTimeType, self).__init__(nilReason, owns, title, show, actuate, href, role, arcrole, remoteSchema, type_, AbstractTimePrimitive, )
        self.relativePosition = _cast(None, relativePosition)
    def factory(*args_, **kwargs_):
        if RelatedTimeType.subclass:
            return RelatedTimeType.subclass(*args_, **kwargs_)
        else:
            return RelatedTimeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_relativePosition(self): return self.relativePosition
    def set_relativePosition(self, relativePosition): self.relativePosition = relativePosition
    def hasContent_(self):
        if (
            super(RelatedTimeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RelatedTimeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RelatedTimeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RelatedTimeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RelatedTimeType'):
        super(RelatedTimeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RelatedTimeType')
        if self.relativePosition is not None and 'relativePosition' not in already_processed:
            already_processed.add('relativePosition')
            outfile.write(' relativePosition=%s' % (self.gds_format_string(quote_attrib(self.relativePosition).encode(ExternalEncoding), input_name='relativePosition'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RelatedTimeType', fromsubclass_=False, pretty_print=True):
        super(RelatedTimeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RelatedTimeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.relativePosition is not None and 'relativePosition' not in already_processed:
            already_processed.add('relativePosition')
            showIndent(outfile, level)
            outfile.write('relativePosition="%s",\n' % (self.relativePosition,))
        super(RelatedTimeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(RelatedTimeType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('relativePosition', node)
        if value is not None and 'relativePosition' not in already_processed:
            already_processed.add('relativePosition')
            self.relativePosition = value
        super(RelatedTimeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(RelatedTimeType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class RelatedTimeType


class AbstractTimeComplexType(AbstractTimeObjectType):
    subclass = None
    superclass = AbstractTimeObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTimeComplexType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTimeComplexType.subclass:
            return AbstractTimeComplexType.subclass(*args_, **kwargs_)
        else:
            return AbstractTimeComplexType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractTimeComplexType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTimeComplexType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeComplexType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTimeComplexType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTimeComplexType'):
        super(AbstractTimeComplexType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeComplexType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTimeComplexType', fromsubclass_=False, pretty_print=True):
        super(AbstractTimeComplexType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTimeComplexType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTimeComplexType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTimeComplexType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTimeComplexType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractTimeComplexType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractTimeComplexType


class AbstractTimeGeometricPrimitiveType(AbstractTimePrimitiveType):
    subclass = None
    superclass = AbstractTimePrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, frame='#ISO-8601', extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTimeGeometricPrimitiveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, relatedTime, extensiontype_, )
        self.frame = _cast(None, frame)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTimeGeometricPrimitiveType.subclass:
            return AbstractTimeGeometricPrimitiveType.subclass(*args_, **kwargs_)
        else:
            return AbstractTimeGeometricPrimitiveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_frame(self): return self.frame
    def set_frame(self, frame): self.frame = frame
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractTimeGeometricPrimitiveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTimeGeometricPrimitiveType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeGeometricPrimitiveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTimeGeometricPrimitiveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTimeGeometricPrimitiveType'):
        super(AbstractTimeGeometricPrimitiveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeGeometricPrimitiveType')
        if self.frame is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            outfile.write(' frame=%s' % (self.gds_format_string(quote_attrib(self.frame).encode(ExternalEncoding), input_name='frame'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTimeGeometricPrimitiveType', fromsubclass_=False, pretty_print=True):
        super(AbstractTimeGeometricPrimitiveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTimeGeometricPrimitiveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.frame is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            showIndent(outfile, level)
            outfile.write('frame="%s",\n' % (self.frame,))
        super(AbstractTimeGeometricPrimitiveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTimeGeometricPrimitiveType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('frame', node)
        if value is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            self.frame = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTimeGeometricPrimitiveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractTimeGeometricPrimitiveType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractTimeGeometricPrimitiveType


class TimeInstantType(AbstractTimeGeometricPrimitiveType):
    subclass = None
    superclass = AbstractTimeGeometricPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, frame='#ISO-8601', timePosition=None):
        self.original_tagname_ = None
        super(TimeInstantType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, relatedTime, frame, )
        self.timePosition = timePosition
    def factory(*args_, **kwargs_):
        if TimeInstantType.subclass:
            return TimeInstantType.subclass(*args_, **kwargs_)
        else:
            return TimeInstantType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_timePosition(self): return self.timePosition
    def set_timePosition(self, timePosition): self.timePosition = timePosition
    def hasContent_(self):
        if (
            self.timePosition is not None or
            super(TimeInstantType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeInstantType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeInstantType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeInstantType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeInstantType'):
        super(TimeInstantType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeInstantType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeInstantType', fromsubclass_=False, pretty_print=True):
        super(TimeInstantType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.timePosition is not None:
            self.timePosition.export(outfile, level, namespace_='gml:', name_='timePosition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeInstantType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeInstantType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeInstantType, self).exportLiteralChildren(outfile, level, name_)
        if self.timePosition is not None:
            showIndent(outfile, level)
            outfile.write('timePosition=model_.timePosition(\n')
            self.timePosition.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeInstantType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'timePosition':
            obj_ = TimePositionType.factory()
            obj_.build(child_)
            self.timePosition = obj_
            obj_.original_tagname_ = 'timePosition'
        super(TimeInstantType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeInstantType


class TimeInstantPropertyType(GeneratedsSuper):
    """gml:TimeInstantPropertyType provides for associating a
    gml:TimeInstant with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TimeInstant=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TimeInstant = TimeInstant
    def factory(*args_, **kwargs_):
        if TimeInstantPropertyType.subclass:
            return TimeInstantPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeInstantPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeInstant(self): return self.TimeInstant
    def set_TimeInstant(self, TimeInstant): self.TimeInstant = TimeInstant
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeInstant is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeInstantPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeInstantPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeInstantPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeInstantPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeInstantPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeInstant is not None:
            self.TimeInstant.export(outfile, level, namespace_='gml:', name_='TimeInstant', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeInstantPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeInstant is not None:
            showIndent(outfile, level)
            outfile.write('TimeInstant=model_.TimeInstantType(\n')
            self.TimeInstant.exportLiteral(outfile, level, name_='TimeInstant')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.TimeInstant = obj_
            obj_.original_tagname_ = 'TimeInstant'
# end class TimeInstantPropertyType


class TimePeriodType(AbstractTimeGeometricPrimitiveType):
    subclass = None
    superclass = AbstractTimeGeometricPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, frame='#ISO-8601', beginPosition=None, begin=None, endPosition=None, end=None, duration=None, timeInterval=None):
        self.original_tagname_ = None
        super(TimePeriodType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, relatedTime, frame, )
        self.beginPosition = beginPosition
        self.begin = begin
        self.endPosition = endPosition
        self.end = end
        self.duration = duration
        self.timeInterval = timeInterval
    def factory(*args_, **kwargs_):
        if TimePeriodType.subclass:
            return TimePeriodType.subclass(*args_, **kwargs_)
        else:
            return TimePeriodType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_beginPosition(self): return self.beginPosition
    def set_beginPosition(self, beginPosition): self.beginPosition = beginPosition
    def get_begin(self): return self.begin
    def set_begin(self, begin): self.begin = begin
    def get_endPosition(self): return self.endPosition
    def set_endPosition(self, endPosition): self.endPosition = endPosition
    def get_end(self): return self.end
    def set_end(self, end): self.end = end
    def get_duration(self): return self.duration
    def set_duration(self, duration): self.duration = duration
    def get_timeInterval(self): return self.timeInterval
    def set_timeInterval(self, timeInterval): self.timeInterval = timeInterval
    def hasContent_(self):
        if (
            self.beginPosition is not None or
            self.begin is not None or
            self.endPosition is not None or
            self.end is not None or
            self.duration is not None or
            self.timeInterval is not None or
            super(TimePeriodType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimePeriodType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimePeriodType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimePeriodType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimePeriodType'):
        super(TimePeriodType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimePeriodType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimePeriodType', fromsubclass_=False, pretty_print=True):
        super(TimePeriodType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.beginPosition is not None:
            self.beginPosition.export(outfile, level, namespace_, name_='beginPosition', pretty_print=pretty_print)
        if self.begin is not None:
            self.begin.export(outfile, level, namespace_, name_='begin', pretty_print=pretty_print)
        if self.endPosition is not None:
            self.endPosition.export(outfile, level, namespace_, name_='endPosition', pretty_print=pretty_print)
        if self.end is not None:
            self.end.export(outfile, level, namespace_, name_='end', pretty_print=pretty_print)
        if self.duration is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sduration>%s</%sduration>%s' % ('gml:', self.gds_format_string(quote_xml(self.duration).encode(ExternalEncoding), input_name='duration'), 'gml:', eol_))
        if self.timeInterval is not None:
            self.timeInterval.export(outfile, level, namespace_='gml:', name_='timeInterval', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimePeriodType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimePeriodType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimePeriodType, self).exportLiteralChildren(outfile, level, name_)
        if self.beginPosition is not None:
            showIndent(outfile, level)
            outfile.write('beginPosition=model_.TimePositionType(\n')
            self.beginPosition.exportLiteral(outfile, level, name_='beginPosition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.begin is not None:
            showIndent(outfile, level)
            outfile.write('begin=model_.TimeInstantPropertyType(\n')
            self.begin.exportLiteral(outfile, level, name_='begin')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.endPosition is not None:
            showIndent(outfile, level)
            outfile.write('endPosition=model_.TimePositionType(\n')
            self.endPosition.exportLiteral(outfile, level, name_='endPosition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.end is not None:
            showIndent(outfile, level)
            outfile.write('end=model_.TimeInstantPropertyType(\n')
            self.end.exportLiteral(outfile, level, name_='end')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.duration is not None:
            showIndent(outfile, level)
            outfile.write('duration=%s,\n' % quote_python(self.duration).encode(ExternalEncoding))
        if self.timeInterval is not None:
            showIndent(outfile, level)
            outfile.write('timeInterval=model_.timeInterval(\n')
            self.timeInterval.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimePeriodType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'beginPosition':
            obj_ = TimePositionType.factory()
            obj_.build(child_)
            self.beginPosition = obj_
            obj_.original_tagname_ = 'beginPosition'
        elif nodeName_ == 'begin':
            obj_ = TimeInstantPropertyType.factory()
            obj_.build(child_)
            self.begin = obj_
            obj_.original_tagname_ = 'begin'
        elif nodeName_ == 'endPosition':
            obj_ = TimePositionType.factory()
            obj_.build(child_)
            self.endPosition = obj_
            obj_.original_tagname_ = 'endPosition'
        elif nodeName_ == 'end':
            obj_ = TimeInstantPropertyType.factory()
            obj_.build(child_)
            self.end = obj_
            obj_.original_tagname_ = 'end'
        elif nodeName_ == 'duration':
            duration_ = child_.text
            duration_ = self.gds_validate_string(duration_, node, 'duration')
            self.duration = duration_
        elif nodeName_ == 'timeInterval':
            obj_ = TimeIntervalLengthType.factory()
            obj_.build(child_)
            self.timeInterval = obj_
            obj_.original_tagname_ = 'timeInterval'
        super(TimePeriodType, self).buildChildren(child_, node, nodeName_, True)
# end class TimePeriodType


class TimePeriodPropertyType(GeneratedsSuper):
    """gml:TimePeriodPropertyType provides for associating a gml:TimePeriod
    with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TimePeriod=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TimePeriod = TimePeriod
    def factory(*args_, **kwargs_):
        if TimePeriodPropertyType.subclass:
            return TimePeriodPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimePeriodPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimePeriod(self): return self.TimePeriod
    def set_TimePeriod(self, TimePeriod): self.TimePeriod = TimePeriod
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimePeriod is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimePeriodPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimePeriodPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimePeriodPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimePeriodPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimePeriodPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimePeriod is not None:
            self.TimePeriod.export(outfile, level, namespace_='gml:', name_='TimePeriod', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimePeriodPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimePeriod is not None:
            showIndent(outfile, level)
            outfile.write('TimePeriod=model_.TimePeriodType(\n')
            self.TimePeriod.exportLiteral(outfile, level, name_='TimePeriod')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.TimePeriod = obj_
            obj_.original_tagname_ = 'TimePeriod'
# end class TimePeriodPropertyType


class TimePositionType(GeneratedsSuper):
    """The method for identifying a temporal position is specific to each
    temporal reference system. gml:TimePositionType supports the
    description of temporal position according to the subtypes
    described in ISO 19108. Values based on calendars and clocks use
    lexical formats that are based on ISO 8601, as described in XML
    Schema Part 2:2001. A decimal value may be used with coordinate
    systems such as GPS time or UNIX time. A URI may be used to
    provide a reference to some era in an ordinal reference system .
    In common with many of the components modelled as data types in
    the ISO 19100 series of International Standards, the
    corresponding GML component has simple content. However, the
    content model gml:TimePositionType is defined in several steps.
    Three XML attributes appear on gml:TimePositionType: A time
    value shall be associated with a temporal reference system
    through the frame attribute that provides a URI reference that
    identifies a description of the reference system. Following ISO
    19108, the Gregorian calendar with UTC is the default reference
    system, but others may also be used. Components for describing
    temporal reference systems are described in 14.4, but it is not
    required that the reference system be described in this, as the
    reference may refer to anything that may be indentified with a
    URI. For time values using a calendar containing more than one
    era, the (optional) calendarEraName attribute provides the name
    of the calendar era. Inexact temporal positions may be expressed
    using the optional indeterminatePosition attribute. This takes a
    value from an enumeration."""
    subclass = None
    superclass = None
    def __init__(self, frame='#ISO-8601', indeterminatePosition=None, calendarEraName=None, valueOf_=None):
        self.original_tagname_ = None
        self.frame = _cast(None, frame)
        self.indeterminatePosition = _cast(None, indeterminatePosition)
        self.calendarEraName = _cast(None, calendarEraName)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if TimePositionType.subclass:
            return TimePositionType.subclass(*args_, **kwargs_)
        else:
            return TimePositionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_frame(self): return self.frame
    def set_frame(self, frame): self.frame = frame
    def get_indeterminatePosition(self): return self.indeterminatePosition
    def set_indeterminatePosition(self, indeterminatePosition): self.indeterminatePosition = indeterminatePosition
    def get_calendarEraName(self): return self.calendarEraName
    def set_calendarEraName(self, calendarEraName): self.calendarEraName = calendarEraName
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimePositionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimePositionType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimePositionType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimePositionType'):
        if self.frame is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            outfile.write(' frame=%s' % (self.gds_format_string(quote_attrib(self.frame).encode(ExternalEncoding), input_name='frame'), ))
        if self.indeterminatePosition is not None and 'indeterminatePosition' not in already_processed:
            already_processed.add('indeterminatePosition')
            outfile.write(' indeterminatePosition=%s' % (quote_attrib(self.indeterminatePosition), ))
        if self.calendarEraName is not None and 'calendarEraName' not in already_processed:
            already_processed.add('calendarEraName')
            outfile.write(' calendarEraName=%s' % (self.gds_format_string(quote_attrib(self.calendarEraName).encode(ExternalEncoding), input_name='calendarEraName'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimePositionType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='TimePositionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.frame is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            showIndent(outfile, level)
            outfile.write('frame="%s",\n' % (self.frame,))
        if self.indeterminatePosition is not None and 'indeterminatePosition' not in already_processed:
            already_processed.add('indeterminatePosition')
            showIndent(outfile, level)
            outfile.write('indeterminatePosition=%s,\n' % (self.indeterminatePosition,))
        if self.calendarEraName is not None and 'calendarEraName' not in already_processed:
            already_processed.add('calendarEraName')
            showIndent(outfile, level)
            outfile.write('calendarEraName="%s",\n' % (self.calendarEraName,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('frame', node)
        if value is not None and 'frame' not in already_processed:
            already_processed.add('frame')
            self.frame = value
        value = find_attr_value_('indeterminatePosition', node)
        if value is not None and 'indeterminatePosition' not in already_processed:
            already_processed.add('indeterminatePosition')
            self.indeterminatePosition = value
        value = find_attr_value_('calendarEraName', node)
        if value is not None and 'calendarEraName' not in already_processed:
            already_processed.add('calendarEraName')
            self.calendarEraName = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class TimePositionType


class TimeIntervalLengthType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, radix=None, unit=None, factor=None, valueOf_=None):
        self.original_tagname_ = None
        self.radix = _cast(int, radix)
        self.unit = _cast(None, unit)
        self.factor = _cast(int, factor)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if TimeIntervalLengthType.subclass:
            return TimeIntervalLengthType.subclass(*args_, **kwargs_)
        else:
            return TimeIntervalLengthType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_radix(self): return self.radix
    def set_radix(self, radix): self.radix = radix
    def get_unit(self): return self.unit
    def set_unit(self, unit): self.unit = unit
    def get_factor(self): return self.factor
    def set_factor(self, factor): self.factor = factor
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeIntervalLengthType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeIntervalLengthType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeIntervalLengthType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeIntervalLengthType'):
        if self.radix is not None and 'radix' not in already_processed:
            already_processed.add('radix')
            outfile.write(' radix="%s"' % self.gds_format_integer(self.radix, input_name='radix'))
        if self.unit is not None and 'unit' not in already_processed:
            already_processed.add('unit')
            outfile.write(' unit=%s' % (quote_attrib(self.unit), ))
        if self.factor is not None and 'factor' not in already_processed:
            already_processed.add('factor')
            outfile.write(' factor="%s"' % self.gds_format_integer(self.factor, input_name='factor'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeIntervalLengthType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='TimeIntervalLengthType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.radix is not None and 'radix' not in already_processed:
            already_processed.add('radix')
            showIndent(outfile, level)
            outfile.write('radix=%d,\n' % (self.radix,))
        if self.unit is not None and 'unit' not in already_processed:
            already_processed.add('unit')
            showIndent(outfile, level)
            outfile.write('unit=%s,\n' % (self.unit,))
        if self.factor is not None and 'factor' not in already_processed:
            already_processed.add('factor')
            showIndent(outfile, level)
            outfile.write('factor=%d,\n' % (self.factor,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('radix', node)
        if value is not None and 'radix' not in already_processed:
            already_processed.add('radix')
            try:
                self.radix = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.radix <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
        value = find_attr_value_('unit', node)
        if value is not None and 'unit' not in already_processed:
            already_processed.add('unit')
            self.unit = value
        value = find_attr_value_('factor', node)
        if value is not None and 'factor' not in already_processed:
            already_processed.add('factor')
            try:
                self.factor = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class TimeIntervalLengthType


class Boolean(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, valueOf_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if Boolean.subclass:
            return Boolean.subclass(*args_, **kwargs_)
        else:
            return Boolean(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Boolean', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Boolean')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Boolean', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Boolean'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Boolean', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='Boolean'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class Boolean


class Category(CodeType):
    """A gml:Category has an optional XML attribute codeSpace, whose value
    is a URI which identifies a dictionary, codelist or authority
    for the term."""
    subclass = None
    superclass = CodeType
    def __init__(self, codeSpace=None, nilReason=None, valueOf_=None):
        self.original_tagname_ = None
        super(Category, self).__init__(codeSpace, valueOf_, )
        self.nilReason = _cast(None, nilReason)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if Category.subclass:
            return Category.subclass(*args_, **kwargs_)
        else:
            return Category(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(Category, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Category', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Category')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Category', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Category'):
        super(Category, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Category')
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Category', fromsubclass_=False, pretty_print=True):
        super(Category, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='Category'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        super(Category, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(Category, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        super(Category, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class Category


class Count(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, valueOf_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if Count.subclass:
            return Count.subclass(*args_, **kwargs_)
        else:
            return Count(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Count', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Count')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Count', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Count'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Count', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='Count'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class Count


class Quantity(MeasureType):
    """An XML attribute uom ("unit of measure") is required, whose value is
    a URI which identifies the definition of a ratio scale or units
    by which the numeric value shall be multiplied, or an interval
    or position scale on which the value occurs."""
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, nilReason=None, valueOf_=None):
        self.original_tagname_ = None
        super(Quantity, self).__init__(uom, valueOf_, )
        self.nilReason = _cast(None, nilReason)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if Quantity.subclass:
            return Quantity.subclass(*args_, **kwargs_)
        else:
            return Quantity(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(Quantity, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Quantity', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Quantity')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Quantity', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Quantity'):
        super(Quantity, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Quantity')
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Quantity', fromsubclass_=False, pretty_print=True):
        super(Quantity, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='Quantity'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        super(Quantity, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(Quantity, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        super(Quantity, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class Quantity


class ValuePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractValue=None, AbstractGeometry=None, AbstractTimeObject=None, Null=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractValue = AbstractValue
        self.AbstractGeometry = AbstractGeometry
        self.AbstractTimeObject = AbstractTimeObject
        self.Null = Null
    def factory(*args_, **kwargs_):
        if ValuePropertyType.subclass:
            return ValuePropertyType.subclass(*args_, **kwargs_)
        else:
            return ValuePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractValue(self): return self.AbstractValue
    def set_AbstractValue(self, AbstractValue): self.AbstractValue = AbstractValue
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_AbstractTimeObject(self): return self.AbstractTimeObject
    def set_AbstractTimeObject(self, AbstractTimeObject): self.AbstractTimeObject = AbstractTimeObject
    def get_Null(self): return self.Null
    def set_Null(self, Null): self.Null = Null
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractValue is not None or
            self.AbstractGeometry is not None or
            self.AbstractTimeObject is not None or
            self.Null is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ValuePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ValuePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ValuePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ValuePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ValuePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAbstractValue>%s</%sAbstractValue>%s' % ('gml:', self.gds_format_string(quote_xml(self.AbstractValue).encode(ExternalEncoding), input_name='AbstractValue'), 'gml:', eol_))
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
        if self.AbstractTimeObject is not None:
            self.AbstractTimeObject.export(outfile, level, namespace_, name_='AbstractTimeObject', pretty_print=pretty_print)
        if self.Null is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNull>%s</%sNull>%s' % ('gml:', self.gds_format_string(quote_xml(self.Null).encode(ExternalEncoding), input_name='Null'), 'gml:', eol_))
    def exportLiteral(self, outfile, level, name_='ValuePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractValue is not None:
            showIndent(outfile, level)
            outfile.write('AbstractValue=%s,\n' % quote_python(self.AbstractValue).encode(ExternalEncoding))
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AbstractTimeObjectType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTimeObjectType=model_.AbstractTimeObjectType(\n')
            self.AbstractTimeObjectType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Null is not None:
            showIndent(outfile, level)
            outfile.write('Null=%s,\n' % quote_python(self.Null).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractValue':
            AbstractValue_ = child_.text
            AbstractValue_ = self.gds_validate_string(AbstractValue_, node, 'AbstractValue')
            self.AbstractValue = AbstractValue_
        elif nodeName_ == 'AbstractScalarValue':
            AbstractScalarValue_ = child_.text
            AbstractScalarValue_ = self.gds_validate_string(AbstractScalarValue_, node, 'AbstractScalarValue')
            self.AbstractScalarValue = AbstractScalarValue_
        elif nodeName_ == 'AbstractScalarValueList':
            AbstractScalarValueList_ = child_.text
            AbstractScalarValueList_ = self.gds_validate_string(AbstractScalarValueList_, node, 'AbstractScalarValueList')
            self.AbstractScalarValueList = AbstractScalarValueList_
        elif nodeName_ == 'CompositeValue':
            class_obj_ = self.get_class_obj_(child_, CompositeValueType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.CompositeValue = obj_
            obj_.original_tagname_ = 'CompositeValue'
        elif nodeName_ == 'CategoryExtent':
            obj_ = CategoryExtentType.factory()
            obj_.build(child_)
            self.CategoryExtent = obj_
            obj_.original_tagname_ = 'CategoryExtent'
        elif nodeName_ == 'CountExtent':
            CountExtent_ = child_.text
            CountExtent_ = self.gds_validate_string(CountExtent_, node, 'CountExtent')
            self.CountExtent = CountExtent_
            self.validate_CountExtentType(self.CountExtent)    # validate type CountExtentType
        elif nodeName_ == 'QuantityExtent':
            obj_ = QuantityExtentType.factory()
            obj_.build(child_)
            self.QuantityExtent = obj_
            obj_.original_tagname_ = 'QuantityExtent'
        elif nodeName_ == 'Boolean':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'Boolean')
            self.Boolean = ival_
        elif nodeName_ == 'Category':
            obj_ = Category.factory()
            obj_.build(child_)
            self.Category = obj_
            obj_.original_tagname_ = 'Category'
        elif nodeName_ == 'Count':
            obj_ = Count.factory()
            obj_.build(child_)
            self.Count = obj_
            obj_.original_tagname_ = 'Count'
        elif nodeName_ == 'Quantity':
            obj_ = Quantity.factory()
            obj_.build(child_)
            self.Quantity = obj_
            obj_.original_tagname_ = 'Quantity'
        elif nodeName_ == 'BooleanList':
            BooleanList_ = child_.text
            self.BooleanList = BooleanList_
            self.BooleanList = self.BooleanList.split()
            self.validate_booleanOrNilReasonList(self.BooleanList)    # validate type booleanOrNilReasonList
        elif nodeName_ == 'CategoryList':
            class_obj_ = self.get_class_obj_(child_, CodeOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.CategoryList = obj_
            obj_.original_tagname_ = 'CategoryList'
        elif nodeName_ == 'CountList':
            CountList_ = child_.text
            self.CountList = CountList_
            self.CountList = self.CountList.split()
            self.validate_integerOrNilReasonList(self.CountList)    # validate type integerOrNilReasonList
        elif nodeName_ == 'QuantityList':
            class_obj_ = self.get_class_obj_(child_, MeasureOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.QuantityList = obj_
            obj_.original_tagname_ = 'QuantityList'
        elif nodeName_ == 'ValueArray':
            obj_ = ValueArrayType.factory()
            obj_.build(child_)
            self.ValueArray = obj_
            obj_.original_tagname_ = 'ValueArray'
        elif nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
        elif nodeName_ == 'AbstractTimeObject':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeObject> element')
            self.AbstractTimeObject = obj_
            obj_.original_tagname_ = 'AbstractTimeObject'
        elif nodeName_ == 'AbstractTimePrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimePrimitive> element')
            self.AbstractTimePrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimePrimitive'
        elif nodeName_ == 'AbstractTimeComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeComplex> element')
            self.AbstractTimeComplex = obj_
            obj_.original_tagname_ = 'AbstractTimeComplex'
        elif nodeName_ == 'AbstractTimeGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeGeometricPrimitive> element')
            self.AbstractTimeGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeGeometricPrimitive'
        elif nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimeTopologyPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.TimeInstant = obj_
            obj_.original_tagname_ = 'TimeInstant'
        elif nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.TimePeriod = obj_
            obj_.original_tagname_ = 'TimePeriod'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
        elif nodeName_ == 'TimeTopologyComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <TimeTopologyComplex> element')
            self.TimeTopologyComplex = obj_
            obj_.original_tagname_ = 'TimeTopologyComplex'
        elif nodeName_ == 'Null':
            Null_ = child_.text
            Null_ = self.gds_validate_string(Null_, node, 'Null')
            self.Null = Null_
# end class ValuePropertyType


class ValueArrayPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractValue=None, AbstractGeometry=None, AbstractTimeObject=None, Null=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        self.AbstractValue = AbstractValue
        self.AbstractGeometry = AbstractGeometry
        self.AbstractTimeObject = AbstractTimeObject
        self.Null = Null
    def factory(*args_, **kwargs_):
        if ValueArrayPropertyType.subclass:
            return ValueArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return ValueArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractValue(self): return self.AbstractValue
    def set_AbstractValue(self, AbstractValue): self.AbstractValue = AbstractValue
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_AbstractTimeObject(self): return self.AbstractTimeObject
    def set_AbstractTimeObject(self, AbstractTimeObject): self.AbstractTimeObject = AbstractTimeObject
    def get_Null(self): return self.Null
    def set_Null(self, Null): self.Null = Null
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractValue is not None or
            self.AbstractGeometry is not None or
            self.AbstractTimeObject is not None or
            self.Null is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ValueArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ValueArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ValueArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ValueArrayPropertyType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ValueArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sAbstractValue>%s</%sAbstractValue>%s' % ('gml:', self.gds_format_string(quote_xml(self.AbstractValue).encode(ExternalEncoding), input_name='AbstractValue'), 'gml:', eol_))
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
        if self.AbstractTimeObject is not None:
            self.AbstractTimeObject.export(outfile, level, namespace_, name_='AbstractTimeObject', pretty_print=pretty_print)
        if self.Null is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNull>%s</%sNull>%s' % ('gml:', self.gds_format_string(quote_xml(self.Null).encode(ExternalEncoding), input_name='Null'), 'gml:', eol_))
    def exportLiteral(self, outfile, level, name_='ValueArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractValue is not None:
            showIndent(outfile, level)
            outfile.write('AbstractValue=%s,\n' % quote_python(self.AbstractValue).encode(ExternalEncoding))
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AbstractTimeObjectType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTimeObjectType=model_.AbstractTimeObjectType(\n')
            self.AbstractTimeObjectType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Null is not None:
            showIndent(outfile, level)
            outfile.write('Null=%s,\n' % quote_python(self.Null).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractValue':
            AbstractValue_ = child_.text
            AbstractValue_ = self.gds_validate_string(AbstractValue_, node, 'AbstractValue')
            self.AbstractValue = AbstractValue_
        elif nodeName_ == 'AbstractScalarValue':
            AbstractScalarValue_ = child_.text
            AbstractScalarValue_ = self.gds_validate_string(AbstractScalarValue_, node, 'AbstractScalarValue')
            self.AbstractScalarValue = AbstractScalarValue_
        elif nodeName_ == 'AbstractScalarValueList':
            AbstractScalarValueList_ = child_.text
            AbstractScalarValueList_ = self.gds_validate_string(AbstractScalarValueList_, node, 'AbstractScalarValueList')
            self.AbstractScalarValueList = AbstractScalarValueList_
        elif nodeName_ == 'CompositeValue':
            class_obj_ = self.get_class_obj_(child_, CompositeValueType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.CompositeValue = obj_
            obj_.original_tagname_ = 'CompositeValue'
        elif nodeName_ == 'CategoryExtent':
            obj_ = CategoryExtentType.factory()
            obj_.build(child_)
            self.CategoryExtent = obj_
            obj_.original_tagname_ = 'CategoryExtent'
        elif nodeName_ == 'CountExtent':
            CountExtent_ = child_.text
            CountExtent_ = self.gds_validate_string(CountExtent_, node, 'CountExtent')
            self.CountExtent = CountExtent_
            self.validate_CountExtentType(self.CountExtent)    # validate type CountExtentType
        elif nodeName_ == 'QuantityExtent':
            obj_ = QuantityExtentType.factory()
            obj_.build(child_)
            self.QuantityExtent = obj_
            obj_.original_tagname_ = 'QuantityExtent'
        elif nodeName_ == 'Boolean':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'Boolean')
            self.Boolean = ival_
        elif nodeName_ == 'Category':
            obj_ = Category.factory()
            obj_.build(child_)
            self.Category = obj_
            obj_.original_tagname_ = 'Category'
        elif nodeName_ == 'Count':
            obj_ = Count.factory()
            obj_.build(child_)
            self.Count = obj_
            obj_.original_tagname_ = 'Count'
        elif nodeName_ == 'Quantity':
            obj_ = Quantity.factory()
            obj_.build(child_)
            self.Quantity = obj_
            obj_.original_tagname_ = 'Quantity'
        elif nodeName_ == 'BooleanList':
            BooleanList_ = child_.text
            self.BooleanList = BooleanList_
            self.BooleanList = self.BooleanList.split()
            self.validate_booleanOrNilReasonList(self.BooleanList)    # validate type booleanOrNilReasonList
        elif nodeName_ == 'CategoryList':
            class_obj_ = self.get_class_obj_(child_, CodeOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.CategoryList = obj_
            obj_.original_tagname_ = 'CategoryList'
        elif nodeName_ == 'CountList':
            CountList_ = child_.text
            self.CountList = CountList_
            self.CountList = self.CountList.split()
            self.validate_integerOrNilReasonList(self.CountList)    # validate type integerOrNilReasonList
        elif nodeName_ == 'QuantityList':
            class_obj_ = self.get_class_obj_(child_, MeasureOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.QuantityList = obj_
            obj_.original_tagname_ = 'QuantityList'
        elif nodeName_ == 'ValueArray':
            obj_ = ValueArrayType.factory()
            obj_.build(child_)
            self.ValueArray = obj_
            obj_.original_tagname_ = 'ValueArray'
        elif nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
        elif nodeName_ == 'AbstractTimeObject':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeObject> element')
            self.AbstractTimeObject = obj_
            obj_.original_tagname_ = 'AbstractTimeObject'
        elif nodeName_ == 'AbstractTimePrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimePrimitive> element')
            self.AbstractTimePrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimePrimitive'
        elif nodeName_ == 'AbstractTimeComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeComplex> element')
            self.AbstractTimeComplex = obj_
            obj_.original_tagname_ = 'AbstractTimeComplex'
        elif nodeName_ == 'AbstractTimeGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeGeometricPrimitive> element')
            self.AbstractTimeGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeGeometricPrimitive'
        elif nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimeTopologyPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.TimeInstant = obj_
            obj_.original_tagname_ = 'TimeInstant'
        elif nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.TimePeriod = obj_
            obj_.original_tagname_ = 'TimePeriod'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
        elif nodeName_ == 'TimeTopologyComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <TimeTopologyComplex> element')
            self.TimeTopologyComplex = obj_
            obj_.original_tagname_ = 'TimeTopologyComplex'
        elif nodeName_ == 'Null':
            Null_ = child_.text
            Null_ = self.gds_validate_string(Null_, node, 'Null')
            self.Null = Null_
# end class ValueArrayPropertyType


class CompositeValueType(AbstractGMLType):
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, valueComponent=None, valueComponents=None, extensiontype_=None):
        self.original_tagname_ = None
        super(CompositeValueType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.aggregationType = _cast(None, aggregationType)
        if valueComponent is None:
            self.valueComponent = []
        else:
            self.valueComponent = valueComponent
        self.valueComponents = valueComponents
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CompositeValueType.subclass:
            return CompositeValueType.subclass(*args_, **kwargs_)
        else:
            return CompositeValueType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueComponent(self): return self.valueComponent
    def set_valueComponent(self, valueComponent): self.valueComponent = valueComponent
    def add_valueComponent(self, value): self.valueComponent.append(value)
    def insert_valueComponent_at(self, index, value): self.valueComponent.insert(index, value)
    def replace_valueComponent_at(self, index, value): self.valueComponent[index] = value
    def get_valueComponents(self): return self.valueComponents
    def set_valueComponents(self, valueComponents): self.valueComponents = valueComponents
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueComponent or
            self.valueComponents is not None or
            super(CompositeValueType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CompositeValueType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeValueType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CompositeValueType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CompositeValueType'):
        super(CompositeValueType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeValueType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CompositeValueType', fromsubclass_=False, pretty_print=True):
        super(CompositeValueType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for valueComponent_ in self.valueComponent:
            valueComponent_.export(outfile, level, namespace_='gml:', name_='valueComponent', pretty_print=pretty_print)
        if self.valueComponents is not None:
            self.valueComponents.export(outfile, level, namespace_='gml:', name_='valueComponents', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CompositeValueType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(CompositeValueType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CompositeValueType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueComponent=[\n')
        level += 1
        for valueComponent_ in self.valueComponent:
            showIndent(outfile, level)
            outfile.write('model_.ValuePropertyType(\n')
            valueComponent_.exportLiteral(outfile, level, name_='ValuePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.valueComponents is not None:
            showIndent(outfile, level)
            outfile.write('valueComponents=model_.ValueArrayPropertyType(\n')
            self.valueComponents.exportLiteral(outfile, level, name_='valueComponents')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(CompositeValueType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'valueComponent':
            obj_ = ValuePropertyType.factory()
            obj_.build(child_)
            self.valueComponent.append(obj_)
            obj_.original_tagname_ = 'valueComponent'
        elif nodeName_ == 'valueComponents':
            obj_ = ValueArrayPropertyType.factory()
            obj_.build(child_)
            self.valueComponents = obj_
            obj_.original_tagname_ = 'valueComponents'
        super(CompositeValueType, self).buildChildren(child_, node, nodeName_, True)
# end class CompositeValueType


class ValueArrayType(CompositeValueType):
    subclass = None
    superclass = CompositeValueType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, valueComponent=None, valueComponents=None, codeSpace=None, uom=None):
        self.original_tagname_ = None
        super(ValueArrayType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, aggregationType, valueComponent, valueComponents, )
        self.codeSpace = _cast(None, codeSpace)
        self.uom = _cast(None, uom)
    def factory(*args_, **kwargs_):
        if ValueArrayType.subclass:
            return ValueArrayType.subclass(*args_, **kwargs_)
        else:
            return ValueArrayType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_uom(self): return self.uom
    def set_uom(self, uom): self.uom = uom
    def hasContent_(self):
        if (
            super(ValueArrayType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ValueArrayType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ValueArrayType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ValueArrayType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ValueArrayType'):
        super(ValueArrayType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ValueArrayType')
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            outfile.write(' codeSpace=%s' % (self.gds_format_string(quote_attrib(self.codeSpace).encode(ExternalEncoding), input_name='codeSpace'), ))
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            outfile.write(' uom=%s' % (quote_attrib(self.uom), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ValueArrayType', fromsubclass_=False, pretty_print=True):
        super(ValueArrayType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ValueArrayType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            showIndent(outfile, level)
            outfile.write('codeSpace="%s",\n' % (self.codeSpace,))
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            showIndent(outfile, level)
            outfile.write('uom=%s,\n' % (self.uom,))
        super(ValueArrayType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ValueArrayType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('codeSpace', node)
        if value is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            self.codeSpace = value
        value = find_attr_value_('uom', node)
        if value is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            self.uom = value
        super(ValueArrayType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(ValueArrayType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class ValueArrayType


class CategoryExtentType(CodeOrNilReasonListType):
    subclass = None
    superclass = CodeOrNilReasonListType
    def __init__(self, codeSpace=None, valueOf_=None):
        self.original_tagname_ = None
        super(CategoryExtentType, self).__init__(codeSpace, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if CategoryExtentType.subclass:
            return CategoryExtentType.subclass(*args_, **kwargs_)
        else:
            return CategoryExtentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(CategoryExtentType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CategoryExtentType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CategoryExtentType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CategoryExtentType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CategoryExtentType'):
        super(CategoryExtentType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CategoryExtentType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CategoryExtentType', fromsubclass_=False, pretty_print=True):
        super(CategoryExtentType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='CategoryExtentType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CategoryExtentType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CategoryExtentType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CategoryExtentType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CategoryExtentType


class QuantityExtentType(MeasureOrNilReasonListType):
    subclass = None
    superclass = MeasureOrNilReasonListType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(QuantityExtentType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if QuantityExtentType.subclass:
            return QuantityExtentType.subclass(*args_, **kwargs_)
        else:
            return QuantityExtentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(QuantityExtentType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='QuantityExtentType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityExtentType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='QuantityExtentType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='QuantityExtentType'):
        super(QuantityExtentType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityExtentType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='QuantityExtentType', fromsubclass_=False, pretty_print=True):
        super(QuantityExtentType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='QuantityExtentType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(QuantityExtentType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(QuantityExtentType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(QuantityExtentType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class QuantityExtentType


class BooleanPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Boolean=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Boolean = Boolean
    def factory(*args_, **kwargs_):
        if BooleanPropertyType.subclass:
            return BooleanPropertyType.subclass(*args_, **kwargs_)
        else:
            return BooleanPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Boolean(self): return self.Boolean
    def set_Boolean(self, Boolean): self.Boolean = Boolean
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Boolean is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BooleanPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BooleanPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BooleanPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BooleanPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BooleanPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Boolean is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBoolean>%s</%sBoolean>%s' % (namespace_, self.gds_format_boolean(self.Boolean, input_name='Boolean'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='BooleanPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Boolean is not None:
            showIndent(outfile, level)
            outfile.write('Boolean=%s,\n' % self.Boolean)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Boolean':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'Boolean')
            self.Boolean = ival_
# end class BooleanPropertyType


class CategoryPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Category=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Category = Category
    def factory(*args_, **kwargs_):
        if CategoryPropertyType.subclass:
            return CategoryPropertyType.subclass(*args_, **kwargs_)
        else:
            return CategoryPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Category(self): return self.Category
    def set_Category(self, Category): self.Category = Category
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Category is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CategoryPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CategoryPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CategoryPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CategoryPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CategoryPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Category is not None:
            self.Category.export(outfile, level, namespace_='gml:', name_='Category', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CategoryPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Category is not None:
            showIndent(outfile, level)
            outfile.write('Category=model_.Category(\n')
            self.Category.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Category':
            obj_ = Category.factory()
            obj_.build(child_)
            self.Category = obj_
            obj_.original_tagname_ = 'Category'
# end class CategoryPropertyType


class QuantityPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Quantity=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Quantity = Quantity
    def factory(*args_, **kwargs_):
        if QuantityPropertyType.subclass:
            return QuantityPropertyType.subclass(*args_, **kwargs_)
        else:
            return QuantityPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Quantity(self): return self.Quantity
    def set_Quantity(self, Quantity): self.Quantity = Quantity
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Quantity is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='QuantityPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='QuantityPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='QuantityPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='QuantityPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='QuantityPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Quantity is not None:
            self.Quantity.export(outfile, level, namespace_='gml:', name_='Quantity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='QuantityPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Quantity is not None:
            showIndent(outfile, level)
            outfile.write('Quantity=model_.Quantity(\n')
            self.Quantity.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Quantity':
            obj_ = Quantity.factory()
            obj_.build(child_)
            self.Quantity = obj_
            obj_.original_tagname_ = 'Quantity'
# end class QuantityPropertyType


class CountPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Count=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Count = Count
    def factory(*args_, **kwargs_):
        if CountPropertyType.subclass:
            return CountPropertyType.subclass(*args_, **kwargs_)
        else:
            return CountPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Count(self): return self.Count
    def set_Count(self, Count): self.Count = Count
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Count is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CountPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CountPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CountPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CountPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CountPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Count is not None:
            self.Count.export(outfile, level, namespace_='gml:', name_='Count', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CountPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Count is not None:
            showIndent(outfile, level)
            outfile.write('Count=model_.Count(\n')
            self.Count.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Count':
            obj_ = Count.factory()
            obj_.build(child_)
            self.Count = obj_
            obj_.original_tagname_ = 'Count'
# end class CountPropertyType


class GridLimitsType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, GridEnvelope=None):
        self.original_tagname_ = None
        self.GridEnvelope = GridEnvelope
    def factory(*args_, **kwargs_):
        if GridLimitsType.subclass:
            return GridLimitsType.subclass(*args_, **kwargs_)
        else:
            return GridLimitsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_GridEnvelope(self): return self.GridEnvelope
    def set_GridEnvelope(self, GridEnvelope): self.GridEnvelope = GridEnvelope
    def hasContent_(self):
        if (
            self.GridEnvelope is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GridLimitsType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GridLimitsType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GridLimitsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GridLimitsType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GridLimitsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.GridEnvelope is not None:
            self.GridEnvelope.export(outfile, level, namespace_, name_='GridEnvelope', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GridLimitsType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.GridEnvelope is not None:
            showIndent(outfile, level)
            outfile.write('GridEnvelope=model_.GridEnvelopeType(\n')
            self.GridEnvelope.exportLiteral(outfile, level, name_='GridEnvelope')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'GridEnvelope':
            obj_ = GridEnvelopeType.factory()
            obj_.build(child_)
            self.GridEnvelope = obj_
            obj_.original_tagname_ = 'GridEnvelope'
# end class GridLimitsType


class GridEnvelopeType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, low=None, high=None):
        self.original_tagname_ = None
        self.low = low
        self.high = high
    def factory(*args_, **kwargs_):
        if GridEnvelopeType.subclass:
            return GridEnvelopeType.subclass(*args_, **kwargs_)
        else:
            return GridEnvelopeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_low(self): return self.low
    def set_low(self, low): self.low = low
    def get_high(self): return self.high
    def set_high(self, high): self.high = high
    def validate_integerList(self, value):
        # Validate type integerList, a restriction on integer.
        pass
    def hasContent_(self):
        if (
            self.low is not None or
            self.high is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GridEnvelopeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GridEnvelopeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GridEnvelopeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GridEnvelopeType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GridEnvelopeType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.low is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slow>%s</%slow>%s' % (namespace_, self.gds_format_integer_list(self.low, input_name='low'), namespace_, eol_))
        if self.high is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%shigh>%s</%shigh>%s' % (namespace_, self.gds_format_integer_list(self.high, input_name='high'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='GridEnvelopeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.low is not None:
            showIndent(outfile, level)
            outfile.write('low=%d,\n' % self.low)
        if self.high is not None:
            showIndent(outfile, level)
            outfile.write('high=%d,\n' % self.high)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'low':
            low_ = child_.text
            low_ = self.gds_validate_integer_list(low_, node, 'low')
            self.low = low_
            self.low = self.low.split()
            self.validate_integerList(self.low)    # validate type integerList
        elif nodeName_ == 'high':
            high_ = child_.text
            high_ = self.gds_validate_integer_list(high_, node, 'high')
            self.high = high_
            self.high = self.high.split()
            self.validate_integerList(self.high)    # validate type integerList
# end class GridEnvelopeType


class SingleCRSPropertyType(GeneratedsSuper):
    """gml:SingleCRSPropertyType is a property type for association roles
    to a single coordinate reference system, either referencing or
    containing the definition of that coordinate reference system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractSingleCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractSingleCRS = AbstractSingleCRS
    def factory(*args_, **kwargs_):
        if SingleCRSPropertyType.subclass:
            return SingleCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return SingleCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSingleCRS(self): return self.AbstractSingleCRS
    def set_AbstractSingleCRS(self, AbstractSingleCRS): self.AbstractSingleCRS = AbstractSingleCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractSingleCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SingleCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SingleCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SingleCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SingleCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SingleCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractSingleCRS is not None:
            self.AbstractSingleCRS.export(outfile, level, namespace_, name_='AbstractSingleCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SingleCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCRSType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCRSType=model_.AbstractCRSType(\n')
            self.AbstractCRSType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSingleCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleCRS> element')
            self.AbstractSingleCRS = obj_
            obj_.original_tagname_ = 'AbstractSingleCRS'
        elif nodeName_ == 'AbstractGeneralDerivedCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralDerivedCRS> element')
            self.AbstractGeneralDerivedCRS = obj_
            obj_.original_tagname_ = 'AbstractGeneralDerivedCRS'
        elif nodeName_ == 'GeodeticCRS':
            obj_ = GeodeticCRSType.factory()
            obj_.build(child_)
            self.GeodeticCRS = obj_
            obj_.original_tagname_ = 'GeodeticCRS'
        elif nodeName_ == 'VerticalCRS':
            obj_ = VerticalCRSType.factory()
            obj_.build(child_)
            self.VerticalCRS = obj_
            obj_.original_tagname_ = 'VerticalCRS'
        elif nodeName_ == 'EngineeringCRS':
            obj_ = EngineeringCRSType.factory()
            obj_.build(child_)
            self.EngineeringCRS = obj_
            obj_.original_tagname_ = 'EngineeringCRS'
        elif nodeName_ == 'ImageCRS':
            obj_ = ImageCRSType.factory()
            obj_.build(child_)
            self.ImageCRS = obj_
            obj_.original_tagname_ = 'ImageCRS'
        elif nodeName_ == 'TemporalCRS':
            obj_ = TemporalCRSType.factory()
            obj_.build(child_)
            self.TemporalCRS = obj_
            obj_.original_tagname_ = 'TemporalCRS'
        elif nodeName_ == 'GeographicCRS':
            obj_ = GeographicCRSType.factory()
            obj_.build(child_)
            self.GeographicCRS = obj_
            obj_.original_tagname_ = 'GeographicCRS'
        elif nodeName_ == 'GeocentricCRS':
            obj_ = GeocentricCRSType.factory()
            obj_.build(child_)
            self.GeocentricCRS = obj_
            obj_.original_tagname_ = 'GeocentricCRS'
        elif nodeName_ == 'ProjectedCRS':
            obj_ = ProjectedCRSType.factory()
            obj_.build(child_)
            self.ProjectedCRS = obj_
            obj_.original_tagname_ = 'ProjectedCRS'
        elif nodeName_ == 'DerivedCRS':
            obj_ = DerivedCRSType.factory()
            obj_.build(child_)
            self.DerivedCRS = obj_
            obj_.original_tagname_ = 'DerivedCRS'
# end class SingleCRSPropertyType


class CompoundCRSPropertyType(GeneratedsSuper):
    """gml:CompoundCRSPropertyType is a property type for association roles
    to a compound coordinate reference system, either referencing or
    containing the definition of that reference system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, CompoundCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.CompoundCRS = CompoundCRS
    def factory(*args_, **kwargs_):
        if CompoundCRSPropertyType.subclass:
            return CompoundCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return CompoundCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CompoundCRS(self): return self.CompoundCRS
    def set_CompoundCRS(self, CompoundCRS): self.CompoundCRS = CompoundCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CompoundCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CompoundCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CompoundCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CompoundCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CompoundCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CompoundCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CompoundCRS is not None:
            self.CompoundCRS.export(outfile, level, namespace_='gml:', name_='CompoundCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CompoundCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CompoundCRS is not None:
            showIndent(outfile, level)
            outfile.write('CompoundCRS=model_.CompoundCRSType(\n')
            self.CompoundCRS.exportLiteral(outfile, level, name_='CompoundCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CompoundCRS':
            obj_ = CompoundCRSType.factory()
            obj_.build(child_)
            self.CompoundCRS = obj_
            obj_.original_tagname_ = 'CompoundCRS'
# end class CompoundCRSPropertyType


class GeodeticCRSPropertyType(GeneratedsSuper):
    """gml:GeodeticCRSPropertyType is a property type for association roles
    to a geodetic coordinate reference system, either referencing or
    containing the definition of that reference system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, GeodeticCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.GeodeticCRS = GeodeticCRS
    def factory(*args_, **kwargs_):
        if GeodeticCRSPropertyType.subclass:
            return GeodeticCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeodeticCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_GeodeticCRS(self): return self.GeodeticCRS
    def set_GeodeticCRS(self, GeodeticCRS): self.GeodeticCRS = GeodeticCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.GeodeticCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeodeticCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeodeticCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeodeticCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeodeticCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeodeticCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.GeodeticCRS is not None:
            self.GeodeticCRS.export(outfile, level, namespace_='gml:', name_='GeodeticCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeodeticCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.GeodeticCRS is not None:
            showIndent(outfile, level)
            outfile.write('GeodeticCRS=model_.GeodeticCRSType(\n')
            self.GeodeticCRS.exportLiteral(outfile, level, name_='GeodeticCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'GeodeticCRS':
            obj_ = GeodeticCRSType.factory()
            obj_.build(child_)
            self.GeodeticCRS = obj_
            obj_.original_tagname_ = 'GeodeticCRS'
# end class GeodeticCRSPropertyType


class VerticalCRSPropertyType(GeneratedsSuper):
    """gml:VerticalCRSPropertyType is a property type for association roles
    to a vertical coordinate reference system, either referencing or
    containing the definition of that reference system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, VerticalCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.VerticalCRS = VerticalCRS
    def factory(*args_, **kwargs_):
        if VerticalCRSPropertyType.subclass:
            return VerticalCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return VerticalCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_VerticalCRS(self): return self.VerticalCRS
    def set_VerticalCRS(self, VerticalCRS): self.VerticalCRS = VerticalCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.VerticalCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VerticalCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VerticalCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VerticalCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VerticalCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.VerticalCRS is not None:
            self.VerticalCRS.export(outfile, level, namespace_='gml:', name_='VerticalCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='VerticalCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.VerticalCRS is not None:
            showIndent(outfile, level)
            outfile.write('VerticalCRS=model_.VerticalCRSType(\n')
            self.VerticalCRS.exportLiteral(outfile, level, name_='VerticalCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'VerticalCRS':
            obj_ = VerticalCRSType.factory()
            obj_.build(child_)
            self.VerticalCRS = obj_
            obj_.original_tagname_ = 'VerticalCRS'
# end class VerticalCRSPropertyType


class ProjectedCRSPropertyType(GeneratedsSuper):
    """gml:ProjectedCRSPropertyType is a property type for association
    roles to a projected coordinate reference system, either
    referencing or containing the definition of that reference
    system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, ProjectedCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.ProjectedCRS = ProjectedCRS
    def factory(*args_, **kwargs_):
        if ProjectedCRSPropertyType.subclass:
            return ProjectedCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return ProjectedCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ProjectedCRS(self): return self.ProjectedCRS
    def set_ProjectedCRS(self, ProjectedCRS): self.ProjectedCRS = ProjectedCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.ProjectedCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ProjectedCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ProjectedCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ProjectedCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ProjectedCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ProjectedCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ProjectedCRS is not None:
            self.ProjectedCRS.export(outfile, level, namespace_='gml:', name_='ProjectedCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ProjectedCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ProjectedCRS is not None:
            showIndent(outfile, level)
            outfile.write('ProjectedCRS=model_.ProjectedCRSType(\n')
            self.ProjectedCRS.exportLiteral(outfile, level, name_='ProjectedCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ProjectedCRS':
            obj_ = ProjectedCRSType.factory()
            obj_.build(child_)
            self.ProjectedCRS = obj_
            obj_.original_tagname_ = 'ProjectedCRS'
# end class ProjectedCRSPropertyType


class DerivedCRSPropertyType(GeneratedsSuper):
    """gml:DerivedCRSPropertyType is a property type for association roles
    to a non-projected derived coordinate reference system, either
    referencing or containing the definition of that reference
    system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, DerivedCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.DerivedCRS = DerivedCRS
    def factory(*args_, **kwargs_):
        if DerivedCRSPropertyType.subclass:
            return DerivedCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return DerivedCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DerivedCRS(self): return self.DerivedCRS
    def set_DerivedCRS(self, DerivedCRS): self.DerivedCRS = DerivedCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DerivedCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DerivedCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DerivedCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DerivedCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DerivedCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DerivedCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DerivedCRS is not None:
            self.DerivedCRS.export(outfile, level, namespace_='gml:', name_='DerivedCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DerivedCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DerivedCRS is not None:
            showIndent(outfile, level)
            outfile.write('DerivedCRS=model_.DerivedCRSType(\n')
            self.DerivedCRS.exportLiteral(outfile, level, name_='DerivedCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DerivedCRS':
            obj_ = DerivedCRSType.factory()
            obj_.build(child_)
            self.DerivedCRS = obj_
            obj_.original_tagname_ = 'DerivedCRS'
# end class DerivedCRSPropertyType


class EngineeringCRSPropertyType(GeneratedsSuper):
    """gml:EngineeringCRSPropertyType is a property type for association
    roles to an engineering coordinate reference system, either
    referencing or containing the definition of that reference
    system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, EngineeringCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.EngineeringCRS = EngineeringCRS
    def factory(*args_, **kwargs_):
        if EngineeringCRSPropertyType.subclass:
            return EngineeringCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return EngineeringCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EngineeringCRS(self): return self.EngineeringCRS
    def set_EngineeringCRS(self, EngineeringCRS): self.EngineeringCRS = EngineeringCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EngineeringCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EngineeringCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EngineeringCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EngineeringCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EngineeringCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EngineeringCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EngineeringCRS is not None:
            self.EngineeringCRS.export(outfile, level, namespace_='gml:', name_='EngineeringCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EngineeringCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EngineeringCRS is not None:
            showIndent(outfile, level)
            outfile.write('EngineeringCRS=model_.EngineeringCRSType(\n')
            self.EngineeringCRS.exportLiteral(outfile, level, name_='EngineeringCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EngineeringCRS':
            obj_ = EngineeringCRSType.factory()
            obj_.build(child_)
            self.EngineeringCRS = obj_
            obj_.original_tagname_ = 'EngineeringCRS'
# end class EngineeringCRSPropertyType


class ImageCRSPropertyType(GeneratedsSuper):
    """gml:ImageCRSPropertyType is a property type for association roles to
    an image coordinate reference system, either referencing or
    containing the definition of that reference system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, ImageCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.ImageCRS = ImageCRS
    def factory(*args_, **kwargs_):
        if ImageCRSPropertyType.subclass:
            return ImageCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return ImageCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ImageCRS(self): return self.ImageCRS
    def set_ImageCRS(self, ImageCRS): self.ImageCRS = ImageCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.ImageCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ImageCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ImageCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ImageCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ImageCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ImageCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ImageCRS is not None:
            self.ImageCRS.export(outfile, level, namespace_='gml:', name_='ImageCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ImageCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ImageCRS is not None:
            showIndent(outfile, level)
            outfile.write('ImageCRS=model_.ImageCRSType(\n')
            self.ImageCRS.exportLiteral(outfile, level, name_='ImageCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ImageCRS':
            obj_ = ImageCRSType.factory()
            obj_.build(child_)
            self.ImageCRS = obj_
            obj_.original_tagname_ = 'ImageCRS'
# end class ImageCRSPropertyType


class TemporalCRSPropertyType(GeneratedsSuper):
    """gml:TemporalCRSPropertyType is a property type for association roles
    to a temporal coordinate reference system, either referencing or
    containing the definition of that reference system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TemporalCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TemporalCRS = TemporalCRS
    def factory(*args_, **kwargs_):
        if TemporalCRSPropertyType.subclass:
            return TemporalCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return TemporalCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TemporalCRS(self): return self.TemporalCRS
    def set_TemporalCRS(self, TemporalCRS): self.TemporalCRS = TemporalCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TemporalCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TemporalCRS is not None:
            self.TemporalCRS.export(outfile, level, namespace_='gml:', name_='TemporalCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TemporalCRS is not None:
            showIndent(outfile, level)
            outfile.write('TemporalCRS=model_.TemporalCRSType(\n')
            self.TemporalCRS.exportLiteral(outfile, level, name_='TemporalCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TemporalCRS':
            obj_ = TemporalCRSType.factory()
            obj_.build(child_)
            self.TemporalCRS = obj_
            obj_.original_tagname_ = 'TemporalCRS'
# end class TemporalCRSPropertyType


class CoordinateSystemAxisPropertyType(GeneratedsSuper):
    """gml:CoordinateSystemAxisPropertyType is a property type for
    association roles to a coordinate system axis, either
    referencing or containing the definition of that axis."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, CoordinateSystemAxis=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.CoordinateSystemAxis = CoordinateSystemAxis
    def factory(*args_, **kwargs_):
        if CoordinateSystemAxisPropertyType.subclass:
            return CoordinateSystemAxisPropertyType.subclass(*args_, **kwargs_)
        else:
            return CoordinateSystemAxisPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CoordinateSystemAxis(self): return self.CoordinateSystemAxis
    def set_CoordinateSystemAxis(self, CoordinateSystemAxis): self.CoordinateSystemAxis = CoordinateSystemAxis
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CoordinateSystemAxis is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CoordinateSystemAxisPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CoordinateSystemAxisPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CoordinateSystemAxisPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CoordinateSystemAxisPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CoordinateSystemAxisPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CoordinateSystemAxis is not None:
            self.CoordinateSystemAxis.export(outfile, level, namespace_='gml:', name_='CoordinateSystemAxis', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CoordinateSystemAxisPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CoordinateSystemAxis is not None:
            showIndent(outfile, level)
            outfile.write('CoordinateSystemAxis=model_.CoordinateSystemAxisType(\n')
            self.CoordinateSystemAxis.exportLiteral(outfile, level, name_='CoordinateSystemAxis')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CoordinateSystemAxis':
            obj_ = CoordinateSystemAxisType.factory()
            obj_.build(child_)
            self.CoordinateSystemAxis = obj_
            obj_.original_tagname_ = 'CoordinateSystemAxis'
# end class CoordinateSystemAxisPropertyType


class CoordinateSystemPropertyType(GeneratedsSuper):
    """gml:CoordinateSystemPropertyType is a property type for association
    roles to a coordinate system, either referencing or containing
    the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractCoordinateSystem=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractCoordinateSystem = AbstractCoordinateSystem
    def factory(*args_, **kwargs_):
        if CoordinateSystemPropertyType.subclass:
            return CoordinateSystemPropertyType.subclass(*args_, **kwargs_)
        else:
            return CoordinateSystemPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCoordinateSystem(self): return self.AbstractCoordinateSystem
    def set_AbstractCoordinateSystem(self, AbstractCoordinateSystem): self.AbstractCoordinateSystem = AbstractCoordinateSystem
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractCoordinateSystem is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CoordinateSystemPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CoordinateSystemPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CoordinateSystemPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CoordinateSystemPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CoordinateSystemPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractCoordinateSystem is not None:
            self.AbstractCoordinateSystem.export(outfile, level, namespace_, name_='AbstractCoordinateSystem', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CoordinateSystemPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCoordinateSystemType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCoordinateSystemType=model_.AbstractCoordinateSystemType(\n')
            self.AbstractCoordinateSystemType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCoordinateSystem':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoordinateSystem> element')
            self.AbstractCoordinateSystem = obj_
            obj_.original_tagname_ = 'AbstractCoordinateSystem'
        elif nodeName_ == 'EllipsoidalCS':
            obj_ = EllipsoidalCSType.factory()
            obj_.build(child_)
            self.EllipsoidalCS = obj_
            obj_.original_tagname_ = 'EllipsoidalCS'
        elif nodeName_ == 'CartesianCS':
            obj_ = CartesianCSType.factory()
            obj_.build(child_)
            self.CartesianCS = obj_
            obj_.original_tagname_ = 'CartesianCS'
        elif nodeName_ == 'VerticalCS':
            obj_ = VerticalCSType.factory()
            obj_.build(child_)
            self.VerticalCS = obj_
            obj_.original_tagname_ = 'VerticalCS'
        elif nodeName_ == 'TimeCS':
            obj_ = TimeCSType.factory()
            obj_.build(child_)
            self.TimeCS = obj_
            obj_.original_tagname_ = 'TimeCS'
        elif nodeName_ == 'LinearCS':
            obj_ = LinearCSType.factory()
            obj_.build(child_)
            self.LinearCS = obj_
            obj_.original_tagname_ = 'LinearCS'
        elif nodeName_ == 'UserDefinedCS':
            obj_ = UserDefinedCSType.factory()
            obj_.build(child_)
            self.UserDefinedCS = obj_
            obj_.original_tagname_ = 'UserDefinedCS'
        elif nodeName_ == 'SphericalCS':
            obj_ = SphericalCSType.factory()
            obj_.build(child_)
            self.SphericalCS = obj_
            obj_.original_tagname_ = 'SphericalCS'
        elif nodeName_ == 'PolarCS':
            obj_ = PolarCSType.factory()
            obj_.build(child_)
            self.PolarCS = obj_
            obj_.original_tagname_ = 'PolarCS'
        elif nodeName_ == 'CylindricalCS':
            obj_ = CylindricalCSType.factory()
            obj_.build(child_)
            self.CylindricalCS = obj_
            obj_.original_tagname_ = 'CylindricalCS'
        elif nodeName_ == 'AffineCS':
            obj_ = AffineCSType.factory()
            obj_.build(child_)
            self.AffineCS = obj_
            obj_.original_tagname_ = 'AffineCS'
        elif nodeName_ == 'TemporalCS':
            obj_ = TemporalCSType.factory()
            obj_.build(child_)
            self.TemporalCS = obj_
            obj_.original_tagname_ = 'TemporalCS'
        elif nodeName_ == 'ObliqueCartesianCS':
            obj_ = ObliqueCartesianCSType.factory()
            obj_.build(child_)
            self.ObliqueCartesianCS = obj_
            obj_.original_tagname_ = 'ObliqueCartesianCS'
# end class CoordinateSystemPropertyType


class EllipsoidalCSPropertyType(GeneratedsSuper):
    """gml:EllipsoidalCSPropertyType is a property type for association
    roles to an ellipsoidal coordinate system, either referencing or
    containing the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, EllipsoidalCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.EllipsoidalCS = EllipsoidalCS
    def factory(*args_, **kwargs_):
        if EllipsoidalCSPropertyType.subclass:
            return EllipsoidalCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return EllipsoidalCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EllipsoidalCS(self): return self.EllipsoidalCS
    def set_EllipsoidalCS(self, EllipsoidalCS): self.EllipsoidalCS = EllipsoidalCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EllipsoidalCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EllipsoidalCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EllipsoidalCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EllipsoidalCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EllipsoidalCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EllipsoidalCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EllipsoidalCS is not None:
            self.EllipsoidalCS.export(outfile, level, namespace_='gml:', name_='EllipsoidalCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EllipsoidalCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EllipsoidalCS is not None:
            showIndent(outfile, level)
            outfile.write('EllipsoidalCS=model_.EllipsoidalCSType(\n')
            self.EllipsoidalCS.exportLiteral(outfile, level, name_='EllipsoidalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EllipsoidalCS':
            obj_ = EllipsoidalCSType.factory()
            obj_.build(child_)
            self.EllipsoidalCS = obj_
            obj_.original_tagname_ = 'EllipsoidalCS'
# end class EllipsoidalCSPropertyType


class CartesianCSPropertyType(GeneratedsSuper):
    """gml:CartesianCSPropertyType is a property type for association roles
    to a Cartesian coordinate system, either referencing or
    containing the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, CartesianCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.CartesianCS = CartesianCS
    def factory(*args_, **kwargs_):
        if CartesianCSPropertyType.subclass:
            return CartesianCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return CartesianCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CartesianCS(self): return self.CartesianCS
    def set_CartesianCS(self, CartesianCS): self.CartesianCS = CartesianCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CartesianCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CartesianCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CartesianCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CartesianCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CartesianCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CartesianCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CartesianCS is not None:
            self.CartesianCS.export(outfile, level, namespace_='gml:', name_='CartesianCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CartesianCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('CartesianCS=model_.CartesianCSType(\n')
            self.CartesianCS.exportLiteral(outfile, level, name_='CartesianCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CartesianCS':
            obj_ = CartesianCSType.factory()
            obj_.build(child_)
            self.CartesianCS = obj_
            obj_.original_tagname_ = 'CartesianCS'
# end class CartesianCSPropertyType


class VerticalCSPropertyType(GeneratedsSuper):
    """gml:VerticalCSPropertyType is a property type for association roles
    to a vertical coordinate system, either referencing or
    containing the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, VerticalCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.VerticalCS = VerticalCS
    def factory(*args_, **kwargs_):
        if VerticalCSPropertyType.subclass:
            return VerticalCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return VerticalCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_VerticalCS(self): return self.VerticalCS
    def set_VerticalCS(self, VerticalCS): self.VerticalCS = VerticalCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.VerticalCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VerticalCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VerticalCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VerticalCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VerticalCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.VerticalCS is not None:
            self.VerticalCS.export(outfile, level, namespace_='gml:', name_='VerticalCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='VerticalCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.VerticalCS is not None:
            showIndent(outfile, level)
            outfile.write('VerticalCS=model_.VerticalCSType(\n')
            self.VerticalCS.exportLiteral(outfile, level, name_='VerticalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'VerticalCS':
            obj_ = VerticalCSType.factory()
            obj_.build(child_)
            self.VerticalCS = obj_
            obj_.original_tagname_ = 'VerticalCS'
# end class VerticalCSPropertyType


class TimeCSPropertyType(GeneratedsSuper):
    """gml:TimeCSPropertyType is a property type for association roles to a
    time coordinate system, either referencing or containing the
    definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TimeCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TimeCS = TimeCS
    def factory(*args_, **kwargs_):
        if TimeCSPropertyType.subclass:
            return TimeCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeCS(self): return self.TimeCS
    def set_TimeCS(self, TimeCS): self.TimeCS = TimeCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeCS is not None:
            self.TimeCS.export(outfile, level, namespace_='gml:', name_='TimeCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeCS is not None:
            showIndent(outfile, level)
            outfile.write('TimeCS=model_.TimeCSType(\n')
            self.TimeCS.exportLiteral(outfile, level, name_='TimeCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeCS':
            obj_ = TimeCSType.factory()
            obj_.build(child_)
            self.TimeCS = obj_
            obj_.original_tagname_ = 'TimeCS'
# end class TimeCSPropertyType


class LinearCSPropertyType(GeneratedsSuper):
    """gml:LinearCSPropertyType is a property type for association roles to
    a linear coordinate system, either referencing or containing the
    definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, LinearCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.LinearCS = LinearCS
    def factory(*args_, **kwargs_):
        if LinearCSPropertyType.subclass:
            return LinearCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return LinearCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LinearCS(self): return self.LinearCS
    def set_LinearCS(self, LinearCS): self.LinearCS = LinearCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.LinearCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LinearCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LinearCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LinearCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LinearCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LinearCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LinearCS is not None:
            self.LinearCS.export(outfile, level, namespace_='gml:', name_='LinearCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LinearCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LinearCS is not None:
            showIndent(outfile, level)
            outfile.write('LinearCS=model_.LinearCSType(\n')
            self.LinearCS.exportLiteral(outfile, level, name_='LinearCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LinearCS':
            obj_ = LinearCSType.factory()
            obj_.build(child_)
            self.LinearCS = obj_
            obj_.original_tagname_ = 'LinearCS'
# end class LinearCSPropertyType


class UserDefinedCSPropertyType(GeneratedsSuper):
    """gml:UserDefinedCSPropertyType is a property type for association
    roles to a user-defined coordinate system, either referencing or
    containing the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, UserDefinedCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.UserDefinedCS = UserDefinedCS
    def factory(*args_, **kwargs_):
        if UserDefinedCSPropertyType.subclass:
            return UserDefinedCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return UserDefinedCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UserDefinedCS(self): return self.UserDefinedCS
    def set_UserDefinedCS(self, UserDefinedCS): self.UserDefinedCS = UserDefinedCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UserDefinedCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UserDefinedCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UserDefinedCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UserDefinedCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UserDefinedCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UserDefinedCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UserDefinedCS is not None:
            self.UserDefinedCS.export(outfile, level, namespace_='gml:', name_='UserDefinedCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UserDefinedCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UserDefinedCS is not None:
            showIndent(outfile, level)
            outfile.write('UserDefinedCS=model_.UserDefinedCSType(\n')
            self.UserDefinedCS.exportLiteral(outfile, level, name_='UserDefinedCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UserDefinedCS':
            obj_ = UserDefinedCSType.factory()
            obj_.build(child_)
            self.UserDefinedCS = obj_
            obj_.original_tagname_ = 'UserDefinedCS'
# end class UserDefinedCSPropertyType


class SphericalCSPropertyType(GeneratedsSuper):
    """gml:SphericalCSPropertyType is property type for association roles
    to a spherical coordinate system, either referencing or
    containing the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, SphericalCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.SphericalCS = SphericalCS
    def factory(*args_, **kwargs_):
        if SphericalCSPropertyType.subclass:
            return SphericalCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return SphericalCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SphericalCS(self): return self.SphericalCS
    def set_SphericalCS(self, SphericalCS): self.SphericalCS = SphericalCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.SphericalCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SphericalCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SphericalCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SphericalCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SphericalCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SphericalCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SphericalCS is not None:
            self.SphericalCS.export(outfile, level, namespace_='gml:', name_='SphericalCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SphericalCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SphericalCS is not None:
            showIndent(outfile, level)
            outfile.write('SphericalCS=model_.SphericalCSType(\n')
            self.SphericalCS.exportLiteral(outfile, level, name_='SphericalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SphericalCS':
            obj_ = SphericalCSType.factory()
            obj_.build(child_)
            self.SphericalCS = obj_
            obj_.original_tagname_ = 'SphericalCS'
# end class SphericalCSPropertyType


class PolarCSPropertyType(GeneratedsSuper):
    """gml:PolarCSPropertyType is a property type for association roles to
    a polar coordinate system, either referencing or containing the
    definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, PolarCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.PolarCS = PolarCS
    def factory(*args_, **kwargs_):
        if PolarCSPropertyType.subclass:
            return PolarCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return PolarCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PolarCS(self): return self.PolarCS
    def set_PolarCS(self, PolarCS): self.PolarCS = PolarCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.PolarCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PolarCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PolarCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PolarCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PolarCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PolarCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PolarCS is not None:
            self.PolarCS.export(outfile, level, namespace_='gml:', name_='PolarCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PolarCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PolarCS is not None:
            showIndent(outfile, level)
            outfile.write('PolarCS=model_.PolarCSType(\n')
            self.PolarCS.exportLiteral(outfile, level, name_='PolarCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PolarCS':
            obj_ = PolarCSType.factory()
            obj_.build(child_)
            self.PolarCS = obj_
            obj_.original_tagname_ = 'PolarCS'
# end class PolarCSPropertyType


class CylindricalCSPropertyType(GeneratedsSuper):
    """gml:CylindricalCSPropertyType is a property type for association
    roles to a cylindrical coordinate system, either referencing or
    containing the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, CylindricalCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.CylindricalCS = CylindricalCS
    def factory(*args_, **kwargs_):
        if CylindricalCSPropertyType.subclass:
            return CylindricalCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return CylindricalCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CylindricalCS(self): return self.CylindricalCS
    def set_CylindricalCS(self, CylindricalCS): self.CylindricalCS = CylindricalCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CylindricalCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CylindricalCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CylindricalCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CylindricalCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CylindricalCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CylindricalCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CylindricalCS is not None:
            self.CylindricalCS.export(outfile, level, namespace_='gml:', name_='CylindricalCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CylindricalCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CylindricalCS is not None:
            showIndent(outfile, level)
            outfile.write('CylindricalCS=model_.CylindricalCSType(\n')
            self.CylindricalCS.exportLiteral(outfile, level, name_='CylindricalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CylindricalCS':
            obj_ = CylindricalCSType.factory()
            obj_.build(child_)
            self.CylindricalCS = obj_
            obj_.original_tagname_ = 'CylindricalCS'
# end class CylindricalCSPropertyType


class AffineCSPropertyType(GeneratedsSuper):
    """gml:AffineCSPropertyType is a property type for association roles to
    an affine coordinate system, either referencing or containing
    the definition of that coordinate system."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AffineCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AffineCS = AffineCS
    def factory(*args_, **kwargs_):
        if AffineCSPropertyType.subclass:
            return AffineCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return AffineCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AffineCS(self): return self.AffineCS
    def set_AffineCS(self, AffineCS): self.AffineCS = AffineCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AffineCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AffineCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AffineCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AffineCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AffineCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AffineCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AffineCS is not None:
            self.AffineCS.export(outfile, level, namespace_='gml:', name_='AffineCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AffineCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AffineCS is not None:
            showIndent(outfile, level)
            outfile.write('AffineCS=model_.AffineCSType(\n')
            self.AffineCS.exportLiteral(outfile, level, name_='AffineCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AffineCS':
            obj_ = AffineCSType.factory()
            obj_.build(child_)
            self.AffineCS = obj_
            obj_.original_tagname_ = 'AffineCS'
# end class AffineCSPropertyType


class IdentifiedObjectType(DefinitionType):
    """gml:IdentifiedObjectType provides identification properties of a
    CRS-related object. In gml:DefinitionType, the gml:identifier
    element shall be the primary name by which this object is
    identified, encoding the "name" attribute in the UML model. Zero
    or more of the gml:name elements can be an unordered set of
    "identifiers", encoding the "identifier" attribute in the UML
    model. Each of these gml:name elements can reference elsewhere
    the object's defining information or be an identifier by which
    this object can be referenced. Zero or more other gml:name
    elements can be an unordered set of "alias" alternative names by
    which this CRS related object is identified, encoding the
    "alias" attributes in the UML model. An object may have several
    aliases, typically used in different contexts. The context for
    an alias is indicated by the value of its (optional) codeSpace
    attribute. Any needed version information shall be included in
    the codeSpace attribute of a gml:identifier and gml:name
    elements. In this use, the gml:remarks element in the
    gml:DefinitionType shall contain comments on or information
    about this object, including data source information."""
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, extensiontype_=None):
        self.original_tagname_ = None
        super(IdentifiedObjectType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if IdentifiedObjectType.subclass:
            return IdentifiedObjectType.subclass(*args_, **kwargs_)
        else:
            return IdentifiedObjectType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(IdentifiedObjectType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='IdentifiedObjectType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IdentifiedObjectType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='IdentifiedObjectType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='IdentifiedObjectType'):
        super(IdentifiedObjectType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='IdentifiedObjectType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='IdentifiedObjectType', fromsubclass_=False, pretty_print=True):
        super(IdentifiedObjectType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='IdentifiedObjectType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(IdentifiedObjectType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(IdentifiedObjectType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(IdentifiedObjectType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(IdentifiedObjectType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class IdentifiedObjectType


class AbstractCRSType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        if domainOfValidity is None:
            self.domainOfValidity = []
        else:
            self.domainOfValidity = domainOfValidity
        if scope is None:
            self.scope = []
        else:
            self.scope = scope
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractCRSType.subclass:
            return AbstractCRSType.subclass(*args_, **kwargs_)
        else:
            return AbstractCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def add_domainOfValidity(self, value): self.domainOfValidity.append(value)
    def insert_domainOfValidity_at(self, index, value): self.domainOfValidity.insert(index, value)
    def replace_domainOfValidity_at(self, index, value): self.domainOfValidity[index] = value
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def add_scope(self, value): self.scope.append(value)
    def insert_scope_at(self, index, value): self.scope.insert(index, value)
    def replace_scope_at(self, index, value): self.scope[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.domainOfValidity or
            self.scope or
            super(AbstractCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractCRSType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractCRSType'):
        super(AbstractCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCRSType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractCRSType', fromsubclass_=False, pretty_print=True):
        super(AbstractCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for domainOfValidity_ in self.domainOfValidity:
            domainOfValidity_.export(outfile, level, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
        for scope_ in self.scope:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sscope>%s</%sscope>%s' % (namespace_, self.gds_format_string(quote_xml(scope_).encode(ExternalEncoding), input_name='scope'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AbstractCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractCRSType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('domainOfValidity=[\n')
        level += 1
        for domainOfValidity_ in self.domainOfValidity:
            showIndent(outfile, level)
            outfile.write('model_.domainOfValidity(\n')
            domainOfValidity_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('scope=[\n')
        level += 1
        for scope_ in self.scope:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(scope_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'domainOfValidity':
            obj_ = domainOfValidity.factory()
            obj_.build(child_)
            self.domainOfValidity.append(obj_)
            obj_.original_tagname_ = 'domainOfValidity'
        elif nodeName_ == 'scope':
            scope_ = child_.text
            scope_ = self.gds_validate_string(scope_, node, 'scope')
            self.scope.append(scope_)
        super(AbstractCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractCRSType


class domainOfValidity(GeneratedsSuper):
    """The gml:domainOfValidity property implements an association role to
    an EX_Extent object as encoded in ISO/TS 19139, either
    referencing or containing the definition of that extent."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, EX_Extent=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.EX_Extent = EX_Extent
    def factory(*args_, **kwargs_):
        if domainOfValidity.subclass:
            return domainOfValidity.subclass(*args_, **kwargs_)
        else:
            return domainOfValidity(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_Extent(self): return self.EX_Extent
    def set_EX_Extent(self, EX_Extent): self.EX_Extent = EX_Extent
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_Extent is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='domainOfValidity', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='domainOfValidity')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='domainOfValidity'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='domainOfValidity', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_Extent is not None:
            self.EX_Extent.export(outfile, level, namespace_='gmd:', name_='EX_Extent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='domainOfValidity'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_Extent is not None:
            showIndent(outfile, level)
            outfile.write('EX_Extent=model_.EX_Extent(\n')
            self.EX_Extent.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_Extent':
            obj_ = EX_Extent_Type.factory()
            obj_.build(child_)
            self.EX_Extent = obj_
            obj_.original_tagname_ = 'EX_Extent'
# end class domainOfValidity


class CRSPropertyType(GeneratedsSuper):
    """gml:CRSPropertyType is a property type for association roles to a
    CRS abstract coordinate reference system, either referencing or
    containing the definition of that CRS."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractCRS = AbstractCRS
    def factory(*args_, **kwargs_):
        if CRSPropertyType.subclass:
            return CRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return CRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCRS(self): return self.AbstractCRS
    def set_AbstractCRS(self, AbstractCRS): self.AbstractCRS = AbstractCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractCRS is not None:
            self.AbstractCRS.export(outfile, level, namespace_, name_='AbstractCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCRSType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCRSType=model_.AbstractCRSType(\n')
            self.AbstractCRSType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCRS> element')
            self.AbstractCRS = obj_
            obj_.original_tagname_ = 'AbstractCRS'
        elif nodeName_ == 'AbstractSingleCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleCRS> element')
            self.AbstractSingleCRS = obj_
            obj_.original_tagname_ = 'AbstractSingleCRS'
        elif nodeName_ == 'CompoundCRS':
            obj_ = CompoundCRSType.factory()
            obj_.build(child_)
            self.CompoundCRS = obj_
            obj_.original_tagname_ = 'CompoundCRS'
        elif nodeName_ == 'AbstractGeneralDerivedCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralDerivedCRS> element')
            self.AbstractGeneralDerivedCRS = obj_
            obj_.original_tagname_ = 'AbstractGeneralDerivedCRS'
        elif nodeName_ == 'GeodeticCRS':
            obj_ = GeodeticCRSType.factory()
            obj_.build(child_)
            self.GeodeticCRS = obj_
            obj_.original_tagname_ = 'GeodeticCRS'
        elif nodeName_ == 'VerticalCRS':
            obj_ = VerticalCRSType.factory()
            obj_.build(child_)
            self.VerticalCRS = obj_
            obj_.original_tagname_ = 'VerticalCRS'
        elif nodeName_ == 'EngineeringCRS':
            obj_ = EngineeringCRSType.factory()
            obj_.build(child_)
            self.EngineeringCRS = obj_
            obj_.original_tagname_ = 'EngineeringCRS'
        elif nodeName_ == 'ImageCRS':
            obj_ = ImageCRSType.factory()
            obj_.build(child_)
            self.ImageCRS = obj_
            obj_.original_tagname_ = 'ImageCRS'
        elif nodeName_ == 'TemporalCRS':
            obj_ = TemporalCRSType.factory()
            obj_.build(child_)
            self.TemporalCRS = obj_
            obj_.original_tagname_ = 'TemporalCRS'
        elif nodeName_ == 'GeographicCRS':
            obj_ = GeographicCRSType.factory()
            obj_.build(child_)
            self.GeographicCRS = obj_
            obj_.original_tagname_ = 'GeographicCRS'
        elif nodeName_ == 'GeocentricCRS':
            obj_ = GeocentricCRSType.factory()
            obj_.build(child_)
            self.GeocentricCRS = obj_
            obj_.original_tagname_ = 'GeocentricCRS'
        elif nodeName_ == 'ProjectedCRS':
            obj_ = ProjectedCRSType.factory()
            obj_.build(child_)
            self.ProjectedCRS = obj_
            obj_.original_tagname_ = 'ProjectedCRS'
        elif nodeName_ == 'DerivedCRS':
            obj_ = DerivedCRSType.factory()
            obj_.build(child_)
            self.DerivedCRS = obj_
            obj_.original_tagname_ = 'DerivedCRS'
# end class CRSPropertyType


class DS_Aggregate_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDS_Aggregate=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDS_Aggregate = AbstractDS_Aggregate
    def factory(*args_, **kwargs_):
        if DS_Aggregate_PropertyType.subclass:
            return DS_Aggregate_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_Aggregate_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDS_Aggregate(self): return self.AbstractDS_Aggregate
    def set_AbstractDS_Aggregate(self, AbstractDS_Aggregate): self.AbstractDS_Aggregate = AbstractDS_Aggregate
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDS_Aggregate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Aggregate_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Aggregate_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Aggregate_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Aggregate_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Aggregate_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDS_Aggregate is not None:
            self.AbstractDS_Aggregate.export(outfile, level, namespace_, name_='AbstractDS_Aggregate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Aggregate_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDS_Aggregate is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDS_Aggregate=model_.AbstractDS_Aggregate(\n')
            self.AbstractDS_Aggregate.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDS_Aggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDS_Aggregate> element')
            self.AbstractDS_Aggregate = obj_
            obj_.original_tagname_ = 'AbstractDS_Aggregate'
        elif nodeName_ == 'DS_OtherAggregate':
            class_obj_ = self.get_class_obj_(child_, DS_OtherAggregate_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DS_OtherAggregate = obj_
            obj_.original_tagname_ = 'DS_OtherAggregate'
        elif nodeName_ == 'DS_Series':
            class_obj_ = self.get_class_obj_(child_, DS_Series_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DS_Series = obj_
            obj_.original_tagname_ = 'DS_Series'
        elif nodeName_ == 'DS_Initiative':
            obj_ = DS_Initiative_Type.factory()
            obj_.build(child_)
            self.DS_Initiative = obj_
            obj_.original_tagname_ = 'DS_Initiative'
        elif nodeName_ == 'DS_StereoMate':
            obj_ = DS_StereoMate_Type.factory()
            obj_.build(child_)
            self.DS_StereoMate = obj_
            obj_.original_tagname_ = 'DS_StereoMate'
        elif nodeName_ == 'DS_Platform':
            obj_ = DS_Platform_Type.factory()
            obj_.build(child_)
            self.DS_Platform = obj_
            obj_.original_tagname_ = 'DS_Platform'
        elif nodeName_ == 'DS_Sensor':
            obj_ = DS_Sensor_Type.factory()
            obj_.build(child_)
            self.DS_Sensor = obj_
            obj_.original_tagname_ = 'DS_Sensor'
        elif nodeName_ == 'DS_ProductionSeries':
            obj_ = DS_ProductionSeries_Type.factory()
            obj_.build(child_)
            self.DS_ProductionSeries = obj_
            obj_.original_tagname_ = 'DS_ProductionSeries'
# end class DS_Aggregate_PropertyType


class DS_DataSet_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_DataSet=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_DataSet = DS_DataSet
    def factory(*args_, **kwargs_):
        if DS_DataSet_PropertyType.subclass:
            return DS_DataSet_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_DataSet_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_DataSet(self): return self.DS_DataSet
    def set_DS_DataSet(self, DS_DataSet): self.DS_DataSet = DS_DataSet
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_DataSet is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_DataSet_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_DataSet_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_DataSet_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_DataSet_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_DataSet_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_DataSet is not None:
            self.DS_DataSet.export(outfile, level, namespace_='gmd:', name_='DS_DataSet', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_DataSet_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_DataSet is not None:
            showIndent(outfile, level)
            outfile.write('DS_DataSet=model_.DS_DataSet(\n')
            self.DS_DataSet.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_DataSet':
            obj_ = DS_DataSet_Type.factory()
            obj_.build(child_)
            self.DS_DataSet = obj_
            obj_.original_tagname_ = 'DS_DataSet'
# end class DS_DataSet_PropertyType


class DS_OtherAggregate_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_OtherAggregate=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_OtherAggregate = DS_OtherAggregate
    def factory(*args_, **kwargs_):
        if DS_OtherAggregate_PropertyType.subclass:
            return DS_OtherAggregate_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_OtherAggregate_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_OtherAggregate(self): return self.DS_OtherAggregate
    def set_DS_OtherAggregate(self, DS_OtherAggregate): self.DS_OtherAggregate = DS_OtherAggregate
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_OtherAggregate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_OtherAggregate_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_OtherAggregate_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_OtherAggregate_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_OtherAggregate_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_OtherAggregate_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_OtherAggregate is not None:
            self.DS_OtherAggregate.export(outfile, level, namespace_='gmd:', name_='DS_OtherAggregate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_OtherAggregate_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_OtherAggregate is not None:
            showIndent(outfile, level)
            outfile.write('DS_OtherAggregate=model_.DS_OtherAggregate(\n')
            self.DS_OtherAggregate.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_OtherAggregate':
            class_obj_ = self.get_class_obj_(child_, DS_OtherAggregate_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DS_OtherAggregate = obj_
            obj_.original_tagname_ = 'DS_OtherAggregate'
        elif nodeName_ == 'DS_StereoMate':
            obj_ = DS_StereoMate_Type.factory()
            obj_.build(child_)
            self.DS_StereoMate = obj_
            obj_.original_tagname_ = 'DS_StereoMate'
# end class DS_OtherAggregate_PropertyType


class DS_Series_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_Series=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_Series = DS_Series
    def factory(*args_, **kwargs_):
        if DS_Series_PropertyType.subclass:
            return DS_Series_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_Series_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_Series(self): return self.DS_Series
    def set_DS_Series(self, DS_Series): self.DS_Series = DS_Series
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_Series is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Series_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Series_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Series_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Series_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Series_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_Series is not None:
            self.DS_Series.export(outfile, level, namespace_='gmd:', name_='DS_Series', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Series_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_Series is not None:
            showIndent(outfile, level)
            outfile.write('DS_Series=model_.DS_Series(\n')
            self.DS_Series.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_Series':
            class_obj_ = self.get_class_obj_(child_, DS_Series_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DS_Series = obj_
            obj_.original_tagname_ = 'DS_Series'
        elif nodeName_ == 'DS_Platform':
            obj_ = DS_Platform_Type.factory()
            obj_.build(child_)
            self.DS_Platform = obj_
            obj_.original_tagname_ = 'DS_Platform'
        elif nodeName_ == 'DS_Sensor':
            obj_ = DS_Sensor_Type.factory()
            obj_.build(child_)
            self.DS_Sensor = obj_
            obj_.original_tagname_ = 'DS_Sensor'
        elif nodeName_ == 'DS_ProductionSeries':
            obj_ = DS_ProductionSeries_Type.factory()
            obj_.build(child_)
            self.DS_ProductionSeries = obj_
            obj_.original_tagname_ = 'DS_ProductionSeries'
# end class DS_Series_PropertyType


class DS_Initiative_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_Initiative=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_Initiative = DS_Initiative
    def factory(*args_, **kwargs_):
        if DS_Initiative_PropertyType.subclass:
            return DS_Initiative_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_Initiative_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_Initiative(self): return self.DS_Initiative
    def set_DS_Initiative(self, DS_Initiative): self.DS_Initiative = DS_Initiative
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_Initiative is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Initiative_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Initiative_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Initiative_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Initiative_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Initiative_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_Initiative is not None:
            self.DS_Initiative.export(outfile, level, namespace_='gmd:', name_='DS_Initiative', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Initiative_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_Initiative is not None:
            showIndent(outfile, level)
            outfile.write('DS_Initiative=model_.DS_Initiative(\n')
            self.DS_Initiative.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_Initiative':
            obj_ = DS_Initiative_Type.factory()
            obj_.build(child_)
            self.DS_Initiative = obj_
            obj_.original_tagname_ = 'DS_Initiative'
# end class DS_Initiative_PropertyType


class DS_Platform_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_Platform=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_Platform = DS_Platform
    def factory(*args_, **kwargs_):
        if DS_Platform_PropertyType.subclass:
            return DS_Platform_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_Platform_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_Platform(self): return self.DS_Platform
    def set_DS_Platform(self, DS_Platform): self.DS_Platform = DS_Platform
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_Platform is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Platform_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Platform_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Platform_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Platform_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Platform_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_Platform is not None:
            self.DS_Platform.export(outfile, level, namespace_='gmd:', name_='DS_Platform', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Platform_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_Platform is not None:
            showIndent(outfile, level)
            outfile.write('DS_Platform=model_.DS_Platform(\n')
            self.DS_Platform.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_Platform':
            obj_ = DS_Platform_Type.factory()
            obj_.build(child_)
            self.DS_Platform = obj_
            obj_.original_tagname_ = 'DS_Platform'
# end class DS_Platform_PropertyType


class DS_Sensor_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_Sensor=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_Sensor = DS_Sensor
    def factory(*args_, **kwargs_):
        if DS_Sensor_PropertyType.subclass:
            return DS_Sensor_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_Sensor_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_Sensor(self): return self.DS_Sensor
    def set_DS_Sensor(self, DS_Sensor): self.DS_Sensor = DS_Sensor
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_Sensor is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Sensor_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Sensor_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Sensor_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Sensor_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Sensor_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_Sensor is not None:
            self.DS_Sensor.export(outfile, level, namespace_='gmd:', name_='DS_Sensor', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Sensor_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_Sensor is not None:
            showIndent(outfile, level)
            outfile.write('DS_Sensor=model_.DS_Sensor(\n')
            self.DS_Sensor.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_Sensor':
            obj_ = DS_Sensor_Type.factory()
            obj_.build(child_)
            self.DS_Sensor = obj_
            obj_.original_tagname_ = 'DS_Sensor'
# end class DS_Sensor_PropertyType


class DS_ProductionSeries_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_ProductionSeries=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_ProductionSeries = DS_ProductionSeries
    def factory(*args_, **kwargs_):
        if DS_ProductionSeries_PropertyType.subclass:
            return DS_ProductionSeries_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_ProductionSeries_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_ProductionSeries(self): return self.DS_ProductionSeries
    def set_DS_ProductionSeries(self, DS_ProductionSeries): self.DS_ProductionSeries = DS_ProductionSeries
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_ProductionSeries is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_ProductionSeries_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_ProductionSeries_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_ProductionSeries_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_ProductionSeries_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_ProductionSeries_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_ProductionSeries is not None:
            self.DS_ProductionSeries.export(outfile, level, namespace_='gmd:', name_='DS_ProductionSeries', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_ProductionSeries_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_ProductionSeries is not None:
            showIndent(outfile, level)
            outfile.write('DS_ProductionSeries=model_.DS_ProductionSeries(\n')
            self.DS_ProductionSeries.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_ProductionSeries':
            obj_ = DS_ProductionSeries_Type.factory()
            obj_.build(child_)
            self.DS_ProductionSeries = obj_
            obj_.original_tagname_ = 'DS_ProductionSeries'
# end class DS_ProductionSeries_PropertyType


class DS_StereoMate_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_StereoMate=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_StereoMate = DS_StereoMate
    def factory(*args_, **kwargs_):
        if DS_StereoMate_PropertyType.subclass:
            return DS_StereoMate_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_StereoMate_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_StereoMate(self): return self.DS_StereoMate
    def set_DS_StereoMate(self, DS_StereoMate): self.DS_StereoMate = DS_StereoMate
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_StereoMate is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_StereoMate_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_StereoMate_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_StereoMate_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_StereoMate_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_StereoMate_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_StereoMate is not None:
            self.DS_StereoMate.export(outfile, level, namespace_='gmd:', name_='DS_StereoMate', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_StereoMate_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_StereoMate is not None:
            showIndent(outfile, level)
            outfile.write('DS_StereoMate=model_.DS_StereoMate(\n')
            self.DS_StereoMate.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_StereoMate':
            obj_ = DS_StereoMate_Type.factory()
            obj_.build(child_)
            self.DS_StereoMate = obj_
            obj_.original_tagname_ = 'DS_StereoMate'
# end class DS_StereoMate_PropertyType


class MD_Metadata_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Metadata=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Metadata = MD_Metadata
    def factory(*args_, **kwargs_):
        if MD_Metadata_PropertyType.subclass:
            return MD_Metadata_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Metadata_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Metadata(self): return self.MD_Metadata
    def set_MD_Metadata(self, MD_Metadata): self.MD_Metadata = MD_Metadata
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Metadata is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Metadata_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Metadata_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Metadata_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Metadata_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Metadata_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Metadata is not None:
            self.MD_Metadata.export(outfile, level, namespace_='gmd:', name_='MD_Metadata', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Metadata_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Metadata is not None:
            showIndent(outfile, level)
            outfile.write('MD_Metadata=model_.MD_Metadata(\n')
            self.MD_Metadata.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Metadata':
            obj_ = MD_Metadata_Type.factory()
            obj_.build(child_)
            self.MD_Metadata = obj_
            obj_.original_tagname_ = 'MD_Metadata'
# end class MD_Metadata_PropertyType


class MD_GridSpatialRepresentation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_GridSpatialRepresentation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_GridSpatialRepresentation = MD_GridSpatialRepresentation
    def factory(*args_, **kwargs_):
        if MD_GridSpatialRepresentation_PropertyType.subclass:
            return MD_GridSpatialRepresentation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_GridSpatialRepresentation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_GridSpatialRepresentation(self): return self.MD_GridSpatialRepresentation
    def set_MD_GridSpatialRepresentation(self, MD_GridSpatialRepresentation): self.MD_GridSpatialRepresentation = MD_GridSpatialRepresentation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_GridSpatialRepresentation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_GridSpatialRepresentation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GridSpatialRepresentation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_GridSpatialRepresentation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_GridSpatialRepresentation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_GridSpatialRepresentation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_GridSpatialRepresentation is not None:
            self.MD_GridSpatialRepresentation.export(outfile, level, namespace_='gmd:', name_='MD_GridSpatialRepresentation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_GridSpatialRepresentation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_GridSpatialRepresentation is not None:
            showIndent(outfile, level)
            outfile.write('MD_GridSpatialRepresentation=model_.MD_GridSpatialRepresentation(\n')
            self.MD_GridSpatialRepresentation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_GridSpatialRepresentation':
            class_obj_ = self.get_class_obj_(child_, MD_GridSpatialRepresentation_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_GridSpatialRepresentation = obj_
            obj_.original_tagname_ = 'MD_GridSpatialRepresentation'
        elif nodeName_ == 'MD_Georeferenceable':
            obj_ = MD_Georeferenceable_Type.factory()
            obj_.build(child_)
            self.MD_Georeferenceable = obj_
            obj_.original_tagname_ = 'MD_Georeferenceable'
        elif nodeName_ == 'MD_Georectified':
            obj_ = MD_Georectified_Type.factory()
            obj_.build(child_)
            self.MD_Georectified = obj_
            obj_.original_tagname_ = 'MD_Georectified'
# end class MD_GridSpatialRepresentation_PropertyType


class MD_VectorSpatialRepresentation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_VectorSpatialRepresentation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_VectorSpatialRepresentation = MD_VectorSpatialRepresentation
    def factory(*args_, **kwargs_):
        if MD_VectorSpatialRepresentation_PropertyType.subclass:
            return MD_VectorSpatialRepresentation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_VectorSpatialRepresentation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_VectorSpatialRepresentation(self): return self.MD_VectorSpatialRepresentation
    def set_MD_VectorSpatialRepresentation(self, MD_VectorSpatialRepresentation): self.MD_VectorSpatialRepresentation = MD_VectorSpatialRepresentation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_VectorSpatialRepresentation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_VectorSpatialRepresentation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_VectorSpatialRepresentation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_VectorSpatialRepresentation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_VectorSpatialRepresentation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_VectorSpatialRepresentation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_VectorSpatialRepresentation is not None:
            self.MD_VectorSpatialRepresentation.export(outfile, level, namespace_='gmd:', name_='MD_VectorSpatialRepresentation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_VectorSpatialRepresentation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_VectorSpatialRepresentation is not None:
            showIndent(outfile, level)
            outfile.write('MD_VectorSpatialRepresentation=model_.MD_VectorSpatialRepresentation(\n')
            self.MD_VectorSpatialRepresentation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_VectorSpatialRepresentation':
            obj_ = MD_VectorSpatialRepresentation_Type.factory()
            obj_.build(child_)
            self.MD_VectorSpatialRepresentation = obj_
            obj_.original_tagname_ = 'MD_VectorSpatialRepresentation'
# end class MD_VectorSpatialRepresentation_PropertyType


class MD_SpatialRepresentation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractMD_SpatialRepresentation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractMD_SpatialRepresentation = AbstractMD_SpatialRepresentation
    def factory(*args_, **kwargs_):
        if MD_SpatialRepresentation_PropertyType.subclass:
            return MD_SpatialRepresentation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_SpatialRepresentation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractMD_SpatialRepresentation(self): return self.AbstractMD_SpatialRepresentation
    def set_AbstractMD_SpatialRepresentation(self, AbstractMD_SpatialRepresentation): self.AbstractMD_SpatialRepresentation = AbstractMD_SpatialRepresentation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractMD_SpatialRepresentation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_SpatialRepresentation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_SpatialRepresentation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_SpatialRepresentation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_SpatialRepresentation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_SpatialRepresentation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractMD_SpatialRepresentation is not None:
            self.AbstractMD_SpatialRepresentation.export(outfile, level, namespace_, name_='AbstractMD_SpatialRepresentation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_SpatialRepresentation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractMD_SpatialRepresentation is not None:
            showIndent(outfile, level)
            outfile.write('AbstractMD_SpatialRepresentation=model_.AbstractMD_SpatialRepresentation(\n')
            self.AbstractMD_SpatialRepresentation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractMD_SpatialRepresentation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractMD_SpatialRepresentation> element')
            self.AbstractMD_SpatialRepresentation = obj_
            obj_.original_tagname_ = 'AbstractMD_SpatialRepresentation'
        elif nodeName_ == 'MD_GridSpatialRepresentation':
            class_obj_ = self.get_class_obj_(child_, MD_GridSpatialRepresentation_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_GridSpatialRepresentation = obj_
            obj_.original_tagname_ = 'MD_GridSpatialRepresentation'
        elif nodeName_ == 'MD_VectorSpatialRepresentation':
            obj_ = MD_VectorSpatialRepresentation_Type.factory()
            obj_.build(child_)
            self.MD_VectorSpatialRepresentation = obj_
            obj_.original_tagname_ = 'MD_VectorSpatialRepresentation'
        elif nodeName_ == 'MD_Georeferenceable':
            obj_ = MD_Georeferenceable_Type.factory()
            obj_.build(child_)
            self.MD_Georeferenceable = obj_
            obj_.original_tagname_ = 'MD_Georeferenceable'
        elif nodeName_ == 'MD_Georectified':
            obj_ = MD_Georectified_Type.factory()
            obj_.build(child_)
            self.MD_Georectified = obj_
            obj_.original_tagname_ = 'MD_Georectified'
# end class MD_SpatialRepresentation_PropertyType


class MD_Georeferenceable_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Georeferenceable=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Georeferenceable = MD_Georeferenceable
    def factory(*args_, **kwargs_):
        if MD_Georeferenceable_PropertyType.subclass:
            return MD_Georeferenceable_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Georeferenceable_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Georeferenceable(self): return self.MD_Georeferenceable
    def set_MD_Georeferenceable(self, MD_Georeferenceable): self.MD_Georeferenceable = MD_Georeferenceable
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Georeferenceable is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Georeferenceable_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Georeferenceable_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Georeferenceable_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Georeferenceable_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Georeferenceable_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Georeferenceable is not None:
            self.MD_Georeferenceable.export(outfile, level, namespace_='gmd:', name_='MD_Georeferenceable', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Georeferenceable_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Georeferenceable is not None:
            showIndent(outfile, level)
            outfile.write('MD_Georeferenceable=model_.MD_Georeferenceable(\n')
            self.MD_Georeferenceable.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Georeferenceable':
            obj_ = MD_Georeferenceable_Type.factory()
            obj_.build(child_)
            self.MD_Georeferenceable = obj_
            obj_.original_tagname_ = 'MD_Georeferenceable'
# end class MD_Georeferenceable_PropertyType


class MD_Dimension_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Dimension=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Dimension = MD_Dimension
    def factory(*args_, **kwargs_):
        if MD_Dimension_PropertyType.subclass:
            return MD_Dimension_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Dimension_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Dimension(self): return self.MD_Dimension
    def set_MD_Dimension(self, MD_Dimension): self.MD_Dimension = MD_Dimension
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Dimension is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Dimension_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Dimension_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Dimension_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Dimension_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Dimension_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Dimension is not None:
            self.MD_Dimension.export(outfile, level, namespace_='gmd:', name_='MD_Dimension', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Dimension_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Dimension is not None:
            showIndent(outfile, level)
            outfile.write('MD_Dimension=model_.MD_Dimension(\n')
            self.MD_Dimension.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Dimension':
            obj_ = MD_Dimension_Type.factory()
            obj_.build(child_)
            self.MD_Dimension = obj_
            obj_.original_tagname_ = 'MD_Dimension'
# end class MD_Dimension_PropertyType


class MD_Georectified_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Georectified=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Georectified = MD_Georectified
    def factory(*args_, **kwargs_):
        if MD_Georectified_PropertyType.subclass:
            return MD_Georectified_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Georectified_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Georectified(self): return self.MD_Georectified
    def set_MD_Georectified(self, MD_Georectified): self.MD_Georectified = MD_Georectified
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Georectified is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Georectified_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Georectified_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Georectified_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Georectified_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Georectified_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Georectified is not None:
            self.MD_Georectified.export(outfile, level, namespace_='gmd:', name_='MD_Georectified', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Georectified_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Georectified is not None:
            showIndent(outfile, level)
            outfile.write('MD_Georectified=model_.MD_Georectified(\n')
            self.MD_Georectified.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Georectified':
            obj_ = MD_Georectified_Type.factory()
            obj_.build(child_)
            self.MD_Georectified = obj_
            obj_.original_tagname_ = 'MD_Georectified'
# end class MD_Georectified_PropertyType


class MD_GeometricObjects_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_GeometricObjects=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_GeometricObjects = MD_GeometricObjects
    def factory(*args_, **kwargs_):
        if MD_GeometricObjects_PropertyType.subclass:
            return MD_GeometricObjects_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_GeometricObjects_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_GeometricObjects(self): return self.MD_GeometricObjects
    def set_MD_GeometricObjects(self, MD_GeometricObjects): self.MD_GeometricObjects = MD_GeometricObjects
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_GeometricObjects is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_GeometricObjects_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GeometricObjects_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_GeometricObjects_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_GeometricObjects_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_GeometricObjects_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_GeometricObjects is not None:
            self.MD_GeometricObjects.export(outfile, level, namespace_='gmd:', name_='MD_GeometricObjects', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_GeometricObjects_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_GeometricObjects is not None:
            showIndent(outfile, level)
            outfile.write('MD_GeometricObjects=model_.MD_GeometricObjects(\n')
            self.MD_GeometricObjects.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_GeometricObjects':
            obj_ = MD_GeometricObjects_Type.factory()
            obj_.build(child_)
            self.MD_GeometricObjects = obj_
            obj_.original_tagname_ = 'MD_GeometricObjects'
# end class MD_GeometricObjects_PropertyType


class MD_PixelOrientationCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_PixelOrientationCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_PixelOrientationCode = MD_PixelOrientationCode
    def factory(*args_, **kwargs_):
        if MD_PixelOrientationCode_PropertyType.subclass:
            return MD_PixelOrientationCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_PixelOrientationCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_PixelOrientationCode(self): return self.MD_PixelOrientationCode
    def set_MD_PixelOrientationCode(self, MD_PixelOrientationCode): self.MD_PixelOrientationCode = MD_PixelOrientationCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_PixelOrientationCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_PixelOrientationCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_PixelOrientationCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_PixelOrientationCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_PixelOrientationCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_PixelOrientationCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_PixelOrientationCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMD_PixelOrientationCode>%s</%sMD_PixelOrientationCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.MD_PixelOrientationCode).encode(ExternalEncoding), input_name='MD_PixelOrientationCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='MD_PixelOrientationCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_PixelOrientationCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_PixelOrientationCode=%s,\n' % quote_python(self.MD_PixelOrientationCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_PixelOrientationCode':
            MD_PixelOrientationCode_ = child_.text
            MD_PixelOrientationCode_ = self.gds_validate_string(MD_PixelOrientationCode_, node, 'MD_PixelOrientationCode')
            self.MD_PixelOrientationCode = MD_PixelOrientationCode_
# end class MD_PixelOrientationCode_PropertyType


class MD_TopologyLevelCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_TopologyLevelCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_TopologyLevelCode = MD_TopologyLevelCode
    def factory(*args_, **kwargs_):
        if MD_TopologyLevelCode_PropertyType.subclass:
            return MD_TopologyLevelCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_TopologyLevelCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_TopologyLevelCode(self): return self.MD_TopologyLevelCode
    def set_MD_TopologyLevelCode(self, MD_TopologyLevelCode): self.MD_TopologyLevelCode = MD_TopologyLevelCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_TopologyLevelCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_TopologyLevelCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_TopologyLevelCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_TopologyLevelCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_TopologyLevelCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_TopologyLevelCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_TopologyLevelCode is not None:
            self.MD_TopologyLevelCode.export(outfile, level, namespace_='gmd:', name_='MD_TopologyLevelCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_TopologyLevelCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_TopologyLevelCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_TopologyLevelCode=model_.MD_TopologyLevelCode(\n')
            self.MD_TopologyLevelCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_TopologyLevelCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_TopologyLevelCode = obj_
            obj_.original_tagname_ = 'MD_TopologyLevelCode'
# end class MD_TopologyLevelCode_PropertyType


class MD_GeometricObjectTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_GeometricObjectTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_GeometricObjectTypeCode = MD_GeometricObjectTypeCode
    def factory(*args_, **kwargs_):
        if MD_GeometricObjectTypeCode_PropertyType.subclass:
            return MD_GeometricObjectTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_GeometricObjectTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_GeometricObjectTypeCode(self): return self.MD_GeometricObjectTypeCode
    def set_MD_GeometricObjectTypeCode(self, MD_GeometricObjectTypeCode): self.MD_GeometricObjectTypeCode = MD_GeometricObjectTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_GeometricObjectTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_GeometricObjectTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GeometricObjectTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_GeometricObjectTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_GeometricObjectTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_GeometricObjectTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_GeometricObjectTypeCode is not None:
            self.MD_GeometricObjectTypeCode.export(outfile, level, namespace_='gmd:', name_='MD_GeometricObjectTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_GeometricObjectTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_GeometricObjectTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_GeometricObjectTypeCode=model_.MD_GeometricObjectTypeCode(\n')
            self.MD_GeometricObjectTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_GeometricObjectTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_GeometricObjectTypeCode = obj_
            obj_.original_tagname_ = 'MD_GeometricObjectTypeCode'
# end class MD_GeometricObjectTypeCode_PropertyType


class MD_CellGeometryCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_CellGeometryCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_CellGeometryCode = MD_CellGeometryCode
    def factory(*args_, **kwargs_):
        if MD_CellGeometryCode_PropertyType.subclass:
            return MD_CellGeometryCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_CellGeometryCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_CellGeometryCode(self): return self.MD_CellGeometryCode
    def set_MD_CellGeometryCode(self, MD_CellGeometryCode): self.MD_CellGeometryCode = MD_CellGeometryCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_CellGeometryCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_CellGeometryCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_CellGeometryCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_CellGeometryCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_CellGeometryCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_CellGeometryCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_CellGeometryCode is not None:
            self.MD_CellGeometryCode.export(outfile, level, namespace_='gmd:', name_='MD_CellGeometryCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_CellGeometryCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_CellGeometryCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_CellGeometryCode=model_.MD_CellGeometryCode(\n')
            self.MD_CellGeometryCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_CellGeometryCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_CellGeometryCode = obj_
            obj_.original_tagname_ = 'MD_CellGeometryCode'
# end class MD_CellGeometryCode_PropertyType


class MD_DimensionNameTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_DimensionNameTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_DimensionNameTypeCode = MD_DimensionNameTypeCode
    def factory(*args_, **kwargs_):
        if MD_DimensionNameTypeCode_PropertyType.subclass:
            return MD_DimensionNameTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_DimensionNameTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_DimensionNameTypeCode(self): return self.MD_DimensionNameTypeCode
    def set_MD_DimensionNameTypeCode(self, MD_DimensionNameTypeCode): self.MD_DimensionNameTypeCode = MD_DimensionNameTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_DimensionNameTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DimensionNameTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DimensionNameTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DimensionNameTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DimensionNameTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DimensionNameTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_DimensionNameTypeCode is not None:
            self.MD_DimensionNameTypeCode.export(outfile, level, namespace_='gmd:', name_='MD_DimensionNameTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DimensionNameTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_DimensionNameTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_DimensionNameTypeCode=model_.MD_DimensionNameTypeCode(\n')
            self.MD_DimensionNameTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_DimensionNameTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_DimensionNameTypeCode = obj_
            obj_.original_tagname_ = 'MD_DimensionNameTypeCode'
# end class MD_DimensionNameTypeCode_PropertyType


class CI_ResponsibleParty_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_ResponsibleParty=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_ResponsibleParty = CI_ResponsibleParty
    def factory(*args_, **kwargs_):
        if CI_ResponsibleParty_PropertyType.subclass:
            return CI_ResponsibleParty_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_ResponsibleParty_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_ResponsibleParty(self): return self.CI_ResponsibleParty
    def set_CI_ResponsibleParty(self, CI_ResponsibleParty): self.CI_ResponsibleParty = CI_ResponsibleParty
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_ResponsibleParty is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_ResponsibleParty_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_ResponsibleParty_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_ResponsibleParty_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_ResponsibleParty_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_ResponsibleParty_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_ResponsibleParty is not None:
            self.CI_ResponsibleParty.export(outfile, level, namespace_='gmd:', name_='CI_ResponsibleParty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_ResponsibleParty_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_ResponsibleParty is not None:
            showIndent(outfile, level)
            outfile.write('CI_ResponsibleParty=model_.CI_ResponsibleParty(\n')
            self.CI_ResponsibleParty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_ResponsibleParty':
            obj_ = CI_ResponsibleParty_Type.factory()
            obj_.build(child_)
            self.CI_ResponsibleParty = obj_
            obj_.original_tagname_ = 'CI_ResponsibleParty'
# end class CI_ResponsibleParty_PropertyType


class CI_Citation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_Citation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_Citation = CI_Citation
    def factory(*args_, **kwargs_):
        if CI_Citation_PropertyType.subclass:
            return CI_Citation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_Citation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Citation(self): return self.CI_Citation
    def set_CI_Citation(self, CI_Citation): self.CI_Citation = CI_Citation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Citation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Citation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Citation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Citation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Citation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Citation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Citation is not None:
            self.CI_Citation.export(outfile, level, namespace_='gmd:', name_='CI_Citation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Citation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Citation is not None:
            showIndent(outfile, level)
            outfile.write('CI_Citation=model_.CI_Citation(\n')
            self.CI_Citation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Citation':
            obj_ = CI_Citation_Type.factory()
            obj_.build(child_)
            self.CI_Citation = obj_
            obj_.original_tagname_ = 'CI_Citation'
# end class CI_Citation_PropertyType


class CI_Address_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_Address=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_Address = CI_Address
    def factory(*args_, **kwargs_):
        if CI_Address_PropertyType.subclass:
            return CI_Address_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_Address_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Address(self): return self.CI_Address
    def set_CI_Address(self, CI_Address): self.CI_Address = CI_Address
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Address is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Address_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Address_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Address_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Address_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Address_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Address is not None:
            self.CI_Address.export(outfile, level, namespace_='gmd:', name_='CI_Address', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Address_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Address is not None:
            showIndent(outfile, level)
            outfile.write('CI_Address=model_.CI_Address(\n')
            self.CI_Address.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Address':
            obj_ = CI_Address_Type.factory()
            obj_.build(child_)
            self.CI_Address = obj_
            obj_.original_tagname_ = 'CI_Address'
# end class CI_Address_PropertyType


class CI_OnlineResource_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_OnlineResource=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_OnlineResource = CI_OnlineResource
    def factory(*args_, **kwargs_):
        if CI_OnlineResource_PropertyType.subclass:
            return CI_OnlineResource_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_OnlineResource_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_OnlineResource(self): return self.CI_OnlineResource
    def set_CI_OnlineResource(self, CI_OnlineResource): self.CI_OnlineResource = CI_OnlineResource
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_OnlineResource is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_OnlineResource_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_OnlineResource_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_OnlineResource_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_OnlineResource_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_OnlineResource_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_OnlineResource is not None:
            self.CI_OnlineResource.export(outfile, level, namespace_='gmd:', name_='CI_OnlineResource', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_OnlineResource_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_OnlineResource is not None:
            showIndent(outfile, level)
            outfile.write('CI_OnlineResource=model_.CI_OnlineResource(\n')
            self.CI_OnlineResource.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_OnlineResource':
            obj_ = CI_OnlineResource_Type.factory()
            obj_.build(child_)
            self.CI_OnlineResource = obj_
            obj_.original_tagname_ = 'CI_OnlineResource'
# end class CI_OnlineResource_PropertyType


class CI_Contact_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_Contact=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_Contact = CI_Contact
    def factory(*args_, **kwargs_):
        if CI_Contact_PropertyType.subclass:
            return CI_Contact_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_Contact_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Contact(self): return self.CI_Contact
    def set_CI_Contact(self, CI_Contact): self.CI_Contact = CI_Contact
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Contact is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Contact_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Contact_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Contact_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Contact_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Contact_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Contact is not None:
            self.CI_Contact.export(outfile, level, namespace_='gmd:', name_='CI_Contact', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Contact_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Contact is not None:
            showIndent(outfile, level)
            outfile.write('CI_Contact=model_.CI_Contact(\n')
            self.CI_Contact.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Contact':
            obj_ = CI_Contact_Type.factory()
            obj_.build(child_)
            self.CI_Contact = obj_
            obj_.original_tagname_ = 'CI_Contact'
# end class CI_Contact_PropertyType


class CI_Telephone_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_Telephone=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_Telephone = CI_Telephone
    def factory(*args_, **kwargs_):
        if CI_Telephone_PropertyType.subclass:
            return CI_Telephone_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_Telephone_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Telephone(self): return self.CI_Telephone
    def set_CI_Telephone(self, CI_Telephone): self.CI_Telephone = CI_Telephone
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Telephone is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Telephone_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Telephone_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Telephone_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Telephone_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Telephone_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Telephone is not None:
            self.CI_Telephone.export(outfile, level, namespace_='gmd:', name_='CI_Telephone', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Telephone_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Telephone is not None:
            showIndent(outfile, level)
            outfile.write('CI_Telephone=model_.CI_Telephone(\n')
            self.CI_Telephone.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Telephone':
            obj_ = CI_Telephone_Type.factory()
            obj_.build(child_)
            self.CI_Telephone = obj_
            obj_.original_tagname_ = 'CI_Telephone'
# end class CI_Telephone_PropertyType


class CI_Date_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_Date=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_Date = CI_Date
    def factory(*args_, **kwargs_):
        if CI_Date_PropertyType.subclass:
            return CI_Date_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_Date_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Date(self): return self.CI_Date
    def set_CI_Date(self, CI_Date): self.CI_Date = CI_Date
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Date is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Date_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Date_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Date_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Date_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Date_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Date is not None:
            self.CI_Date.export(outfile, level, namespace_='gmd:', name_='CI_Date', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Date_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Date is not None:
            showIndent(outfile, level)
            outfile.write('CI_Date=model_.CI_Date(\n')
            self.CI_Date.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Date':
            obj_ = CI_Date_Type.factory()
            obj_.build(child_)
            self.CI_Date = obj_
            obj_.original_tagname_ = 'CI_Date'
# end class CI_Date_PropertyType


class CI_Series_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, CI_Series=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.CI_Series = CI_Series
    def factory(*args_, **kwargs_):
        if CI_Series_PropertyType.subclass:
            return CI_Series_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_Series_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Series(self): return self.CI_Series
    def set_CI_Series(self, CI_Series): self.CI_Series = CI_Series
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Series is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Series_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Series_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Series_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Series_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Series_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Series is not None:
            self.CI_Series.export(outfile, level, namespace_='gmd:', name_='CI_Series', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Series_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Series is not None:
            showIndent(outfile, level)
            outfile.write('CI_Series=model_.CI_Series(\n')
            self.CI_Series.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Series':
            obj_ = CI_Series_Type.factory()
            obj_.build(child_)
            self.CI_Series = obj_
            obj_.original_tagname_ = 'CI_Series'
# end class CI_Series_PropertyType


class URL_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, URL=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.URL = URL
    def factory(*args_, **kwargs_):
        if URL_PropertyType.subclass:
            return URL_PropertyType.subclass(*args_, **kwargs_)
        else:
            return URL_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_URL(self): return self.URL
    def set_URL(self, URL): self.URL = URL
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.URL is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='URL_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='URL_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='URL_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='URL_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='URL_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.URL is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sURL>%s</%sURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.URL).encode(ExternalEncoding), input_name='URL'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='URL_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.URL is not None:
            showIndent(outfile, level)
            outfile.write('URL=%s,\n' % quote_python(self.URL).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'URL':
            URL_ = child_.text
            URL_ = self.gds_validate_string(URL_, node, 'URL')
            self.URL = URL_
# end class URL_PropertyType


class CI_RoleCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, CI_RoleCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.CI_RoleCode = CI_RoleCode
    def factory(*args_, **kwargs_):
        if CI_RoleCode_PropertyType.subclass:
            return CI_RoleCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_RoleCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_RoleCode(self): return self.CI_RoleCode
    def set_CI_RoleCode(self, CI_RoleCode): self.CI_RoleCode = CI_RoleCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.CI_RoleCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_RoleCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_RoleCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_RoleCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_RoleCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_RoleCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_RoleCode is not None:
            self.CI_RoleCode.export(outfile, level, namespace_='gmd:', name_='CI_RoleCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_RoleCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_RoleCode is not None:
            showIndent(outfile, level)
            outfile.write('CI_RoleCode=model_.CI_RoleCode(\n')
            self.CI_RoleCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_RoleCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_RoleCode = obj_
            obj_.original_tagname_ = 'CI_RoleCode'
# end class CI_RoleCode_PropertyType


class CI_PresentationFormCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, CI_PresentationFormCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.CI_PresentationFormCode = CI_PresentationFormCode
    def factory(*args_, **kwargs_):
        if CI_PresentationFormCode_PropertyType.subclass:
            return CI_PresentationFormCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_PresentationFormCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_PresentationFormCode(self): return self.CI_PresentationFormCode
    def set_CI_PresentationFormCode(self, CI_PresentationFormCode): self.CI_PresentationFormCode = CI_PresentationFormCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.CI_PresentationFormCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_PresentationFormCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_PresentationFormCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_PresentationFormCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_PresentationFormCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_PresentationFormCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_PresentationFormCode is not None:
            self.CI_PresentationFormCode.export(outfile, level, namespace_='gmd:', name_='CI_PresentationFormCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_PresentationFormCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_PresentationFormCode is not None:
            showIndent(outfile, level)
            outfile.write('CI_PresentationFormCode=model_.CI_PresentationFormCode(\n')
            self.CI_PresentationFormCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_PresentationFormCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_PresentationFormCode = obj_
            obj_.original_tagname_ = 'CI_PresentationFormCode'
# end class CI_PresentationFormCode_PropertyType


class CI_OnLineFunctionCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, CI_OnLineFunctionCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.CI_OnLineFunctionCode = CI_OnLineFunctionCode
    def factory(*args_, **kwargs_):
        if CI_OnLineFunctionCode_PropertyType.subclass:
            return CI_OnLineFunctionCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_OnLineFunctionCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_OnLineFunctionCode(self): return self.CI_OnLineFunctionCode
    def set_CI_OnLineFunctionCode(self, CI_OnLineFunctionCode): self.CI_OnLineFunctionCode = CI_OnLineFunctionCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.CI_OnLineFunctionCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_OnLineFunctionCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_OnLineFunctionCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_OnLineFunctionCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_OnLineFunctionCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_OnLineFunctionCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_OnLineFunctionCode is not None:
            self.CI_OnLineFunctionCode.export(outfile, level, namespace_='gmd:', name_='CI_OnLineFunctionCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_OnLineFunctionCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_OnLineFunctionCode is not None:
            showIndent(outfile, level)
            outfile.write('CI_OnLineFunctionCode=model_.CI_OnLineFunctionCode(\n')
            self.CI_OnLineFunctionCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_OnLineFunctionCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_OnLineFunctionCode = obj_
            obj_.original_tagname_ = 'CI_OnLineFunctionCode'
# end class CI_OnLineFunctionCode_PropertyType


class CI_DateTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, CI_DateTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.CI_DateTypeCode = CI_DateTypeCode
    def factory(*args_, **kwargs_):
        if CI_DateTypeCode_PropertyType.subclass:
            return CI_DateTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CI_DateTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_DateTypeCode(self): return self.CI_DateTypeCode
    def set_CI_DateTypeCode(self, CI_DateTypeCode): self.CI_DateTypeCode = CI_DateTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.CI_DateTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_DateTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_DateTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_DateTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_DateTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_DateTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_DateTypeCode is not None:
            self.CI_DateTypeCode.export(outfile, level, namespace_='gmd:', name_='CI_DateTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_DateTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_DateTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('CI_DateTypeCode=model_.CI_DateTypeCode(\n')
            self.CI_DateTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_DateTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_DateTypeCode = obj_
            obj_.original_tagname_ = 'CI_DateTypeCode'
# end class CI_DateTypeCode_PropertyType


class RS_Identifier_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, RS_Identifier=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.RS_Identifier = RS_Identifier
    def factory(*args_, **kwargs_):
        if RS_Identifier_PropertyType.subclass:
            return RS_Identifier_PropertyType.subclass(*args_, **kwargs_)
        else:
            return RS_Identifier_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RS_Identifier(self): return self.RS_Identifier
    def set_RS_Identifier(self, RS_Identifier): self.RS_Identifier = RS_Identifier
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.RS_Identifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RS_Identifier_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RS_Identifier_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RS_Identifier_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RS_Identifier_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RS_Identifier_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RS_Identifier is not None:
            self.RS_Identifier.export(outfile, level, namespace_='gmd:', name_='RS_Identifier', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RS_Identifier_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RS_Identifier is not None:
            showIndent(outfile, level)
            outfile.write('RS_Identifier=model_.RS_Identifier(\n')
            self.RS_Identifier.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RS_Identifier':
            obj_ = RS_Identifier_Type.factory()
            obj_.build(child_)
            self.RS_Identifier = obj_
            obj_.original_tagname_ = 'RS_Identifier'
# end class RS_Identifier_PropertyType


class MD_ReferenceSystem_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_ReferenceSystem=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_ReferenceSystem = MD_ReferenceSystem
    def factory(*args_, **kwargs_):
        if MD_ReferenceSystem_PropertyType.subclass:
            return MD_ReferenceSystem_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ReferenceSystem_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ReferenceSystem(self): return self.MD_ReferenceSystem
    def set_MD_ReferenceSystem(self, MD_ReferenceSystem): self.MD_ReferenceSystem = MD_ReferenceSystem
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_ReferenceSystem is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ReferenceSystem_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ReferenceSystem_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ReferenceSystem_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ReferenceSystem_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ReferenceSystem_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ReferenceSystem is not None:
            self.MD_ReferenceSystem.export(outfile, level, namespace_='gmd:', name_='MD_ReferenceSystem', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ReferenceSystem_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ReferenceSystem is not None:
            showIndent(outfile, level)
            outfile.write('MD_ReferenceSystem=model_.MD_ReferenceSystem(\n')
            self.MD_ReferenceSystem.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ReferenceSystem':
            obj_ = MD_ReferenceSystem_Type.factory()
            obj_.build(child_)
            self.MD_ReferenceSystem = obj_
            obj_.original_tagname_ = 'MD_ReferenceSystem'
# end class MD_ReferenceSystem_PropertyType


class MD_Identifier_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Identifier=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Identifier = MD_Identifier
    def factory(*args_, **kwargs_):
        if MD_Identifier_PropertyType.subclass:
            return MD_Identifier_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Identifier_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Identifier(self): return self.MD_Identifier
    def set_MD_Identifier(self, MD_Identifier): self.MD_Identifier = MD_Identifier
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Identifier is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Identifier_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Identifier_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Identifier_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Identifier_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Identifier_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Identifier is not None:
            self.MD_Identifier.export(outfile, level, namespace_='gmd:', name_='MD_Identifier', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Identifier_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Identifier is not None:
            showIndent(outfile, level)
            outfile.write('MD_Identifier=model_.MD_Identifier(\n')
            self.MD_Identifier.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Identifier':
            class_obj_ = self.get_class_obj_(child_, MD_Identifier_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_Identifier = obj_
            obj_.original_tagname_ = 'MD_Identifier'
        elif nodeName_ == 'RS_Identifier':
            obj_ = RS_Identifier_Type.factory()
            obj_.build(child_)
            self.RS_Identifier = obj_
            obj_.original_tagname_ = 'RS_Identifier'
# end class MD_Identifier_PropertyType


class RS_ReferenceSystem_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractRS_ReferenceSystem=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractRS_ReferenceSystem = AbstractRS_ReferenceSystem
    def factory(*args_, **kwargs_):
        if RS_ReferenceSystem_PropertyType.subclass:
            return RS_ReferenceSystem_PropertyType.subclass(*args_, **kwargs_)
        else:
            return RS_ReferenceSystem_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractRS_ReferenceSystem(self): return self.AbstractRS_ReferenceSystem
    def set_AbstractRS_ReferenceSystem(self, AbstractRS_ReferenceSystem): self.AbstractRS_ReferenceSystem = AbstractRS_ReferenceSystem
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractRS_ReferenceSystem is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RS_ReferenceSystem_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RS_ReferenceSystem_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RS_ReferenceSystem_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RS_ReferenceSystem_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RS_ReferenceSystem_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractRS_ReferenceSystem is not None:
            self.AbstractRS_ReferenceSystem.export(outfile, level, namespace_, name_='AbstractRS_ReferenceSystem', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RS_ReferenceSystem_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractRS_ReferenceSystem is not None:
            showIndent(outfile, level)
            outfile.write('AbstractRS_ReferenceSystem=model_.AbstractRS_ReferenceSystem(\n')
            self.AbstractRS_ReferenceSystem.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractRS_ReferenceSystem':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractRS_ReferenceSystem> element')
            self.AbstractRS_ReferenceSystem = obj_
            obj_.original_tagname_ = 'AbstractRS_ReferenceSystem'
# end class RS_ReferenceSystem_PropertyType


class EX_TemporalExtent_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_TemporalExtent=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_TemporalExtent = EX_TemporalExtent
    def factory(*args_, **kwargs_):
        if EX_TemporalExtent_PropertyType.subclass:
            return EX_TemporalExtent_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_TemporalExtent_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_TemporalExtent(self): return self.EX_TemporalExtent
    def set_EX_TemporalExtent(self, EX_TemporalExtent): self.EX_TemporalExtent = EX_TemporalExtent
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_TemporalExtent is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_TemporalExtent_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_TemporalExtent_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_TemporalExtent_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_TemporalExtent_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_TemporalExtent_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_TemporalExtent is not None:
            self.EX_TemporalExtent.export(outfile, level, namespace_='gmd:', name_='EX_TemporalExtent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_TemporalExtent_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_TemporalExtent is not None:
            showIndent(outfile, level)
            outfile.write('EX_TemporalExtent=model_.EX_TemporalExtent(\n')
            self.EX_TemporalExtent.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_TemporalExtent':
            class_obj_ = self.get_class_obj_(child_, EX_TemporalExtent_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.EX_TemporalExtent = obj_
            obj_.original_tagname_ = 'EX_TemporalExtent'
        elif nodeName_ == 'EX_SpatialTemporalExtent':
            obj_ = EX_SpatialTemporalExtent_Type.factory()
            obj_.build(child_)
            self.EX_SpatialTemporalExtent = obj_
            obj_.original_tagname_ = 'EX_SpatialTemporalExtent'
# end class EX_TemporalExtent_PropertyType


class EX_VerticalExtent_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_VerticalExtent=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_VerticalExtent = EX_VerticalExtent
    def factory(*args_, **kwargs_):
        if EX_VerticalExtent_PropertyType.subclass:
            return EX_VerticalExtent_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_VerticalExtent_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_VerticalExtent(self): return self.EX_VerticalExtent
    def set_EX_VerticalExtent(self, EX_VerticalExtent): self.EX_VerticalExtent = EX_VerticalExtent
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_VerticalExtent is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_VerticalExtent_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_VerticalExtent_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_VerticalExtent_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_VerticalExtent_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_VerticalExtent_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_VerticalExtent is not None:
            self.EX_VerticalExtent.export(outfile, level, namespace_='gmd:', name_='EX_VerticalExtent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_VerticalExtent_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_VerticalExtent is not None:
            showIndent(outfile, level)
            outfile.write('EX_VerticalExtent=model_.EX_VerticalExtent(\n')
            self.EX_VerticalExtent.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_VerticalExtent':
            obj_ = EX_VerticalExtent_Type.factory()
            obj_.build(child_)
            self.EX_VerticalExtent = obj_
            obj_.original_tagname_ = 'EX_VerticalExtent'
# end class EX_VerticalExtent_PropertyType


class EX_BoundingPolygon_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_BoundingPolygon=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_BoundingPolygon = EX_BoundingPolygon
    def factory(*args_, **kwargs_):
        if EX_BoundingPolygon_PropertyType.subclass:
            return EX_BoundingPolygon_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_BoundingPolygon_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_BoundingPolygon(self): return self.EX_BoundingPolygon
    def set_EX_BoundingPolygon(self, EX_BoundingPolygon): self.EX_BoundingPolygon = EX_BoundingPolygon
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_BoundingPolygon is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_BoundingPolygon_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_BoundingPolygon_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_BoundingPolygon_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_BoundingPolygon_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_BoundingPolygon_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_BoundingPolygon is not None:
            self.EX_BoundingPolygon.export(outfile, level, namespace_='gmd:', name_='EX_BoundingPolygon', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_BoundingPolygon_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_BoundingPolygon is not None:
            showIndent(outfile, level)
            outfile.write('EX_BoundingPolygon=model_.EX_BoundingPolygon(\n')
            self.EX_BoundingPolygon.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_BoundingPolygon':
            obj_ = EX_BoundingPolygon_Type.factory()
            obj_.build(child_)
            self.EX_BoundingPolygon = obj_
            obj_.original_tagname_ = 'EX_BoundingPolygon'
# end class EX_BoundingPolygon_PropertyType


class EX_Extent_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_Extent=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_Extent = EX_Extent
    def factory(*args_, **kwargs_):
        if EX_Extent_PropertyType.subclass:
            return EX_Extent_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_Extent_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_Extent(self): return self.EX_Extent
    def set_EX_Extent(self, EX_Extent): self.EX_Extent = EX_Extent
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_Extent is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_Extent_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_Extent_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_Extent_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_Extent_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_Extent_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_Extent is not None:
            self.EX_Extent.export(outfile, level, namespace_='gmd:', name_='EX_Extent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_Extent_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_Extent is not None:
            showIndent(outfile, level)
            outfile.write('EX_Extent=model_.EX_Extent(\n')
            self.EX_Extent.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_Extent':
            obj_ = EX_Extent_Type.factory()
            obj_.build(child_)
            self.EX_Extent = obj_
            obj_.original_tagname_ = 'EX_Extent'
# end class EX_Extent_PropertyType


class EX_GeographicExtent_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractEX_GeographicExtent=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractEX_GeographicExtent = AbstractEX_GeographicExtent
    def factory(*args_, **kwargs_):
        if EX_GeographicExtent_PropertyType.subclass:
            return EX_GeographicExtent_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_GeographicExtent_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractEX_GeographicExtent(self): return self.AbstractEX_GeographicExtent
    def set_AbstractEX_GeographicExtent(self, AbstractEX_GeographicExtent): self.AbstractEX_GeographicExtent = AbstractEX_GeographicExtent
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractEX_GeographicExtent is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_GeographicExtent_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicExtent_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_GeographicExtent_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_GeographicExtent_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_GeographicExtent_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractEX_GeographicExtent is not None:
            self.AbstractEX_GeographicExtent.export(outfile, level, namespace_, name_='AbstractEX_GeographicExtent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_GeographicExtent_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractEX_GeographicExtent is not None:
            showIndent(outfile, level)
            outfile.write('AbstractEX_GeographicExtent=model_.AbstractEX_GeographicExtent(\n')
            self.AbstractEX_GeographicExtent.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractEX_GeographicExtent':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractEX_GeographicExtent> element')
            self.AbstractEX_GeographicExtent = obj_
            obj_.original_tagname_ = 'AbstractEX_GeographicExtent'
        elif nodeName_ == 'EX_BoundingPolygon':
            obj_ = EX_BoundingPolygon_Type.factory()
            obj_.build(child_)
            self.EX_BoundingPolygon = obj_
            obj_.original_tagname_ = 'EX_BoundingPolygon'
        elif nodeName_ == 'EX_GeographicBoundingBox':
            obj_ = EX_GeographicBoundingBox_Type.factory()
            obj_.build(child_)
            self.EX_GeographicBoundingBox = obj_
            obj_.original_tagname_ = 'EX_GeographicBoundingBox'
        elif nodeName_ == 'EX_GeographicDescription':
            obj_ = EX_GeographicDescription_Type.factory()
            obj_.build(child_)
            self.EX_GeographicDescription = obj_
            obj_.original_tagname_ = 'EX_GeographicDescription'
# end class EX_GeographicExtent_PropertyType


class EX_GeographicBoundingBox_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_GeographicBoundingBox=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_GeographicBoundingBox = EX_GeographicBoundingBox
    def factory(*args_, **kwargs_):
        if EX_GeographicBoundingBox_PropertyType.subclass:
            return EX_GeographicBoundingBox_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_GeographicBoundingBox_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_GeographicBoundingBox(self): return self.EX_GeographicBoundingBox
    def set_EX_GeographicBoundingBox(self, EX_GeographicBoundingBox): self.EX_GeographicBoundingBox = EX_GeographicBoundingBox
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_GeographicBoundingBox is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_GeographicBoundingBox_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicBoundingBox_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_GeographicBoundingBox_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_GeographicBoundingBox_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_GeographicBoundingBox_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_GeographicBoundingBox is not None:
            self.EX_GeographicBoundingBox.export(outfile, level, namespace_='gmd:', name_='EX_GeographicBoundingBox', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_GeographicBoundingBox_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_GeographicBoundingBox is not None:
            showIndent(outfile, level)
            outfile.write('EX_GeographicBoundingBox=model_.EX_GeographicBoundingBox(\n')
            self.EX_GeographicBoundingBox.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_GeographicBoundingBox':
            obj_ = EX_GeographicBoundingBox_Type.factory()
            obj_.build(child_)
            self.EX_GeographicBoundingBox = obj_
            obj_.original_tagname_ = 'EX_GeographicBoundingBox'
# end class EX_GeographicBoundingBox_PropertyType


class EX_SpatialTemporalExtent_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_SpatialTemporalExtent=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_SpatialTemporalExtent = EX_SpatialTemporalExtent
    def factory(*args_, **kwargs_):
        if EX_SpatialTemporalExtent_PropertyType.subclass:
            return EX_SpatialTemporalExtent_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_SpatialTemporalExtent_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_SpatialTemporalExtent(self): return self.EX_SpatialTemporalExtent
    def set_EX_SpatialTemporalExtent(self, EX_SpatialTemporalExtent): self.EX_SpatialTemporalExtent = EX_SpatialTemporalExtent
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_SpatialTemporalExtent is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_SpatialTemporalExtent_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_SpatialTemporalExtent_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_SpatialTemporalExtent_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_SpatialTemporalExtent_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_SpatialTemporalExtent_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_SpatialTemporalExtent is not None:
            self.EX_SpatialTemporalExtent.export(outfile, level, namespace_='gmd:', name_='EX_SpatialTemporalExtent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_SpatialTemporalExtent_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_SpatialTemporalExtent is not None:
            showIndent(outfile, level)
            outfile.write('EX_SpatialTemporalExtent=model_.EX_SpatialTemporalExtent(\n')
            self.EX_SpatialTemporalExtent.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_SpatialTemporalExtent':
            obj_ = EX_SpatialTemporalExtent_Type.factory()
            obj_.build(child_)
            self.EX_SpatialTemporalExtent = obj_
            obj_.original_tagname_ = 'EX_SpatialTemporalExtent'
# end class EX_SpatialTemporalExtent_PropertyType


class EX_GeographicDescription_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, EX_GeographicDescription=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.EX_GeographicDescription = EX_GeographicDescription
    def factory(*args_, **kwargs_):
        if EX_GeographicDescription_PropertyType.subclass:
            return EX_GeographicDescription_PropertyType.subclass(*args_, **kwargs_)
        else:
            return EX_GeographicDescription_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EX_GeographicDescription(self): return self.EX_GeographicDescription
    def set_EX_GeographicDescription(self, EX_GeographicDescription): self.EX_GeographicDescription = EX_GeographicDescription
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EX_GeographicDescription is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_GeographicDescription_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicDescription_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_GeographicDescription_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_GeographicDescription_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_GeographicDescription_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EX_GeographicDescription is not None:
            self.EX_GeographicDescription.export(outfile, level, namespace_='gmd:', name_='EX_GeographicDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_GeographicDescription_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EX_GeographicDescription is not None:
            showIndent(outfile, level)
            outfile.write('EX_GeographicDescription=model_.EX_GeographicDescription(\n')
            self.EX_GeographicDescription.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EX_GeographicDescription':
            obj_ = EX_GeographicDescription_Type.factory()
            obj_.build(child_)
            self.EX_GeographicDescription = obj_
            obj_.original_tagname_ = 'EX_GeographicDescription'
# end class EX_GeographicDescription_PropertyType


class GM_Point_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, Point=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.Point = Point
    def factory(*args_, **kwargs_):
        if GM_Point_PropertyType.subclass:
            return GM_Point_PropertyType.subclass(*args_, **kwargs_)
        else:
            return GM_Point_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Point(self): return self.Point
    def set_Point(self, Point): self.Point = Point
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Point is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GM_Point_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GM_Point_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GM_Point_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GM_Point_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GM_Point_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Point is not None:
            self.Point.export(outfile, level, namespace_='gml:', name_='Point', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GM_Point_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Point is not None:
            showIndent(outfile, level)
            outfile.write('Point=model_.PointType(\n')
            self.Point.exportLiteral(outfile, level, name_='Point')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
# end class GM_Point_PropertyType


class GM_Object_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractGeometry=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractGeometry = AbstractGeometry
    def factory(*args_, **kwargs_):
        if GM_Object_PropertyType.subclass:
            return GM_Object_PropertyType.subclass(*args_, **kwargs_)
        else:
            return GM_Object_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeometry is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GM_Object_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GM_Object_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GM_Object_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GM_Object_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GM_Object_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GM_Object_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
# end class GM_Object_PropertyType


class TypeName_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, TypeName=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.TypeName = TypeName
    def factory(*args_, **kwargs_):
        if TypeName_PropertyType.subclass:
            return TypeName_PropertyType.subclass(*args_, **kwargs_)
        else:
            return TypeName_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TypeName(self): return self.TypeName
    def set_TypeName(self, TypeName): self.TypeName = TypeName
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TypeName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TypeName_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TypeName_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TypeName_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TypeName_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TypeName_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TypeName is not None:
            self.TypeName.export(outfile, level, namespace_='gco:', name_='TypeName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TypeName_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TypeName is not None:
            showIndent(outfile, level)
            outfile.write('TypeName=model_.TypeName(\n')
            self.TypeName.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TypeName':
            obj_ = TypeName_Type.factory()
            obj_.build(child_)
            self.TypeName = obj_
            obj_.original_tagname_ = 'TypeName'
# end class TypeName_PropertyType


class MemberName_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MemberName=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MemberName = MemberName
    def factory(*args_, **kwargs_):
        if MemberName_PropertyType.subclass:
            return MemberName_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MemberName_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MemberName(self): return self.MemberName
    def set_MemberName(self, MemberName): self.MemberName = MemberName
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MemberName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MemberName_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MemberName_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MemberName_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MemberName_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MemberName_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MemberName is not None:
            self.MemberName.export(outfile, level, namespace_='gco:', name_='MemberName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MemberName_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MemberName is not None:
            showIndent(outfile, level)
            outfile.write('MemberName=model_.MemberName(\n')
            self.MemberName.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MemberName':
            obj_ = MemberName_Type.factory()
            obj_.build(child_)
            self.MemberName = obj_
            obj_.original_tagname_ = 'MemberName'
# end class MemberName_PropertyType


class Multiplicity_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, Multiplicity=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.Multiplicity = Multiplicity
    def factory(*args_, **kwargs_):
        if Multiplicity_PropertyType.subclass:
            return Multiplicity_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Multiplicity_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Multiplicity(self): return self.Multiplicity
    def set_Multiplicity(self, Multiplicity): self.Multiplicity = Multiplicity
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Multiplicity is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Multiplicity_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Multiplicity_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Multiplicity_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Multiplicity_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Multiplicity_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Multiplicity is not None:
            self.Multiplicity.export(outfile, level, namespace_='gco:', name_='Multiplicity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Multiplicity_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Multiplicity is not None:
            showIndent(outfile, level)
            outfile.write('Multiplicity=model_.Multiplicity(\n')
            self.Multiplicity.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Multiplicity':
            obj_ = Multiplicity_Type.factory()
            obj_.build(child_)
            self.Multiplicity = obj_
            obj_.original_tagname_ = 'Multiplicity'
# end class Multiplicity_PropertyType


class MultiplicityRange_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MultiplicityRange=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MultiplicityRange = MultiplicityRange
    def factory(*args_, **kwargs_):
        if MultiplicityRange_PropertyType.subclass:
            return MultiplicityRange_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MultiplicityRange_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MultiplicityRange(self): return self.MultiplicityRange
    def set_MultiplicityRange(self, MultiplicityRange): self.MultiplicityRange = MultiplicityRange
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MultiplicityRange is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiplicityRange_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiplicityRange_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiplicityRange_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiplicityRange_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiplicityRange_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MultiplicityRange is not None:
            self.MultiplicityRange.export(outfile, level, namespace_='gco:', name_='MultiplicityRange', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiplicityRange_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MultiplicityRange is not None:
            showIndent(outfile, level)
            outfile.write('MultiplicityRange=model_.MultiplicityRange(\n')
            self.MultiplicityRange.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MultiplicityRange':
            obj_ = MultiplicityRange_Type.factory()
            obj_.build(child_)
            self.MultiplicityRange = obj_
            obj_.original_tagname_ = 'MultiplicityRange'
# end class MultiplicityRange_PropertyType


class Measure_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Measure=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Measure = Measure
    def factory(*args_, **kwargs_):
        if Measure_PropertyType.subclass:
            return Measure_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Measure_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Measure(self): return self.Measure
    def set_Measure(self, Measure): self.Measure = Measure
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Measure is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Measure_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Measure_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Measure_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Measure_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Measure_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Measure is not None:
            self.Measure.export(outfile, level, namespace_='gco:', name_='Measure', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Measure_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Measure is not None:
            showIndent(outfile, level)
            outfile.write('Measure=model_.Measure(\n')
            self.Measure.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Measure':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Measure = obj_
            obj_.original_tagname_ = 'Measure'
        elif nodeName_ == 'Length':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.Length = obj_
            obj_.original_tagname_ = 'Length'
        elif nodeName_ == 'Angle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.Angle = obj_
            obj_.original_tagname_ = 'Angle'
        elif nodeName_ == 'Scale':
            obj_ = ScaleType.factory()
            obj_.build(child_)
            self.Scale = obj_
            obj_.original_tagname_ = 'Scale'
        elif nodeName_ == 'Distance':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.Distance = obj_
            obj_.original_tagname_ = 'Distance'
# end class Measure_PropertyType


class Length_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Length=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Length = Length
    def factory(*args_, **kwargs_):
        if Length_PropertyType.subclass:
            return Length_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Length_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Length(self): return self.Length
    def set_Length(self, Length): self.Length = Length
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Length is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Length_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Length_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Length_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Length_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Length_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Length is not None:
            self.Length.export(outfile, level, namespace_='gco:', name_='Length', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Length_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Length is not None:
            showIndent(outfile, level)
            outfile.write('Length=model_.Length(\n')
            self.Length.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Length':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.Length = obj_
            obj_.original_tagname_ = 'Length'
        elif nodeName_ == 'Distance':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.Distance = obj_
            obj_.original_tagname_ = 'Distance'
# end class Length_PropertyType


class Angle_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Angle=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Angle = Angle
    def factory(*args_, **kwargs_):
        if Angle_PropertyType.subclass:
            return Angle_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Angle_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Angle(self): return self.Angle
    def set_Angle(self, Angle): self.Angle = Angle
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Angle is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Angle_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Angle_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Angle_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Angle_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Angle_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Angle is not None:
            self.Angle.export(outfile, level, namespace_='gco:', name_='Angle', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Angle_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Angle is not None:
            showIndent(outfile, level)
            outfile.write('Angle=model_.Angle(\n')
            self.Angle.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Angle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.Angle = obj_
            obj_.original_tagname_ = 'Angle'
# end class Angle_PropertyType


class Scale_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Scale=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Scale = Scale
    def factory(*args_, **kwargs_):
        if Scale_PropertyType.subclass:
            return Scale_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Scale_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Scale(self): return self.Scale
    def set_Scale(self, Scale): self.Scale = Scale
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Scale is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Scale_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Scale_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Scale_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Scale_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Scale_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Scale is not None:
            self.Scale.export(outfile, level, namespace_='gco:', name_='Scale', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Scale_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Scale is not None:
            showIndent(outfile, level)
            outfile.write('Scale=model_.Scale(\n')
            self.Scale.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Scale':
            obj_ = ScaleType.factory()
            obj_.build(child_)
            self.Scale = obj_
            obj_.original_tagname_ = 'Scale'
# end class Scale_PropertyType


class Distance_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Distance=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Distance = Distance
    def factory(*args_, **kwargs_):
        if Distance_PropertyType.subclass:
            return Distance_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Distance_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Distance(self): return self.Distance
    def set_Distance(self, Distance): self.Distance = Distance
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Distance is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Distance_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Distance_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Distance_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Distance_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Distance_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Distance is not None:
            self.Distance.export(outfile, level, namespace_='gco:', name_='Distance', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Distance_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Distance is not None:
            showIndent(outfile, level)
            outfile.write('Distance=model_.Distance(\n')
            self.Distance.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Distance':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.Distance = obj_
            obj_.original_tagname_ = 'Distance'
# end class Distance_PropertyType


class CharacterString_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, CharacterString=None, extensiontype_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.CharacterString = CharacterString
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if CharacterString_PropertyType.subclass:
            return CharacterString_PropertyType.subclass(*args_, **kwargs_)
        else:
            return CharacterString_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CharacterString(self): return self.CharacterString
    def set_CharacterString(self, CharacterString): self.CharacterString = CharacterString
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.CharacterString is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CharacterString_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CharacterString_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CharacterString_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CharacterString_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CharacterString_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CharacterString is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCharacterString>%s</%sCharacterString>%s' % (namespace_, self.gds_format_string(quote_xml(self.CharacterString).encode(ExternalEncoding), input_name='CharacterString'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='CharacterString_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CharacterString is not None:
            showIndent(outfile, level)
            outfile.write('CharacterString=%s,\n' % quote_python(self.CharacterString).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CharacterString':
            CharacterString_ = child_.text
            CharacterString_ = self.gds_validate_string(CharacterString_, node, 'CharacterString')
            self.CharacterString = CharacterString_
        elif nodeName_ == 'MD_PixelOrientationCode':
            MD_PixelOrientationCode_ = child_.text
            MD_PixelOrientationCode_ = self.gds_validate_string(MD_PixelOrientationCode_, node, 'MD_PixelOrientationCode')
            self.MD_PixelOrientationCode = MD_PixelOrientationCode_
            self.validate_MD_PixelOrientationCode_Type(self.MD_PixelOrientationCode)    # validate type MD_PixelOrientationCode_Type
        elif nodeName_ == 'MD_TopologyLevelCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_TopologyLevelCode = obj_
            obj_.original_tagname_ = 'MD_TopologyLevelCode'
        elif nodeName_ == 'MD_GeometricObjectTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_GeometricObjectTypeCode = obj_
            obj_.original_tagname_ = 'MD_GeometricObjectTypeCode'
        elif nodeName_ == 'MD_CellGeometryCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_CellGeometryCode = obj_
            obj_.original_tagname_ = 'MD_CellGeometryCode'
        elif nodeName_ == 'MD_DimensionNameTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_DimensionNameTypeCode = obj_
            obj_.original_tagname_ = 'MD_DimensionNameTypeCode'
        elif nodeName_ == 'CI_RoleCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_RoleCode = obj_
            obj_.original_tagname_ = 'CI_RoleCode'
        elif nodeName_ == 'CI_PresentationFormCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_PresentationFormCode = obj_
            obj_.original_tagname_ = 'CI_PresentationFormCode'
        elif nodeName_ == 'CI_OnLineFunctionCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_OnLineFunctionCode = obj_
            obj_.original_tagname_ = 'CI_OnLineFunctionCode'
        elif nodeName_ == 'CI_DateTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.CI_DateTypeCode = obj_
            obj_.original_tagname_ = 'CI_DateTypeCode'
        elif nodeName_ == 'MD_ObligationCode':
            MD_ObligationCode_ = child_.text
            MD_ObligationCode_ = self.gds_validate_string(MD_ObligationCode_, node, 'MD_ObligationCode')
            self.MD_ObligationCode = MD_ObligationCode_
            self.validate_MD_ObligationCode_Type(self.MD_ObligationCode)    # validate type MD_ObligationCode_Type
        elif nodeName_ == 'MD_DatatypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_DatatypeCode = obj_
            obj_.original_tagname_ = 'MD_DatatypeCode'
        elif nodeName_ == 'MD_CoverageContentTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_CoverageContentTypeCode = obj_
            obj_.original_tagname_ = 'MD_CoverageContentTypeCode'
        elif nodeName_ == 'MD_ImagingConditionCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ImagingConditionCode = obj_
            obj_.original_tagname_ = 'MD_ImagingConditionCode'
        elif nodeName_ == 'DQ_EvaluationMethodTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.DQ_EvaluationMethodTypeCode = obj_
            obj_.original_tagname_ = 'DQ_EvaluationMethodTypeCode'
        elif nodeName_ == 'MD_TopicCategoryCode':
            MD_TopicCategoryCode_ = child_.text
            MD_TopicCategoryCode_ = self.gds_validate_string(MD_TopicCategoryCode_, node, 'MD_TopicCategoryCode')
            self.MD_TopicCategoryCode = MD_TopicCategoryCode_
            self.validate_MD_TopicCategoryCode_Type(self.MD_TopicCategoryCode)    # validate type MD_TopicCategoryCode_Type
        elif nodeName_ == 'MD_CharacterSetCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_CharacterSetCode = obj_
            obj_.original_tagname_ = 'MD_CharacterSetCode'
        elif nodeName_ == 'MD_SpatialRepresentationTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_SpatialRepresentationTypeCode = obj_
            obj_.original_tagname_ = 'MD_SpatialRepresentationTypeCode'
        elif nodeName_ == 'MD_ProgressCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ProgressCode = obj_
            obj_.original_tagname_ = 'MD_ProgressCode'
        elif nodeName_ == 'MD_KeywordTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_KeywordTypeCode = obj_
            obj_.original_tagname_ = 'MD_KeywordTypeCode'
        elif nodeName_ == 'DS_AssociationTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.DS_AssociationTypeCode = obj_
            obj_.original_tagname_ = 'DS_AssociationTypeCode'
        elif nodeName_ == 'DS_InitiativeTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.DS_InitiativeTypeCode = obj_
            obj_.original_tagname_ = 'DS_InitiativeTypeCode'
        elif nodeName_ == 'MD_ClassificationCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ClassificationCode = obj_
            obj_.original_tagname_ = 'MD_ClassificationCode'
        elif nodeName_ == 'MD_RestrictionCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_RestrictionCode = obj_
            obj_.original_tagname_ = 'MD_RestrictionCode'
        elif nodeName_ == 'MD_DistributionUnits':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_DistributionUnits = obj_
            obj_.original_tagname_ = 'MD_DistributionUnits'
        elif nodeName_ == 'MD_MediumFormatCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_MediumFormatCode = obj_
            obj_.original_tagname_ = 'MD_MediumFormatCode'
        elif nodeName_ == 'MD_MediumNameCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_MediumNameCode = obj_
            obj_.original_tagname_ = 'MD_MediumNameCode'
        elif nodeName_ == 'MD_MaintenanceFrequencyCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_MaintenanceFrequencyCode = obj_
            obj_.original_tagname_ = 'MD_MaintenanceFrequencyCode'
        elif nodeName_ == 'MD_ScopeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ScopeCode = obj_
            obj_.original_tagname_ = 'MD_ScopeCode'
        elif nodeName_ == 'LocalisedCharacterString':
            obj_ = LocalisedCharacterString_Type.factory()
            obj_.build(child_)
            self.LocalisedCharacterString = obj_
            obj_.original_tagname_ = 'LocalisedCharacterString'
        elif nodeName_ == 'LanguageCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.LanguageCode = obj_
            obj_.original_tagname_ = 'LanguageCode'
        elif nodeName_ == 'Country':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.Country = obj_
            obj_.original_tagname_ = 'Country'
# end class CharacterString_PropertyType


class Boolean_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Boolean=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Boolean = Boolean
    def factory(*args_, **kwargs_):
        if Boolean_PropertyType.subclass:
            return Boolean_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Boolean_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Boolean(self): return self.Boolean
    def set_Boolean(self, Boolean): self.Boolean = Boolean
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Boolean is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Boolean_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Boolean_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Boolean_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Boolean_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Boolean_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Boolean is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sBoolean>%s</%sBoolean>%s' % (namespace_, self.gds_format_boolean(self.Boolean, input_name='Boolean'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='Boolean_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Boolean is not None:
            showIndent(outfile, level)
            outfile.write('Boolean=%s,\n' % self.Boolean)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Boolean':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'Boolean')
            self.Boolean = ival_
# end class Boolean_PropertyType


class GenericName_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, AbstractGenericName=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.AbstractGenericName = AbstractGenericName
    def factory(*args_, **kwargs_):
        if GenericName_PropertyType.subclass:
            return GenericName_PropertyType.subclass(*args_, **kwargs_)
        else:
            return GenericName_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGenericName(self): return self.AbstractGenericName
    def set_AbstractGenericName(self, AbstractGenericName): self.AbstractGenericName = AbstractGenericName
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.AbstractGenericName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GenericName_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GenericName_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GenericName_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GenericName_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GenericName_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGenericName is not None:
            self.AbstractGenericName.export(outfile, level, namespace_, name_='AbstractGenericName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GenericName_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGenericName is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGenericName=model_.AbstractGenericName(\n')
            self.AbstractGenericName.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGenericName':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGenericName> element')
            self.AbstractGenericName = obj_
            obj_.original_tagname_ = 'AbstractGenericName'
        elif nodeName_ == 'LocalName':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.LocalName = obj_
            obj_.original_tagname_ = 'LocalName'
        elif nodeName_ == 'ScopedName':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.ScopedName = obj_
            obj_.original_tagname_ = 'ScopedName'
# end class GenericName_PropertyType


class LocalName_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, LocalName=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.LocalName = LocalName
    def factory(*args_, **kwargs_):
        if LocalName_PropertyType.subclass:
            return LocalName_PropertyType.subclass(*args_, **kwargs_)
        else:
            return LocalName_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LocalName(self): return self.LocalName
    def set_LocalName(self, LocalName): self.LocalName = LocalName
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.LocalName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LocalName_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LocalName_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LocalName_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LocalName_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LocalName_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LocalName is not None:
            self.LocalName.export(outfile, level, namespace_='gco:', name_='LocalName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LocalName_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LocalName is not None:
            showIndent(outfile, level)
            outfile.write('LocalName=model_.LocalName(\n')
            self.LocalName.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LocalName':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.LocalName = obj_
            obj_.original_tagname_ = 'LocalName'
# end class LocalName_PropertyType


class ScopedName_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, ScopedName=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.ScopedName = ScopedName
    def factory(*args_, **kwargs_):
        if ScopedName_PropertyType.subclass:
            return ScopedName_PropertyType.subclass(*args_, **kwargs_)
        else:
            return ScopedName_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ScopedName(self): return self.ScopedName
    def set_ScopedName(self, ScopedName): self.ScopedName = ScopedName
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.ScopedName is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ScopedName_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ScopedName_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ScopedName_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ScopedName_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ScopedName_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ScopedName is not None:
            self.ScopedName.export(outfile, level, namespace_='gco:', name_='ScopedName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ScopedName_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ScopedName is not None:
            showIndent(outfile, level)
            outfile.write('ScopedName=model_.ScopedName(\n')
            self.ScopedName.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ScopedName':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.ScopedName = obj_
            obj_.original_tagname_ = 'ScopedName'
# end class ScopedName_PropertyType


class UomAngle_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomAngle_PropertyType.subclass:
            return UomAngle_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomAngle_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomAngle_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomAngle_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomAngle_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomAngle_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomAngle_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomAngle_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomAngle_PropertyType


class UomLength_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomLength_PropertyType.subclass:
            return UomLength_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomLength_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomLength_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomLength_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomLength_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomLength_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomLength_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomLength_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomLength_PropertyType


class UomScale_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomScale_PropertyType.subclass:
            return UomScale_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomScale_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomScale_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomScale_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomScale_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomScale_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomScale_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomScale_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomScale_PropertyType


class UnitOfMeasure_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UnitOfMeasure_PropertyType.subclass:
            return UnitOfMeasure_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UnitOfMeasure_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UnitOfMeasure_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnitOfMeasure_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UnitOfMeasure_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UnitOfMeasure_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UnitOfMeasure_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UnitOfMeasure_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UnitOfMeasure_PropertyType


class UomArea_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomArea_PropertyType.subclass:
            return UomArea_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomArea_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomArea_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomArea_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomArea_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomArea_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomArea_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomArea_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomArea_PropertyType


class UomVelocity_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomVelocity_PropertyType.subclass:
            return UomVelocity_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomVelocity_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomVelocity_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomVelocity_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomVelocity_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomVelocity_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomVelocity_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomVelocity_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomVelocity_PropertyType


class UomTime_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomTime_PropertyType.subclass:
            return UomTime_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomTime_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomTime_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomTime_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomTime_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomTime_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomTime_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomTime_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomTime_PropertyType


class UomVolume_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, UnitDefinition=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.UnitDefinition = UnitDefinition
    def factory(*args_, **kwargs_):
        if UomVolume_PropertyType.subclass:
            return UomVolume_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UomVolume_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnitDefinition(self): return self.UnitDefinition
    def set_UnitDefinition(self, UnitDefinition): self.UnitDefinition = UnitDefinition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.UnitDefinition is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UomVolume_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UomVolume_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UomVolume_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UomVolume_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UomVolume_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnitDefinition is not None:
            self.UnitDefinition.export(outfile, level, namespace_='gml:', name_='UnitDefinition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UomVolume_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnitDefinition is not None:
            showIndent(outfile, level)
            outfile.write('UnitDefinition=model_.UnitDefinitionType(\n')
            self.UnitDefinition.exportLiteral(outfile, level, name_='UnitDefinition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
# end class UomVolume_PropertyType


class DateTime_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, DateTime=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        if isinstance(DateTime, string_types):
            initvalue_ = datetime_.datetime.strptime(DateTime, '%Y-%m-%dT%H:%M:%S')
        else:
            initvalue_ = DateTime
        self.DateTime = initvalue_
    def factory(*args_, **kwargs_):
        if DateTime_PropertyType.subclass:
            return DateTime_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DateTime_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DateTime(self): return self.DateTime
    def set_DateTime(self, DateTime): self.DateTime = DateTime
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.DateTime is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DateTime_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DateTime_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DateTime_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DateTime_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DateTime_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DateTime is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDateTime>%s</%sDateTime>%s' % (namespace_, self.gds_format_datetime(self.DateTime, input_name='DateTime'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='DateTime_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DateTime is not None:
            showIndent(outfile, level)
            outfile.write('DateTime=model_.GeneratedsSuper.gds_parse_datetime("%s"),\n' % self.gds_format_datetime(self.DateTime, input_name='DateTime'))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DateTime':
            sval_ = child_.text
            dval_ = self.gds_parse_datetime(sval_)
            self.DateTime = dval_
# end class DateTime_PropertyType


class Date_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Date=None, DateTime=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Date = Date
        if isinstance(DateTime, string_types):
            initvalue_ = datetime_.datetime.strptime(DateTime, '%Y-%m-%dT%H:%M:%S')
        else:
            initvalue_ = DateTime
        self.DateTime = initvalue_
    def factory(*args_, **kwargs_):
        if Date_PropertyType.subclass:
            return Date_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Date_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Date(self): return self.Date
    def set_Date(self, Date): self.Date = Date
    def get_DateTime(self): return self.DateTime
    def set_DateTime(self, DateTime): self.DateTime = DateTime
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Date is not None or
            self.DateTime is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Date_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Date_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Date_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Date_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Date_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Date is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDate>%s</%sDate>%s' % (namespace_, self.gds_format_string(quote_xml(self.Date).encode(ExternalEncoding), input_name='Date'), namespace_, eol_))
        if self.DateTime is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDateTime>%s</%sDateTime>%s' % (namespace_, self.gds_format_datetime(self.DateTime, input_name='DateTime'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='Date_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Date is not None:
            showIndent(outfile, level)
            outfile.write('Date=%s,\n' % quote_python(self.Date).encode(ExternalEncoding))
        if self.DateTime is not None:
            showIndent(outfile, level)
            outfile.write('DateTime=model_.GeneratedsSuper.gds_parse_datetime("%s"),\n' % self.gds_format_datetime(self.DateTime, input_name='DateTime'))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Date':
            Date_ = child_.text
            Date_ = self.gds_validate_string(Date_, node, 'Date')
            self.Date = Date_
        elif nodeName_ == 'DateTime':
            sval_ = child_.text
            dval_ = self.gds_parse_datetime(sval_)
            self.DateTime = dval_
# end class Date_PropertyType


class Number_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Real=None, Decimal=None, Integer=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Real = Real
        self.Decimal = Decimal
        self.Integer = Integer
    def factory(*args_, **kwargs_):
        if Number_PropertyType.subclass:
            return Number_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Number_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Real(self): return self.Real
    def set_Real(self, Real): self.Real = Real
    def get_Decimal(self): return self.Decimal
    def set_Decimal(self, Decimal): self.Decimal = Decimal
    def get_Integer(self): return self.Integer
    def set_Integer(self, Integer): self.Integer = Integer
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Real is not None or
            self.Decimal is not None or
            self.Integer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Number_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Number_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Number_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Number_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Number_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Real is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sReal>%s</%sReal>%s' % (namespace_, self.gds_format_double(self.Real, input_name='Real'), namespace_, eol_))
        if self.Decimal is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDecimal>%s</%sDecimal>%s' % (namespace_, self.gds_format_float(self.Decimal, input_name='Decimal'), namespace_, eol_))
        if self.Integer is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInteger>%s</%sInteger>%s' % (namespace_, self.gds_format_integer(self.Integer, input_name='Integer'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='Number_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Real is not None:
            showIndent(outfile, level)
            outfile.write('Real=%e,\n' % self.Real)
        if self.Decimal is not None:
            showIndent(outfile, level)
            outfile.write('Decimal=%f,\n' % self.Decimal)
        if self.Integer is not None:
            showIndent(outfile, level)
            outfile.write('Integer=%d,\n' % self.Integer)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Real':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'Real')
            self.Real = fval_
        elif nodeName_ == 'Decimal':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'Decimal')
            self.Decimal = fval_
        elif nodeName_ == 'Integer':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'Integer')
            self.Integer = ival_
# end class Number_PropertyType


class Decimal_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Decimal=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Decimal = Decimal
    def factory(*args_, **kwargs_):
        if Decimal_PropertyType.subclass:
            return Decimal_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Decimal_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Decimal(self): return self.Decimal
    def set_Decimal(self, Decimal): self.Decimal = Decimal
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Decimal is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Decimal_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Decimal_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Decimal_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Decimal_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Decimal_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Decimal is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sDecimal>%s</%sDecimal>%s' % (namespace_, self.gds_format_float(self.Decimal, input_name='Decimal'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='Decimal_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Decimal is not None:
            showIndent(outfile, level)
            outfile.write('Decimal=%f,\n' % self.Decimal)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Decimal':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'Decimal')
            self.Decimal = fval_
# end class Decimal_PropertyType


class Real_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Real=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Real = Real
    def factory(*args_, **kwargs_):
        if Real_PropertyType.subclass:
            return Real_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Real_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Real(self): return self.Real
    def set_Real(self, Real): self.Real = Real
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Real is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Real_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Real_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Real_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Real_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Real_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Real is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sReal>%s</%sReal>%s' % (namespace_, self.gds_format_double(self.Real, input_name='Real'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='Real_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Real is not None:
            showIndent(outfile, level)
            outfile.write('Real=%e,\n' % self.Real)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Real':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'Real')
            self.Real = fval_
# end class Real_PropertyType


class Integer_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Integer=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Integer = Integer
    def factory(*args_, **kwargs_):
        if Integer_PropertyType.subclass:
            return Integer_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Integer_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Integer(self): return self.Integer
    def set_Integer(self, Integer): self.Integer = Integer
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Integer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Integer_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Integer_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Integer_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Integer_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Integer_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Integer is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sInteger>%s</%sInteger>%s' % (namespace_, self.gds_format_integer(self.Integer, input_name='Integer'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='Integer_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Integer is not None:
            showIndent(outfile, level)
            outfile.write('Integer=%d,\n' % self.Integer)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Integer':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'Integer')
            self.Integer = ival_
# end class Integer_PropertyType


class UnlimitedInteger_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, isInfinite=None, valueOf_=None):
        self.original_tagname_ = None
        self.isInfinite = _cast(None, isInfinite)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if UnlimitedInteger_Type.subclass:
            return UnlimitedInteger_Type.subclass(*args_, **kwargs_)
        else:
            return UnlimitedInteger_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_isInfinite(self): return self.isInfinite
    def set_isInfinite(self, isInfinite): self.isInfinite = isInfinite
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UnlimitedInteger_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnlimitedInteger_Type')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UnlimitedInteger_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UnlimitedInteger_Type'):
        if self.isInfinite is not None and 'isInfinite' not in already_processed:
            already_processed.add('isInfinite')
            outfile.write(' isInfinite=%s' % (quote_attrib(self.isInfinite), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UnlimitedInteger_Type', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='UnlimitedInteger_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.isInfinite is not None and 'isInfinite' not in already_processed:
            already_processed.add('isInfinite')
            showIndent(outfile, level)
            outfile.write('isInfinite=%s,\n' % (self.isInfinite,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('isInfinite', node)
        if value is not None and 'isInfinite' not in already_processed:
            already_processed.add('isInfinite')
            self.isInfinite = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class UnlimitedInteger_Type


class UnlimitedInteger_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, UnlimitedInteger=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.UnlimitedInteger = UnlimitedInteger
    def factory(*args_, **kwargs_):
        if UnlimitedInteger_PropertyType.subclass:
            return UnlimitedInteger_PropertyType.subclass(*args_, **kwargs_)
        else:
            return UnlimitedInteger_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_UnlimitedInteger(self): return self.UnlimitedInteger
    def set_UnlimitedInteger(self, UnlimitedInteger): self.UnlimitedInteger = UnlimitedInteger
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.UnlimitedInteger is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UnlimitedInteger_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnlimitedInteger_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UnlimitedInteger_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UnlimitedInteger_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UnlimitedInteger_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.UnlimitedInteger is not None:
            self.UnlimitedInteger.export(outfile, level, namespace_='gco:', name_='UnlimitedInteger', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UnlimitedInteger_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.UnlimitedInteger is not None:
            showIndent(outfile, level)
            outfile.write('UnlimitedInteger=model_.UnlimitedInteger(\n')
            self.UnlimitedInteger.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'UnlimitedInteger':
            obj_ = UnlimitedInteger_Type.factory()
            obj_.build(child_)
            self.UnlimitedInteger = obj_
            obj_.original_tagname_ = 'UnlimitedInteger'
# end class UnlimitedInteger_PropertyType


class Record(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self):
        self.original_tagname_ = None
    def factory(*args_, **kwargs_):
        if Record.subclass:
            return Record.subclass(*args_, **kwargs_)
        else:
            return Record(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Record', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Record')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Record', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Record'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Record', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='Record'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class Record


class Record_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, Record=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.Record = Record
    def factory(*args_, **kwargs_):
        if Record_PropertyType.subclass:
            return Record_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Record_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Record(self): return self.Record
    def set_Record(self, Record): self.Record = Record
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Record is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Record_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Record_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Record_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Record_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Record_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Record is not None:
            self.Record.export(outfile, level, namespace_='gco:', name_='Record', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Record_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Record is not None:
            showIndent(outfile, level)
            outfile.write('Record=model_.Record(\n')
            self.Record.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Record':
            obj_ = Record.factory()
            obj_.build(child_)
            self.Record = obj_
            obj_.original_tagname_ = 'Record'
# end class Record_PropertyType


class RecordType_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, title=None, arcrole=None, actuate=None, href=None, role=None, show=None, type_=None, valueOf_=None):
        self.original_tagname_ = None
        self.title = _cast(None, title)
        self.arcrole = _cast(None, arcrole)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.show = _cast(None, show)
        self.type_ = _cast(None, type_)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if RecordType_Type.subclass:
            return RecordType_Type.subclass(*args_, **kwargs_)
        else:
            return RecordType_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RecordType_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RecordType_Type')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RecordType_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RecordType_Type'):
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RecordType_Type', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='RecordType_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class RecordType_Type


class RecordType_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, RecordType=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.RecordType = RecordType
    def factory(*args_, **kwargs_):
        if RecordType_PropertyType.subclass:
            return RecordType_PropertyType.subclass(*args_, **kwargs_)
        else:
            return RecordType_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_RecordType(self): return self.RecordType
    def set_RecordType(self, RecordType): self.RecordType = RecordType
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.RecordType is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RecordType_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RecordType_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RecordType_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RecordType_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RecordType_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.RecordType is not None:
            self.RecordType.export(outfile, level, namespace_='gco:', name_='RecordType', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RecordType_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.RecordType is not None:
            showIndent(outfile, level)
            outfile.write('RecordType=model_.RecordType(\n')
            self.RecordType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'RecordType':
            obj_ = RecordType_Type.factory()
            obj_.build(child_)
            self.RecordType = obj_
            obj_.original_tagname_ = 'RecordType'
# end class RecordType_PropertyType


class Binary_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, src=None, valueOf_=None):
        self.original_tagname_ = None
        self.src = _cast(None, src)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if Binary_Type.subclass:
            return Binary_Type.subclass(*args_, **kwargs_)
        else:
            return Binary_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_src(self): return self.src
    def set_src(self, src): self.src = src
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Binary_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Binary_Type')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Binary_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Binary_Type'):
        if self.src is not None and 'src' not in already_processed:
            already_processed.add('src')
            outfile.write(' src=%s' % (quote_attrib(self.src), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Binary_Type', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='Binary_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.src is not None and 'src' not in already_processed:
            already_processed.add('src')
            showIndent(outfile, level)
            outfile.write('src=%s,\n' % (self.src,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('src', node)
        if value is not None and 'src' not in already_processed:
            already_processed.add('src')
            self.src = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class Binary_Type


class Binary_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Binary=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Binary = Binary
    def factory(*args_, **kwargs_):
        if Binary_PropertyType.subclass:
            return Binary_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Binary_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Binary(self): return self.Binary
    def set_Binary(self, Binary): self.Binary = Binary
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Binary is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Binary_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Binary_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Binary_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Binary_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Binary_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Binary is not None:
            self.Binary.export(outfile, level, namespace_='gco:', name_='Binary', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Binary_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Binary is not None:
            showIndent(outfile, level)
            outfile.write('Binary=model_.Binary(\n')
            self.Binary.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Binary':
            obj_ = Binary_Type.factory()
            obj_.build(child_)
            self.Binary = obj_
            obj_.original_tagname_ = 'Binary'
# end class Binary_PropertyType


class AbstractObject_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, uuid=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        self.uuid = _cast(None, uuid)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractObject_Type.subclass:
            return AbstractObject_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractObject_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_uuid(self): return self.uuid
    def set_uuid(self, uuid): self.uuid = uuid
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractObject_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractObject_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractObject_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractObject_Type'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (quote_attrib(self.id), ))
        if self.uuid is not None and 'uuid' not in already_processed:
            already_processed.add('uuid')
            outfile.write(' uuid=%s' % (quote_attrib(self.uuid), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractObject_Type', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractObject_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id=%s,\n' % (self.id,))
        if self.uuid is not None and 'uuid' not in already_processed:
            already_processed.add('uuid')
            showIndent(outfile, level)
            outfile.write('uuid=%s,\n' % (self.uuid,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('uuid', node)
        if value is not None and 'uuid' not in already_processed:
            already_processed.add('uuid')
            self.uuid = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractObject_Type


class ObjectReference_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if ObjectReference_PropertyType.subclass:
            return ObjectReference_PropertyType.subclass(*args_, **kwargs_)
        else:
            return ObjectReference_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ObjectReference_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ObjectReference_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ObjectReference_PropertyType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ObjectReference_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ObjectReference_PropertyType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='ObjectReference_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class ObjectReference_PropertyType


class CodeListValue_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, codeList=None, codeSpace=None, codeListValue=None, valueOf_=None):
        self.original_tagname_ = None
        self.codeList = _cast(None, codeList)
        self.codeSpace = _cast(None, codeSpace)
        self.codeListValue = _cast(None, codeListValue)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if CodeListValue_Type.subclass:
            return CodeListValue_Type.subclass(*args_, **kwargs_)
        else:
            return CodeListValue_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeList(self): return self.codeList
    def set_codeList(self, codeList): self.codeList = codeList
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_codeListValue(self): return self.codeListValue
    def set_codeListValue(self, codeListValue): self.codeListValue = codeListValue
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CodeListValue_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CodeListValue_Type')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CodeListValue_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CodeListValue_Type'):
        if self.codeList is not None and 'codeList' not in already_processed:
            already_processed.add('codeList')
            outfile.write(' codeList=%s' % (quote_attrib(self.codeList), ))
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            outfile.write(' codeSpace=%s' % (quote_attrib(self.codeSpace), ))
        if self.codeListValue is not None and 'codeListValue' not in already_processed:
            already_processed.add('codeListValue')
            outfile.write(' codeListValue=%s' % (quote_attrib(self.codeListValue), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CodeListValue_Type', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='CodeListValue_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.codeList is not None and 'codeList' not in already_processed:
            already_processed.add('codeList')
            showIndent(outfile, level)
            outfile.write('codeList=%s,\n' % (self.codeList,))
        if self.codeSpace is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            showIndent(outfile, level)
            outfile.write('codeSpace=%s,\n' % (self.codeSpace,))
        if self.codeListValue is not None and 'codeListValue' not in already_processed:
            already_processed.add('codeListValue')
            showIndent(outfile, level)
            outfile.write('codeListValue=%s,\n' % (self.codeListValue,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('codeList', node)
        if value is not None and 'codeList' not in already_processed:
            already_processed.add('codeList')
            self.codeList = value
        value = find_attr_value_('codeSpace', node)
        if value is not None and 'codeSpace' not in already_processed:
            already_processed.add('codeSpace')
            self.codeSpace = value
        value = find_attr_value_('codeListValue', node)
        if value is not None and 'codeListValue' not in already_processed:
            already_processed.add('codeListValue')
            self.codeListValue = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class CodeListValue_Type


class TM_Primitive_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractTimePrimitive=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractTimePrimitive = AbstractTimePrimitive
    def factory(*args_, **kwargs_):
        if TM_Primitive_PropertyType.subclass:
            return TM_Primitive_PropertyType.subclass(*args_, **kwargs_)
        else:
            return TM_Primitive_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractTimePrimitive(self): return self.AbstractTimePrimitive
    def set_AbstractTimePrimitive(self, AbstractTimePrimitive): self.AbstractTimePrimitive = AbstractTimePrimitive
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractTimePrimitive is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TM_Primitive_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TM_Primitive_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TM_Primitive_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TM_Primitive_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TM_Primitive_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractTimePrimitive is not None:
            self.AbstractTimePrimitive.export(outfile, level, namespace_, name_='AbstractTimePrimitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TM_Primitive_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractTimePrimitiveType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTimePrimitiveType=model_.AbstractTimePrimitiveType(\n')
            self.AbstractTimePrimitiveType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractTimePrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimePrimitive> element')
            self.AbstractTimePrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimePrimitive'
        elif nodeName_ == 'AbstractTimeGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeGeometricPrimitive> element')
            self.AbstractTimeGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeGeometricPrimitive'
        elif nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimeTopologyPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.TimeInstant = obj_
            obj_.original_tagname_ = 'TimeInstant'
        elif nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.TimePeriod = obj_
            obj_.original_tagname_ = 'TimePeriod'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
# end class TM_Primitive_PropertyType


class TM_PeriodDuration_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, TM_PeriodDuration=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.TM_PeriodDuration = TM_PeriodDuration
    def factory(*args_, **kwargs_):
        if TM_PeriodDuration_PropertyType.subclass:
            return TM_PeriodDuration_PropertyType.subclass(*args_, **kwargs_)
        else:
            return TM_PeriodDuration_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TM_PeriodDuration(self): return self.TM_PeriodDuration
    def set_TM_PeriodDuration(self, TM_PeriodDuration): self.TM_PeriodDuration = TM_PeriodDuration
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.TM_PeriodDuration is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TM_PeriodDuration_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TM_PeriodDuration_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TM_PeriodDuration_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TM_PeriodDuration_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TM_PeriodDuration_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TM_PeriodDuration is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sTM_PeriodDuration>%s</%sTM_PeriodDuration>%s' % (namespace_, self.gds_format_string(quote_xml(self.TM_PeriodDuration).encode(ExternalEncoding), input_name='TM_PeriodDuration'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='TM_PeriodDuration_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TM_PeriodDuration is not None:
            showIndent(outfile, level)
            outfile.write('TM_PeriodDuration=%s,\n' % quote_python(self.TM_PeriodDuration).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TM_PeriodDuration':
            TM_PeriodDuration_ = child_.text
            TM_PeriodDuration_ = self.gds_validate_string(TM_PeriodDuration_, node, 'TM_PeriodDuration')
            self.TM_PeriodDuration = TM_PeriodDuration_
# end class TM_PeriodDuration_PropertyType


class SC_CRS_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractCRS = AbstractCRS
    def factory(*args_, **kwargs_):
        if SC_CRS_PropertyType.subclass:
            return SC_CRS_PropertyType.subclass(*args_, **kwargs_)
        else:
            return SC_CRS_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCRS(self): return self.AbstractCRS
    def set_AbstractCRS(self, AbstractCRS): self.AbstractCRS = AbstractCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SC_CRS_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SC_CRS_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SC_CRS_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SC_CRS_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SC_CRS_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractCRS is not None:
            self.AbstractCRS.export(outfile, level, namespace_, name_='AbstractCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SC_CRS_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCRSType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCRSType=model_.AbstractCRSType(\n')
            self.AbstractCRSType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCRS> element')
            self.AbstractCRS = obj_
            obj_.original_tagname_ = 'AbstractCRS'
        elif nodeName_ == 'AbstractSingleCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleCRS> element')
            self.AbstractSingleCRS = obj_
            obj_.original_tagname_ = 'AbstractSingleCRS'
        elif nodeName_ == 'CompoundCRS':
            obj_ = CompoundCRSType.factory()
            obj_.build(child_)
            self.CompoundCRS = obj_
            obj_.original_tagname_ = 'CompoundCRS'
        elif nodeName_ == 'AbstractGeneralDerivedCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralDerivedCRS> element')
            self.AbstractGeneralDerivedCRS = obj_
            obj_.original_tagname_ = 'AbstractGeneralDerivedCRS'
        elif nodeName_ == 'GeodeticCRS':
            obj_ = GeodeticCRSType.factory()
            obj_.build(child_)
            self.GeodeticCRS = obj_
            obj_.original_tagname_ = 'GeodeticCRS'
        elif nodeName_ == 'VerticalCRS':
            obj_ = VerticalCRSType.factory()
            obj_.build(child_)
            self.VerticalCRS = obj_
            obj_.original_tagname_ = 'VerticalCRS'
        elif nodeName_ == 'EngineeringCRS':
            obj_ = EngineeringCRSType.factory()
            obj_.build(child_)
            self.EngineeringCRS = obj_
            obj_.original_tagname_ = 'EngineeringCRS'
        elif nodeName_ == 'ImageCRS':
            obj_ = ImageCRSType.factory()
            obj_.build(child_)
            self.ImageCRS = obj_
            obj_.original_tagname_ = 'ImageCRS'
        elif nodeName_ == 'TemporalCRS':
            obj_ = TemporalCRSType.factory()
            obj_.build(child_)
            self.TemporalCRS = obj_
            obj_.original_tagname_ = 'TemporalCRS'
        elif nodeName_ == 'GeographicCRS':
            obj_ = GeographicCRSType.factory()
            obj_.build(child_)
            self.GeographicCRS = obj_
            obj_.original_tagname_ = 'GeographicCRS'
        elif nodeName_ == 'GeocentricCRS':
            obj_ = GeocentricCRSType.factory()
            obj_.build(child_)
            self.GeocentricCRS = obj_
            obj_.original_tagname_ = 'GeocentricCRS'
        elif nodeName_ == 'ProjectedCRS':
            obj_ = ProjectedCRSType.factory()
            obj_.build(child_)
            self.ProjectedCRS = obj_
            obj_.original_tagname_ = 'ProjectedCRS'
        elif nodeName_ == 'DerivedCRS':
            obj_ = DerivedCRSType.factory()
            obj_.build(child_)
            self.DerivedCRS = obj_
            obj_.original_tagname_ = 'DerivedCRS'
# end class SC_CRS_PropertyType


class MD_ExtendedElementInformation_Type(AbstractObject_Type):
    """New metadata element, not found in ISO 19115, which is required to
    describe geographic data"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, name=None, shortName=None, domainCode=None, definition=None, obligation=None, condition=None, dataType=None, maximumOccurrence=None, domainValue=None, parentEntity=None, rule=None, rationale=None, source=None):
        self.original_tagname_ = None
        super(MD_ExtendedElementInformation_Type, self).__init__(id, uuid, )
        self.name = name
        self.shortName = shortName
        self.domainCode = domainCode
        self.definition = definition
        self.obligation = obligation
        self.condition = condition
        self.dataType = dataType
        self.maximumOccurrence = maximumOccurrence
        self.domainValue = domainValue
        if parentEntity is None:
            self.parentEntity = []
        else:
            self.parentEntity = parentEntity
        self.rule = rule
        if rationale is None:
            self.rationale = []
        else:
            self.rationale = rationale
        if source is None:
            self.source = []
        else:
            self.source = source
    def factory(*args_, **kwargs_):
        if MD_ExtendedElementInformation_Type.subclass:
            return MD_ExtendedElementInformation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_ExtendedElementInformation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_shortName(self): return self.shortName
    def set_shortName(self, shortName): self.shortName = shortName
    def get_domainCode(self): return self.domainCode
    def set_domainCode(self, domainCode): self.domainCode = domainCode
    def get_definition(self): return self.definition
    def set_definition(self, definition): self.definition = definition
    def get_obligation(self): return self.obligation
    def set_obligation(self, obligation): self.obligation = obligation
    def get_condition(self): return self.condition
    def set_condition(self, condition): self.condition = condition
    def get_dataType(self): return self.dataType
    def set_dataType(self, dataType): self.dataType = dataType
    def get_maximumOccurrence(self): return self.maximumOccurrence
    def set_maximumOccurrence(self, maximumOccurrence): self.maximumOccurrence = maximumOccurrence
    def get_domainValue(self): return self.domainValue
    def set_domainValue(self, domainValue): self.domainValue = domainValue
    def get_parentEntity(self): return self.parentEntity
    def set_parentEntity(self, parentEntity): self.parentEntity = parentEntity
    def add_parentEntity(self, value): self.parentEntity.append(value)
    def insert_parentEntity_at(self, index, value): self.parentEntity.insert(index, value)
    def replace_parentEntity_at(self, index, value): self.parentEntity[index] = value
    def get_rule(self): return self.rule
    def set_rule(self, rule): self.rule = rule
    def get_rationale(self): return self.rationale
    def set_rationale(self, rationale): self.rationale = rationale
    def add_rationale(self, value): self.rationale.append(value)
    def insert_rationale_at(self, index, value): self.rationale.insert(index, value)
    def replace_rationale_at(self, index, value): self.rationale[index] = value
    def get_source(self): return self.source
    def set_source(self, source): self.source = source
    def add_source(self, value): self.source.append(value)
    def insert_source_at(self, index, value): self.source.insert(index, value)
    def replace_source_at(self, index, value): self.source[index] = value
    def hasContent_(self):
        if (
            self.name is not None or
            self.shortName is not None or
            self.domainCode is not None or
            self.definition is not None or
            self.obligation is not None or
            self.condition is not None or
            self.dataType is not None or
            self.maximumOccurrence is not None or
            self.domainValue is not None or
            self.parentEntity or
            self.rule is not None or
            self.rationale or
            self.source or
            super(MD_ExtendedElementInformation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ExtendedElementInformation_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ExtendedElementInformation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ExtendedElementInformation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ExtendedElementInformation_Type'):
        super(MD_ExtendedElementInformation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ExtendedElementInformation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ExtendedElementInformation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_ExtendedElementInformation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        if self.shortName is not None:
            self.shortName.export(outfile, level, namespace_, name_='shortName', pretty_print=pretty_print)
        if self.domainCode is not None:
            self.domainCode.export(outfile, level, namespace_, name_='domainCode', pretty_print=pretty_print)
        if self.definition is not None:
            self.definition.export(outfile, level, namespace_, name_='definition', pretty_print=pretty_print)
        if self.obligation is not None:
            self.obligation.export(outfile, level, namespace_, name_='obligation', pretty_print=pretty_print)
        if self.condition is not None:
            self.condition.export(outfile, level, namespace_, name_='condition', pretty_print=pretty_print)
        if self.dataType is not None:
            self.dataType.export(outfile, level, namespace_, name_='dataType', pretty_print=pretty_print)
        if self.maximumOccurrence is not None:
            self.maximumOccurrence.export(outfile, level, namespace_, name_='maximumOccurrence', pretty_print=pretty_print)
        if self.domainValue is not None:
            self.domainValue.export(outfile, level, namespace_, name_='domainValue', pretty_print=pretty_print)
        for parentEntity_ in self.parentEntity:
            parentEntity_.export(outfile, level, namespace_, name_='parentEntity', pretty_print=pretty_print)
        if self.rule is not None:
            self.rule.export(outfile, level, namespace_, name_='rule', pretty_print=pretty_print)
        for rationale_ in self.rationale:
            rationale_.export(outfile, level, namespace_, name_='rationale', pretty_print=pretty_print)
        for source_ in self.source:
            source_.export(outfile, level, namespace_, name_='source', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ExtendedElementInformation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_ExtendedElementInformation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_ExtendedElementInformation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.CharacterString_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.shortName is not None:
            showIndent(outfile, level)
            outfile.write('shortName=model_.CharacterString_PropertyType(\n')
            self.shortName.exportLiteral(outfile, level, name_='shortName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.domainCode is not None:
            showIndent(outfile, level)
            outfile.write('domainCode=model_.Integer_PropertyType(\n')
            self.domainCode.exportLiteral(outfile, level, name_='domainCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.definition is not None:
            showIndent(outfile, level)
            outfile.write('definition=model_.CharacterString_PropertyType(\n')
            self.definition.exportLiteral(outfile, level, name_='definition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.obligation is not None:
            showIndent(outfile, level)
            outfile.write('obligation=model_.MD_ObligationCode_PropertyType(\n')
            self.obligation.exportLiteral(outfile, level, name_='obligation')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.condition is not None:
            showIndent(outfile, level)
            outfile.write('condition=model_.CharacterString_PropertyType(\n')
            self.condition.exportLiteral(outfile, level, name_='condition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dataType is not None:
            showIndent(outfile, level)
            outfile.write('dataType=model_.MD_DatatypeCode_PropertyType(\n')
            self.dataType.exportLiteral(outfile, level, name_='dataType')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.maximumOccurrence is not None:
            showIndent(outfile, level)
            outfile.write('maximumOccurrence=model_.CharacterString_PropertyType(\n')
            self.maximumOccurrence.exportLiteral(outfile, level, name_='maximumOccurrence')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.domainValue is not None:
            showIndent(outfile, level)
            outfile.write('domainValue=model_.CharacterString_PropertyType(\n')
            self.domainValue.exportLiteral(outfile, level, name_='domainValue')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('parentEntity=[\n')
        level += 1
        for parentEntity_ in self.parentEntity:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            parentEntity_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.rule is not None:
            showIndent(outfile, level)
            outfile.write('rule=model_.CharacterString_PropertyType(\n')
            self.rule.exportLiteral(outfile, level, name_='rule')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('rationale=[\n')
        level += 1
        for rationale_ in self.rationale:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            rationale_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('source=[\n')
        level += 1
        for source_ in self.source:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            source_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_ExtendedElementInformation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'shortName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.shortName = obj_
            obj_.original_tagname_ = 'shortName'
        elif nodeName_ == 'domainCode':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.domainCode = obj_
            obj_.original_tagname_ = 'domainCode'
        elif nodeName_ == 'definition':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.definition = obj_
            obj_.original_tagname_ = 'definition'
        elif nodeName_ == 'obligation':
            obj_ = MD_ObligationCode_PropertyType.factory()
            obj_.build(child_)
            self.obligation = obj_
            obj_.original_tagname_ = 'obligation'
        elif nodeName_ == 'condition':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.condition = obj_
            obj_.original_tagname_ = 'condition'
        elif nodeName_ == 'dataType':
            obj_ = MD_DatatypeCode_PropertyType.factory()
            obj_.build(child_)
            self.dataType = obj_
            obj_.original_tagname_ = 'dataType'
        elif nodeName_ == 'maximumOccurrence':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.maximumOccurrence = obj_
            obj_.original_tagname_ = 'maximumOccurrence'
        elif nodeName_ == 'domainValue':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.domainValue = obj_
            obj_.original_tagname_ = 'domainValue'
        elif nodeName_ == 'parentEntity':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.parentEntity.append(obj_)
            obj_.original_tagname_ = 'parentEntity'
        elif nodeName_ == 'rule':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.rule = obj_
            obj_.original_tagname_ = 'rule'
        elif nodeName_ == 'rationale':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.rationale.append(obj_)
            obj_.original_tagname_ = 'rationale'
        elif nodeName_ == 'source':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.source.append(obj_)
            obj_.original_tagname_ = 'source'
        super(MD_ExtendedElementInformation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_ExtendedElementInformation_Type


class MD_ExtendedElementInformation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_ExtendedElementInformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_ExtendedElementInformation = MD_ExtendedElementInformation
    def factory(*args_, **kwargs_):
        if MD_ExtendedElementInformation_PropertyType.subclass:
            return MD_ExtendedElementInformation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ExtendedElementInformation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ExtendedElementInformation(self): return self.MD_ExtendedElementInformation
    def set_MD_ExtendedElementInformation(self, MD_ExtendedElementInformation): self.MD_ExtendedElementInformation = MD_ExtendedElementInformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_ExtendedElementInformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ExtendedElementInformation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ExtendedElementInformation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ExtendedElementInformation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ExtendedElementInformation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ExtendedElementInformation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ExtendedElementInformation is not None:
            self.MD_ExtendedElementInformation.export(outfile, level, namespace_='gmd:', name_='MD_ExtendedElementInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ExtendedElementInformation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ExtendedElementInformation is not None:
            showIndent(outfile, level)
            outfile.write('MD_ExtendedElementInformation=model_.MD_ExtendedElementInformation(\n')
            self.MD_ExtendedElementInformation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ExtendedElementInformation':
            obj_ = MD_ExtendedElementInformation_Type.factory()
            obj_.build(child_)
            self.MD_ExtendedElementInformation = obj_
            obj_.original_tagname_ = 'MD_ExtendedElementInformation'
# end class MD_ExtendedElementInformation_PropertyType


class MD_MetadataExtensionInformation_Type(AbstractObject_Type):
    """Information describing metadata extensions."""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, extensionOnLineResource=None, extendedElementInformation=None):
        self.original_tagname_ = None
        super(MD_MetadataExtensionInformation_Type, self).__init__(id, uuid, )
        self.extensionOnLineResource = extensionOnLineResource
        if extendedElementInformation is None:
            self.extendedElementInformation = []
        else:
            self.extendedElementInformation = extendedElementInformation
    def factory(*args_, **kwargs_):
        if MD_MetadataExtensionInformation_Type.subclass:
            return MD_MetadataExtensionInformation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_MetadataExtensionInformation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensionOnLineResource(self): return self.extensionOnLineResource
    def set_extensionOnLineResource(self, extensionOnLineResource): self.extensionOnLineResource = extensionOnLineResource
    def get_extendedElementInformation(self): return self.extendedElementInformation
    def set_extendedElementInformation(self, extendedElementInformation): self.extendedElementInformation = extendedElementInformation
    def add_extendedElementInformation(self, value): self.extendedElementInformation.append(value)
    def insert_extendedElementInformation_at(self, index, value): self.extendedElementInformation.insert(index, value)
    def replace_extendedElementInformation_at(self, index, value): self.extendedElementInformation[index] = value
    def hasContent_(self):
        if (
            self.extensionOnLineResource is not None or
            self.extendedElementInformation or
            super(MD_MetadataExtensionInformation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MetadataExtensionInformation_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MetadataExtensionInformation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MetadataExtensionInformation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MetadataExtensionInformation_Type'):
        super(MD_MetadataExtensionInformation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MetadataExtensionInformation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MetadataExtensionInformation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_MetadataExtensionInformation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.extensionOnLineResource is not None:
            self.extensionOnLineResource.export(outfile, level, namespace_, name_='extensionOnLineResource', pretty_print=pretty_print)
        for extendedElementInformation_ in self.extendedElementInformation:
            extendedElementInformation_.export(outfile, level, namespace_, name_='extendedElementInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MetadataExtensionInformation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_MetadataExtensionInformation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_MetadataExtensionInformation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.extensionOnLineResource is not None:
            showIndent(outfile, level)
            outfile.write('extensionOnLineResource=model_.CI_OnlineResource_PropertyType(\n')
            self.extensionOnLineResource.exportLiteral(outfile, level, name_='extensionOnLineResource')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('extendedElementInformation=[\n')
        level += 1
        for extendedElementInformation_ in self.extendedElementInformation:
            showIndent(outfile, level)
            outfile.write('model_.MD_ExtendedElementInformation_PropertyType(\n')
            extendedElementInformation_.exportLiteral(outfile, level, name_='MD_ExtendedElementInformation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_MetadataExtensionInformation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'extensionOnLineResource':
            obj_ = CI_OnlineResource_PropertyType.factory()
            obj_.build(child_)
            self.extensionOnLineResource = obj_
            obj_.original_tagname_ = 'extensionOnLineResource'
        elif nodeName_ == 'extendedElementInformation':
            obj_ = MD_ExtendedElementInformation_PropertyType.factory()
            obj_.build(child_)
            self.extendedElementInformation.append(obj_)
            obj_.original_tagname_ = 'extendedElementInformation'
        super(MD_MetadataExtensionInformation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_MetadataExtensionInformation_Type


class MD_MetadataExtensionInformation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_MetadataExtensionInformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_MetadataExtensionInformation = MD_MetadataExtensionInformation
    def factory(*args_, **kwargs_):
        if MD_MetadataExtensionInformation_PropertyType.subclass:
            return MD_MetadataExtensionInformation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_MetadataExtensionInformation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_MetadataExtensionInformation(self): return self.MD_MetadataExtensionInformation
    def set_MD_MetadataExtensionInformation(self, MD_MetadataExtensionInformation): self.MD_MetadataExtensionInformation = MD_MetadataExtensionInformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_MetadataExtensionInformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MetadataExtensionInformation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MetadataExtensionInformation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MetadataExtensionInformation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MetadataExtensionInformation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MetadataExtensionInformation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_MetadataExtensionInformation is not None:
            self.MD_MetadataExtensionInformation.export(outfile, level, namespace_='gmd:', name_='MD_MetadataExtensionInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MetadataExtensionInformation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_MetadataExtensionInformation is not None:
            showIndent(outfile, level)
            outfile.write('MD_MetadataExtensionInformation=model_.MD_MetadataExtensionInformation(\n')
            self.MD_MetadataExtensionInformation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_MetadataExtensionInformation':
            obj_ = MD_MetadataExtensionInformation_Type.factory()
            obj_.build(child_)
            self.MD_MetadataExtensionInformation = obj_
            obj_.original_tagname_ = 'MD_MetadataExtensionInformation'
# end class MD_MetadataExtensionInformation_PropertyType


class MD_ObligationCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_ObligationCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_ObligationCode = MD_ObligationCode
    def factory(*args_, **kwargs_):
        if MD_ObligationCode_PropertyType.subclass:
            return MD_ObligationCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ObligationCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ObligationCode(self): return self.MD_ObligationCode
    def set_MD_ObligationCode(self, MD_ObligationCode): self.MD_ObligationCode = MD_ObligationCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_ObligationCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ObligationCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ObligationCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ObligationCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ObligationCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ObligationCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ObligationCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMD_ObligationCode>%s</%sMD_ObligationCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.MD_ObligationCode).encode(ExternalEncoding), input_name='MD_ObligationCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='MD_ObligationCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ObligationCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_ObligationCode=%s,\n' % quote_python(self.MD_ObligationCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ObligationCode':
            MD_ObligationCode_ = child_.text
            MD_ObligationCode_ = self.gds_validate_string(MD_ObligationCode_, node, 'MD_ObligationCode')
            self.MD_ObligationCode = MD_ObligationCode_
# end class MD_ObligationCode_PropertyType


class MD_DatatypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_DatatypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_DatatypeCode = MD_DatatypeCode
    def factory(*args_, **kwargs_):
        if MD_DatatypeCode_PropertyType.subclass:
            return MD_DatatypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_DatatypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_DatatypeCode(self): return self.MD_DatatypeCode
    def set_MD_DatatypeCode(self, MD_DatatypeCode): self.MD_DatatypeCode = MD_DatatypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_DatatypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DatatypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DatatypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DatatypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DatatypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DatatypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_DatatypeCode is not None:
            self.MD_DatatypeCode.export(outfile, level, namespace_='gmd:', name_='MD_DatatypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DatatypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_DatatypeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_DatatypeCode=model_.MD_DatatypeCode(\n')
            self.MD_DatatypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_DatatypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_DatatypeCode = obj_
            obj_.original_tagname_ = 'MD_DatatypeCode'
# end class MD_DatatypeCode_PropertyType


class MD_FeatureCatalogueDescription_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_FeatureCatalogueDescription=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_FeatureCatalogueDescription = MD_FeatureCatalogueDescription
    def factory(*args_, **kwargs_):
        if MD_FeatureCatalogueDescription_PropertyType.subclass:
            return MD_FeatureCatalogueDescription_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_FeatureCatalogueDescription_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_FeatureCatalogueDescription(self): return self.MD_FeatureCatalogueDescription
    def set_MD_FeatureCatalogueDescription(self, MD_FeatureCatalogueDescription): self.MD_FeatureCatalogueDescription = MD_FeatureCatalogueDescription
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_FeatureCatalogueDescription is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_FeatureCatalogueDescription_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_FeatureCatalogueDescription_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_FeatureCatalogueDescription_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_FeatureCatalogueDescription_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_FeatureCatalogueDescription_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_FeatureCatalogueDescription is not None:
            self.MD_FeatureCatalogueDescription.export(outfile, level, namespace_='gmd:', name_='MD_FeatureCatalogueDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_FeatureCatalogueDescription_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_FeatureCatalogueDescription is not None:
            showIndent(outfile, level)
            outfile.write('MD_FeatureCatalogueDescription=model_.MD_FeatureCatalogueDescription(\n')
            self.MD_FeatureCatalogueDescription.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_FeatureCatalogueDescription':
            obj_ = MD_FeatureCatalogueDescription_Type.factory()
            obj_.build(child_)
            self.MD_FeatureCatalogueDescription = obj_
            obj_.original_tagname_ = 'MD_FeatureCatalogueDescription'
# end class MD_FeatureCatalogueDescription_PropertyType


class MD_CoverageDescription_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_CoverageDescription=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_CoverageDescription = MD_CoverageDescription
    def factory(*args_, **kwargs_):
        if MD_CoverageDescription_PropertyType.subclass:
            return MD_CoverageDescription_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_CoverageDescription_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_CoverageDescription(self): return self.MD_CoverageDescription
    def set_MD_CoverageDescription(self, MD_CoverageDescription): self.MD_CoverageDescription = MD_CoverageDescription
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_CoverageDescription is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_CoverageDescription_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_CoverageDescription_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_CoverageDescription_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_CoverageDescription_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_CoverageDescription_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_CoverageDescription is not None:
            self.MD_CoverageDescription.export(outfile, level, namespace_='gmd:', name_='MD_CoverageDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_CoverageDescription_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_CoverageDescription is not None:
            showIndent(outfile, level)
            outfile.write('MD_CoverageDescription=model_.MD_CoverageDescription(\n')
            self.MD_CoverageDescription.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_CoverageDescription':
            class_obj_ = self.get_class_obj_(child_, MD_CoverageDescription_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_CoverageDescription = obj_
            obj_.original_tagname_ = 'MD_CoverageDescription'
        elif nodeName_ == 'MD_ImageDescription':
            obj_ = MD_ImageDescription_Type.factory()
            obj_.build(child_)
            self.MD_ImageDescription = obj_
            obj_.original_tagname_ = 'MD_ImageDescription'
# end class MD_CoverageDescription_PropertyType


class MD_ImageDescription_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_ImageDescription=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_ImageDescription = MD_ImageDescription
    def factory(*args_, **kwargs_):
        if MD_ImageDescription_PropertyType.subclass:
            return MD_ImageDescription_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ImageDescription_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ImageDescription(self): return self.MD_ImageDescription
    def set_MD_ImageDescription(self, MD_ImageDescription): self.MD_ImageDescription = MD_ImageDescription
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_ImageDescription is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ImageDescription_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ImageDescription_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ImageDescription_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ImageDescription_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ImageDescription_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ImageDescription is not None:
            self.MD_ImageDescription.export(outfile, level, namespace_='gmd:', name_='MD_ImageDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ImageDescription_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ImageDescription is not None:
            showIndent(outfile, level)
            outfile.write('MD_ImageDescription=model_.MD_ImageDescription(\n')
            self.MD_ImageDescription.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ImageDescription':
            obj_ = MD_ImageDescription_Type.factory()
            obj_.build(child_)
            self.MD_ImageDescription = obj_
            obj_.original_tagname_ = 'MD_ImageDescription'
# end class MD_ImageDescription_PropertyType


class AbstractMD_ContentInformation_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractMD_ContentInformation_Type, self).__init__(id, uuid, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractMD_ContentInformation_Type.subclass:
            return AbstractMD_ContentInformation_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractMD_ContentInformation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractMD_ContentInformation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractMD_ContentInformation_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMD_ContentInformation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractMD_ContentInformation_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractMD_ContentInformation_Type'):
        super(AbstractMD_ContentInformation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMD_ContentInformation_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractMD_ContentInformation_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractMD_ContentInformation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='AbstractMD_ContentInformation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractMD_ContentInformation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractMD_ContentInformation_Type, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractMD_ContentInformation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractMD_ContentInformation_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractMD_ContentInformation_Type


class MD_ContentInformation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractMD_ContentInformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractMD_ContentInformation = AbstractMD_ContentInformation
    def factory(*args_, **kwargs_):
        if MD_ContentInformation_PropertyType.subclass:
            return MD_ContentInformation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ContentInformation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractMD_ContentInformation(self): return self.AbstractMD_ContentInformation
    def set_AbstractMD_ContentInformation(self, AbstractMD_ContentInformation): self.AbstractMD_ContentInformation = AbstractMD_ContentInformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractMD_ContentInformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ContentInformation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ContentInformation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ContentInformation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ContentInformation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ContentInformation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractMD_ContentInformation is not None:
            self.AbstractMD_ContentInformation.export(outfile, level, namespace_, name_='AbstractMD_ContentInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ContentInformation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractMD_ContentInformation is not None:
            showIndent(outfile, level)
            outfile.write('AbstractMD_ContentInformation=model_.AbstractMD_ContentInformation(\n')
            self.AbstractMD_ContentInformation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractMD_ContentInformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractMD_ContentInformation> element')
            self.AbstractMD_ContentInformation = obj_
            obj_.original_tagname_ = 'AbstractMD_ContentInformation'
        elif nodeName_ == 'MD_FeatureCatalogueDescription':
            obj_ = MD_FeatureCatalogueDescription_Type.factory()
            obj_.build(child_)
            self.MD_FeatureCatalogueDescription = obj_
            obj_.original_tagname_ = 'MD_FeatureCatalogueDescription'
        elif nodeName_ == 'MD_CoverageDescription':
            class_obj_ = self.get_class_obj_(child_, MD_CoverageDescription_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_CoverageDescription = obj_
            obj_.original_tagname_ = 'MD_CoverageDescription'
        elif nodeName_ == 'MD_ImageDescription':
            obj_ = MD_ImageDescription_Type.factory()
            obj_.build(child_)
            self.MD_ImageDescription = obj_
            obj_.original_tagname_ = 'MD_ImageDescription'
# end class MD_ContentInformation_PropertyType


class MD_RangeDimension_Type(AbstractObject_Type):
    """Set of adjacent wavelengths in the electro-magnetic spectrum with a
    common characteristic, such as the visible band"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, sequenceIdentifier=None, descriptor=None, extensiontype_=None):
        self.original_tagname_ = None
        super(MD_RangeDimension_Type, self).__init__(id, uuid, extensiontype_, )
        self.sequenceIdentifier = sequenceIdentifier
        self.descriptor = descriptor
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MD_RangeDimension_Type.subclass:
            return MD_RangeDimension_Type.subclass(*args_, **kwargs_)
        else:
            return MD_RangeDimension_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_sequenceIdentifier(self): return self.sequenceIdentifier
    def set_sequenceIdentifier(self, sequenceIdentifier): self.sequenceIdentifier = sequenceIdentifier
    def get_descriptor(self): return self.descriptor
    def set_descriptor(self, descriptor): self.descriptor = descriptor
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.sequenceIdentifier is not None or
            self.descriptor is not None or
            super(MD_RangeDimension_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_RangeDimension_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RangeDimension_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_RangeDimension_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_RangeDimension_Type'):
        super(MD_RangeDimension_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RangeDimension_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_RangeDimension_Type', fromsubclass_=False, pretty_print=True):
        super(MD_RangeDimension_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.sequenceIdentifier is not None:
            self.sequenceIdentifier.export(outfile, level, namespace_, name_='sequenceIdentifier', pretty_print=pretty_print)
        if self.descriptor is not None:
            self.descriptor.export(outfile, level, namespace_, name_='descriptor', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_RangeDimension_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_RangeDimension_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_RangeDimension_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.sequenceIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('sequenceIdentifier=model_.MemberName_PropertyType(\n')
            self.sequenceIdentifier.exportLiteral(outfile, level, name_='sequenceIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptor is not None:
            showIndent(outfile, level)
            outfile.write('descriptor=model_.CharacterString_PropertyType(\n')
            self.descriptor.exportLiteral(outfile, level, name_='descriptor')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(MD_RangeDimension_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'sequenceIdentifier':
            obj_ = MemberName_PropertyType.factory()
            obj_.build(child_)
            self.sequenceIdentifier = obj_
            obj_.original_tagname_ = 'sequenceIdentifier'
        elif nodeName_ == 'descriptor':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.descriptor = obj_
            obj_.original_tagname_ = 'descriptor'
        super(MD_RangeDimension_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_RangeDimension_Type


class MD_RangeDimension_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_RangeDimension=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_RangeDimension = MD_RangeDimension
    def factory(*args_, **kwargs_):
        if MD_RangeDimension_PropertyType.subclass:
            return MD_RangeDimension_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_RangeDimension_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_RangeDimension(self): return self.MD_RangeDimension
    def set_MD_RangeDimension(self, MD_RangeDimension): self.MD_RangeDimension = MD_RangeDimension
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_RangeDimension is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_RangeDimension_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RangeDimension_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_RangeDimension_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_RangeDimension_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_RangeDimension_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_RangeDimension is not None:
            self.MD_RangeDimension.export(outfile, level, namespace_='gmd:', name_='MD_RangeDimension', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_RangeDimension_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_RangeDimension is not None:
            showIndent(outfile, level)
            outfile.write('MD_RangeDimension=model_.MD_RangeDimension(\n')
            self.MD_RangeDimension.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_RangeDimension':
            class_obj_ = self.get_class_obj_(child_, MD_RangeDimension_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_RangeDimension = obj_
            obj_.original_tagname_ = 'MD_RangeDimension'
        elif nodeName_ == 'MD_Band':
            obj_ = MD_Band_Type.factory()
            obj_.build(child_)
            self.MD_Band = obj_
            obj_.original_tagname_ = 'MD_Band'
# end class MD_RangeDimension_PropertyType


class MD_Band_Type(MD_RangeDimension_Type):
    subclass = None
    superclass = MD_RangeDimension_Type
    def __init__(self, id=None, uuid=None, sequenceIdentifier=None, descriptor=None, maxValue=None, minValue=None, units=None, peakResponse=None, bitsPerValue=None, toneGradation=None, scaleFactor=None, offset=None):
        self.original_tagname_ = None
        super(MD_Band_Type, self).__init__(id, uuid, sequenceIdentifier, descriptor, )
        self.maxValue = maxValue
        self.minValue = minValue
        self.units = units
        self.peakResponse = peakResponse
        self.bitsPerValue = bitsPerValue
        self.toneGradation = toneGradation
        self.scaleFactor = scaleFactor
        self.offset = offset
    def factory(*args_, **kwargs_):
        if MD_Band_Type.subclass:
            return MD_Band_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Band_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_maxValue(self): return self.maxValue
    def set_maxValue(self, maxValue): self.maxValue = maxValue
    def get_minValue(self): return self.minValue
    def set_minValue(self, minValue): self.minValue = minValue
    def get_units(self): return self.units
    def set_units(self, units): self.units = units
    def get_peakResponse(self): return self.peakResponse
    def set_peakResponse(self, peakResponse): self.peakResponse = peakResponse
    def get_bitsPerValue(self): return self.bitsPerValue
    def set_bitsPerValue(self, bitsPerValue): self.bitsPerValue = bitsPerValue
    def get_toneGradation(self): return self.toneGradation
    def set_toneGradation(self, toneGradation): self.toneGradation = toneGradation
    def get_scaleFactor(self): return self.scaleFactor
    def set_scaleFactor(self, scaleFactor): self.scaleFactor = scaleFactor
    def get_offset(self): return self.offset
    def set_offset(self, offset): self.offset = offset
    def hasContent_(self):
        if (
            self.maxValue is not None or
            self.minValue is not None or
            self.units is not None or
            self.peakResponse is not None or
            self.bitsPerValue is not None or
            self.toneGradation is not None or
            self.scaleFactor is not None or
            self.offset is not None or
            super(MD_Band_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Band_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Band_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Band_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Band_Type'):
        super(MD_Band_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Band_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Band_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Band_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.maxValue is not None:
            self.maxValue.export(outfile, level, namespace_, name_='maxValue', pretty_print=pretty_print)
        if self.minValue is not None:
            self.minValue.export(outfile, level, namespace_, name_='minValue', pretty_print=pretty_print)
        if self.units is not None:
            self.units.export(outfile, level, namespace_, name_='units', pretty_print=pretty_print)
        if self.peakResponse is not None:
            self.peakResponse.export(outfile, level, namespace_, name_='peakResponse', pretty_print=pretty_print)
        if self.bitsPerValue is not None:
            self.bitsPerValue.export(outfile, level, namespace_, name_='bitsPerValue', pretty_print=pretty_print)
        if self.toneGradation is not None:
            self.toneGradation.export(outfile, level, namespace_, name_='toneGradation', pretty_print=pretty_print)
        if self.scaleFactor is not None:
            self.scaleFactor.export(outfile, level, namespace_, name_='scaleFactor', pretty_print=pretty_print)
        if self.offset is not None:
            self.offset.export(outfile, level, namespace_, name_='offset', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Band_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Band_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Band_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.maxValue is not None:
            showIndent(outfile, level)
            outfile.write('maxValue=model_.Real_PropertyType(\n')
            self.maxValue.exportLiteral(outfile, level, name_='maxValue')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.minValue is not None:
            showIndent(outfile, level)
            outfile.write('minValue=model_.Real_PropertyType(\n')
            self.minValue.exportLiteral(outfile, level, name_='minValue')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.units is not None:
            showIndent(outfile, level)
            outfile.write('units=model_.UomLength_PropertyType(\n')
            self.units.exportLiteral(outfile, level, name_='units')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.peakResponse is not None:
            showIndent(outfile, level)
            outfile.write('peakResponse=model_.Real_PropertyType(\n')
            self.peakResponse.exportLiteral(outfile, level, name_='peakResponse')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.bitsPerValue is not None:
            showIndent(outfile, level)
            outfile.write('bitsPerValue=model_.Integer_PropertyType(\n')
            self.bitsPerValue.exportLiteral(outfile, level, name_='bitsPerValue')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.toneGradation is not None:
            showIndent(outfile, level)
            outfile.write('toneGradation=model_.Integer_PropertyType(\n')
            self.toneGradation.exportLiteral(outfile, level, name_='toneGradation')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.scaleFactor is not None:
            showIndent(outfile, level)
            outfile.write('scaleFactor=model_.Real_PropertyType(\n')
            self.scaleFactor.exportLiteral(outfile, level, name_='scaleFactor')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.offset is not None:
            showIndent(outfile, level)
            outfile.write('offset=model_.Real_PropertyType(\n')
            self.offset.exportLiteral(outfile, level, name_='offset')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Band_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'maxValue':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.maxValue = obj_
            obj_.original_tagname_ = 'maxValue'
        elif nodeName_ == 'minValue':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.minValue = obj_
            obj_.original_tagname_ = 'minValue'
        elif nodeName_ == 'units':
            obj_ = UomLength_PropertyType.factory()
            obj_.build(child_)
            self.units = obj_
            obj_.original_tagname_ = 'units'
        elif nodeName_ == 'peakResponse':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.peakResponse = obj_
            obj_.original_tagname_ = 'peakResponse'
        elif nodeName_ == 'bitsPerValue':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.bitsPerValue = obj_
            obj_.original_tagname_ = 'bitsPerValue'
        elif nodeName_ == 'toneGradation':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.toneGradation = obj_
            obj_.original_tagname_ = 'toneGradation'
        elif nodeName_ == 'scaleFactor':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.scaleFactor = obj_
            obj_.original_tagname_ = 'scaleFactor'
        elif nodeName_ == 'offset':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.offset = obj_
            obj_.original_tagname_ = 'offset'
        super(MD_Band_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Band_Type


class MD_Band_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Band=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Band = MD_Band
    def factory(*args_, **kwargs_):
        if MD_Band_PropertyType.subclass:
            return MD_Band_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Band_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Band(self): return self.MD_Band
    def set_MD_Band(self, MD_Band): self.MD_Band = MD_Band
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Band is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Band_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Band_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Band_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Band_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Band_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Band is not None:
            self.MD_Band.export(outfile, level, namespace_='gmd:', name_='MD_Band', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Band_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Band is not None:
            showIndent(outfile, level)
            outfile.write('MD_Band=model_.MD_Band(\n')
            self.MD_Band.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Band':
            obj_ = MD_Band_Type.factory()
            obj_.build(child_)
            self.MD_Band = obj_
            obj_.original_tagname_ = 'MD_Band'
# end class MD_Band_PropertyType


class MD_CoverageContentTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_CoverageContentTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_CoverageContentTypeCode = MD_CoverageContentTypeCode
    def factory(*args_, **kwargs_):
        if MD_CoverageContentTypeCode_PropertyType.subclass:
            return MD_CoverageContentTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_CoverageContentTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_CoverageContentTypeCode(self): return self.MD_CoverageContentTypeCode
    def set_MD_CoverageContentTypeCode(self, MD_CoverageContentTypeCode): self.MD_CoverageContentTypeCode = MD_CoverageContentTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_CoverageContentTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_CoverageContentTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_CoverageContentTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_CoverageContentTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_CoverageContentTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_CoverageContentTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_CoverageContentTypeCode is not None:
            self.MD_CoverageContentTypeCode.export(outfile, level, namespace_='gmd:', name_='MD_CoverageContentTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_CoverageContentTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_CoverageContentTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_CoverageContentTypeCode=model_.MD_CoverageContentTypeCode(\n')
            self.MD_CoverageContentTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_CoverageContentTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_CoverageContentTypeCode = obj_
            obj_.original_tagname_ = 'MD_CoverageContentTypeCode'
# end class MD_CoverageContentTypeCode_PropertyType


class MD_ImagingConditionCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_ImagingConditionCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_ImagingConditionCode = MD_ImagingConditionCode
    def factory(*args_, **kwargs_):
        if MD_ImagingConditionCode_PropertyType.subclass:
            return MD_ImagingConditionCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ImagingConditionCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ImagingConditionCode(self): return self.MD_ImagingConditionCode
    def set_MD_ImagingConditionCode(self, MD_ImagingConditionCode): self.MD_ImagingConditionCode = MD_ImagingConditionCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_ImagingConditionCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ImagingConditionCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ImagingConditionCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ImagingConditionCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ImagingConditionCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ImagingConditionCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ImagingConditionCode is not None:
            self.MD_ImagingConditionCode.export(outfile, level, namespace_='gmd:', name_='MD_ImagingConditionCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ImagingConditionCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ImagingConditionCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_ImagingConditionCode=model_.MD_ImagingConditionCode(\n')
            self.MD_ImagingConditionCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ImagingConditionCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ImagingConditionCode = obj_
            obj_.original_tagname_ = 'MD_ImagingConditionCode'
# end class MD_ImagingConditionCode_PropertyType


class MD_ApplicationSchemaInformation_Type(AbstractObject_Type):
    """Information about the application schema used to build the dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, name=None, schemaLanguage=None, constraintLanguage=None, schemaAscii=None, graphicsFile=None, softwareDevelopmentFile=None, softwareDevelopmentFileFormat=None):
        self.original_tagname_ = None
        super(MD_ApplicationSchemaInformation_Type, self).__init__(id, uuid, )
        self.name = name
        self.schemaLanguage = schemaLanguage
        self.constraintLanguage = constraintLanguage
        self.schemaAscii = schemaAscii
        self.graphicsFile = graphicsFile
        self.softwareDevelopmentFile = softwareDevelopmentFile
        self.softwareDevelopmentFileFormat = softwareDevelopmentFileFormat
    def factory(*args_, **kwargs_):
        if MD_ApplicationSchemaInformation_Type.subclass:
            return MD_ApplicationSchemaInformation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_ApplicationSchemaInformation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_schemaLanguage(self): return self.schemaLanguage
    def set_schemaLanguage(self, schemaLanguage): self.schemaLanguage = schemaLanguage
    def get_constraintLanguage(self): return self.constraintLanguage
    def set_constraintLanguage(self, constraintLanguage): self.constraintLanguage = constraintLanguage
    def get_schemaAscii(self): return self.schemaAscii
    def set_schemaAscii(self, schemaAscii): self.schemaAscii = schemaAscii
    def get_graphicsFile(self): return self.graphicsFile
    def set_graphicsFile(self, graphicsFile): self.graphicsFile = graphicsFile
    def get_softwareDevelopmentFile(self): return self.softwareDevelopmentFile
    def set_softwareDevelopmentFile(self, softwareDevelopmentFile): self.softwareDevelopmentFile = softwareDevelopmentFile
    def get_softwareDevelopmentFileFormat(self): return self.softwareDevelopmentFileFormat
    def set_softwareDevelopmentFileFormat(self, softwareDevelopmentFileFormat): self.softwareDevelopmentFileFormat = softwareDevelopmentFileFormat
    def hasContent_(self):
        if (
            self.name is not None or
            self.schemaLanguage is not None or
            self.constraintLanguage is not None or
            self.schemaAscii is not None or
            self.graphicsFile is not None or
            self.softwareDevelopmentFile is not None or
            self.softwareDevelopmentFileFormat is not None or
            super(MD_ApplicationSchemaInformation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ApplicationSchemaInformation_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ApplicationSchemaInformation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ApplicationSchemaInformation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ApplicationSchemaInformation_Type'):
        super(MD_ApplicationSchemaInformation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ApplicationSchemaInformation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ApplicationSchemaInformation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_ApplicationSchemaInformation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        if self.schemaLanguage is not None:
            self.schemaLanguage.export(outfile, level, namespace_, name_='schemaLanguage', pretty_print=pretty_print)
        if self.constraintLanguage is not None:
            self.constraintLanguage.export(outfile, level, namespace_, name_='constraintLanguage', pretty_print=pretty_print)
        if self.schemaAscii is not None:
            self.schemaAscii.export(outfile, level, namespace_, name_='schemaAscii', pretty_print=pretty_print)
        if self.graphicsFile is not None:
            self.graphicsFile.export(outfile, level, namespace_, name_='graphicsFile', pretty_print=pretty_print)
        if self.softwareDevelopmentFile is not None:
            self.softwareDevelopmentFile.export(outfile, level, namespace_, name_='softwareDevelopmentFile', pretty_print=pretty_print)
        if self.softwareDevelopmentFileFormat is not None:
            self.softwareDevelopmentFileFormat.export(outfile, level, namespace_, name_='softwareDevelopmentFileFormat', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ApplicationSchemaInformation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_ApplicationSchemaInformation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_ApplicationSchemaInformation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.CI_Citation_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.schemaLanguage is not None:
            showIndent(outfile, level)
            outfile.write('schemaLanguage=model_.CharacterString_PropertyType(\n')
            self.schemaLanguage.exportLiteral(outfile, level, name_='schemaLanguage')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.constraintLanguage is not None:
            showIndent(outfile, level)
            outfile.write('constraintLanguage=model_.CharacterString_PropertyType(\n')
            self.constraintLanguage.exportLiteral(outfile, level, name_='constraintLanguage')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.schemaAscii is not None:
            showIndent(outfile, level)
            outfile.write('schemaAscii=model_.CharacterString_PropertyType(\n')
            self.schemaAscii.exportLiteral(outfile, level, name_='schemaAscii')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.graphicsFile is not None:
            showIndent(outfile, level)
            outfile.write('graphicsFile=model_.Binary_PropertyType(\n')
            self.graphicsFile.exportLiteral(outfile, level, name_='graphicsFile')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.softwareDevelopmentFile is not None:
            showIndent(outfile, level)
            outfile.write('softwareDevelopmentFile=model_.Binary_PropertyType(\n')
            self.softwareDevelopmentFile.exportLiteral(outfile, level, name_='softwareDevelopmentFile')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.softwareDevelopmentFileFormat is not None:
            showIndent(outfile, level)
            outfile.write('softwareDevelopmentFileFormat=model_.CharacterString_PropertyType(\n')
            self.softwareDevelopmentFileFormat.exportLiteral(outfile, level, name_='softwareDevelopmentFileFormat')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_ApplicationSchemaInformation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'name':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'schemaLanguage':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.schemaLanguage = obj_
            obj_.original_tagname_ = 'schemaLanguage'
        elif nodeName_ == 'constraintLanguage':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.constraintLanguage = obj_
            obj_.original_tagname_ = 'constraintLanguage'
        elif nodeName_ == 'schemaAscii':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.schemaAscii = obj_
            obj_.original_tagname_ = 'schemaAscii'
        elif nodeName_ == 'graphicsFile':
            obj_ = Binary_PropertyType.factory()
            obj_.build(child_)
            self.graphicsFile = obj_
            obj_.original_tagname_ = 'graphicsFile'
        elif nodeName_ == 'softwareDevelopmentFile':
            obj_ = Binary_PropertyType.factory()
            obj_.build(child_)
            self.softwareDevelopmentFile = obj_
            obj_.original_tagname_ = 'softwareDevelopmentFile'
        elif nodeName_ == 'softwareDevelopmentFileFormat':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.softwareDevelopmentFileFormat = obj_
            obj_.original_tagname_ = 'softwareDevelopmentFileFormat'
        super(MD_ApplicationSchemaInformation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_ApplicationSchemaInformation_Type


class MD_ApplicationSchemaInformation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_ApplicationSchemaInformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_ApplicationSchemaInformation = MD_ApplicationSchemaInformation
    def factory(*args_, **kwargs_):
        if MD_ApplicationSchemaInformation_PropertyType.subclass:
            return MD_ApplicationSchemaInformation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ApplicationSchemaInformation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ApplicationSchemaInformation(self): return self.MD_ApplicationSchemaInformation
    def set_MD_ApplicationSchemaInformation(self, MD_ApplicationSchemaInformation): self.MD_ApplicationSchemaInformation = MD_ApplicationSchemaInformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_ApplicationSchemaInformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ApplicationSchemaInformation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ApplicationSchemaInformation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ApplicationSchemaInformation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ApplicationSchemaInformation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ApplicationSchemaInformation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ApplicationSchemaInformation is not None:
            self.MD_ApplicationSchemaInformation.export(outfile, level, namespace_='gmd:', name_='MD_ApplicationSchemaInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ApplicationSchemaInformation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ApplicationSchemaInformation is not None:
            showIndent(outfile, level)
            outfile.write('MD_ApplicationSchemaInformation=model_.MD_ApplicationSchemaInformation(\n')
            self.MD_ApplicationSchemaInformation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ApplicationSchemaInformation':
            obj_ = MD_ApplicationSchemaInformation_Type.factory()
            obj_.build(child_)
            self.MD_ApplicationSchemaInformation = obj_
            obj_.original_tagname_ = 'MD_ApplicationSchemaInformation'
# end class MD_ApplicationSchemaInformation_PropertyType


class MD_PortrayalCatalogueReference_Type(AbstractObject_Type):
    """Information identifing the portrayal catalogue used"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, portrayalCatalogueCitation=None):
        self.original_tagname_ = None
        super(MD_PortrayalCatalogueReference_Type, self).__init__(id, uuid, )
        if portrayalCatalogueCitation is None:
            self.portrayalCatalogueCitation = []
        else:
            self.portrayalCatalogueCitation = portrayalCatalogueCitation
    def factory(*args_, **kwargs_):
        if MD_PortrayalCatalogueReference_Type.subclass:
            return MD_PortrayalCatalogueReference_Type.subclass(*args_, **kwargs_)
        else:
            return MD_PortrayalCatalogueReference_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_portrayalCatalogueCitation(self): return self.portrayalCatalogueCitation
    def set_portrayalCatalogueCitation(self, portrayalCatalogueCitation): self.portrayalCatalogueCitation = portrayalCatalogueCitation
    def add_portrayalCatalogueCitation(self, value): self.portrayalCatalogueCitation.append(value)
    def insert_portrayalCatalogueCitation_at(self, index, value): self.portrayalCatalogueCitation.insert(index, value)
    def replace_portrayalCatalogueCitation_at(self, index, value): self.portrayalCatalogueCitation[index] = value
    def hasContent_(self):
        if (
            self.portrayalCatalogueCitation or
            super(MD_PortrayalCatalogueReference_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_PortrayalCatalogueReference_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_PortrayalCatalogueReference_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_PortrayalCatalogueReference_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_PortrayalCatalogueReference_Type'):
        super(MD_PortrayalCatalogueReference_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_PortrayalCatalogueReference_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_PortrayalCatalogueReference_Type', fromsubclass_=False, pretty_print=True):
        super(MD_PortrayalCatalogueReference_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for portrayalCatalogueCitation_ in self.portrayalCatalogueCitation:
            portrayalCatalogueCitation_.export(outfile, level, namespace_, name_='portrayalCatalogueCitation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_PortrayalCatalogueReference_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_PortrayalCatalogueReference_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_PortrayalCatalogueReference_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('portrayalCatalogueCitation=[\n')
        level += 1
        for portrayalCatalogueCitation_ in self.portrayalCatalogueCitation:
            showIndent(outfile, level)
            outfile.write('model_.CI_Citation_PropertyType(\n')
            portrayalCatalogueCitation_.exportLiteral(outfile, level, name_='CI_Citation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_PortrayalCatalogueReference_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'portrayalCatalogueCitation':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.portrayalCatalogueCitation.append(obj_)
            obj_.original_tagname_ = 'portrayalCatalogueCitation'
        super(MD_PortrayalCatalogueReference_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_PortrayalCatalogueReference_Type


class MD_PortrayalCatalogueReference_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_PortrayalCatalogueReference=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_PortrayalCatalogueReference = MD_PortrayalCatalogueReference
    def factory(*args_, **kwargs_):
        if MD_PortrayalCatalogueReference_PropertyType.subclass:
            return MD_PortrayalCatalogueReference_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_PortrayalCatalogueReference_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_PortrayalCatalogueReference(self): return self.MD_PortrayalCatalogueReference
    def set_MD_PortrayalCatalogueReference(self, MD_PortrayalCatalogueReference): self.MD_PortrayalCatalogueReference = MD_PortrayalCatalogueReference
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_PortrayalCatalogueReference is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_PortrayalCatalogueReference_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_PortrayalCatalogueReference_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_PortrayalCatalogueReference_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_PortrayalCatalogueReference_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_PortrayalCatalogueReference_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_PortrayalCatalogueReference is not None:
            self.MD_PortrayalCatalogueReference.export(outfile, level, namespace_='gmd:', name_='MD_PortrayalCatalogueReference', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_PortrayalCatalogueReference_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_PortrayalCatalogueReference is not None:
            showIndent(outfile, level)
            outfile.write('MD_PortrayalCatalogueReference=model_.MD_PortrayalCatalogueReference(\n')
            self.MD_PortrayalCatalogueReference.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_PortrayalCatalogueReference':
            obj_ = MD_PortrayalCatalogueReference_Type.factory()
            obj_.build(child_)
            self.MD_PortrayalCatalogueReference = obj_
            obj_.original_tagname_ = 'MD_PortrayalCatalogueReference'
# end class MD_PortrayalCatalogueReference_PropertyType


class LI_ProcessStep_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, description=None, rationale=None, dateTime=None, processor=None, source=None):
        self.original_tagname_ = None
        super(LI_ProcessStep_Type, self).__init__(id, uuid, )
        self.description = description
        self.rationale = rationale
        self.dateTime = dateTime
        if processor is None:
            self.processor = []
        else:
            self.processor = processor
        if source is None:
            self.source = []
        else:
            self.source = source
    def factory(*args_, **kwargs_):
        if LI_ProcessStep_Type.subclass:
            return LI_ProcessStep_Type.subclass(*args_, **kwargs_)
        else:
            return LI_ProcessStep_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_rationale(self): return self.rationale
    def set_rationale(self, rationale): self.rationale = rationale
    def get_dateTime(self): return self.dateTime
    def set_dateTime(self, dateTime): self.dateTime = dateTime
    def get_processor(self): return self.processor
    def set_processor(self, processor): self.processor = processor
    def add_processor(self, value): self.processor.append(value)
    def insert_processor_at(self, index, value): self.processor.insert(index, value)
    def replace_processor_at(self, index, value): self.processor[index] = value
    def get_source(self): return self.source
    def set_source(self, source): self.source = source
    def add_source(self, value): self.source.append(value)
    def insert_source_at(self, index, value): self.source.insert(index, value)
    def replace_source_at(self, index, value): self.source[index] = value
    def hasContent_(self):
        if (
            self.description is not None or
            self.rationale is not None or
            self.dateTime is not None or
            self.processor or
            self.source or
            super(LI_ProcessStep_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LI_ProcessStep_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LI_ProcessStep_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LI_ProcessStep_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LI_ProcessStep_Type'):
        super(LI_ProcessStep_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LI_ProcessStep_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LI_ProcessStep_Type', fromsubclass_=False, pretty_print=True):
        super(LI_ProcessStep_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.description is not None:
            self.description.export(outfile, level, namespace_, name_='description', pretty_print=pretty_print)
        if self.rationale is not None:
            self.rationale.export(outfile, level, namespace_, name_='rationale', pretty_print=pretty_print)
        if self.dateTime is not None:
            self.dateTime.export(outfile, level, namespace_, name_='dateTime', pretty_print=pretty_print)
        for processor_ in self.processor:
            processor_.export(outfile, level, namespace_, name_='processor', pretty_print=pretty_print)
        for source_ in self.source:
            source_.export(outfile, level, namespace_, name_='source', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LI_ProcessStep_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LI_ProcessStep_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LI_ProcessStep_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.rationale is not None:
            showIndent(outfile, level)
            outfile.write('rationale=model_.CharacterString_PropertyType(\n')
            self.rationale.exportLiteral(outfile, level, name_='rationale')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dateTime is not None:
            showIndent(outfile, level)
            outfile.write('dateTime=model_.DateTime_PropertyType(\n')
            self.dateTime.exportLiteral(outfile, level, name_='dateTime')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('processor=[\n')
        level += 1
        for processor_ in self.processor:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            processor_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('source=[\n')
        level += 1
        for source_ in self.source:
            showIndent(outfile, level)
            outfile.write('model_.LI_Source_PropertyType(\n')
            source_.exportLiteral(outfile, level, name_='LI_Source_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LI_ProcessStep_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'rationale':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.rationale = obj_
            obj_.original_tagname_ = 'rationale'
        elif nodeName_ == 'dateTime':
            obj_ = DateTime_PropertyType.factory()
            obj_.build(child_)
            self.dateTime = obj_
            obj_.original_tagname_ = 'dateTime'
        elif nodeName_ == 'processor':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.processor.append(obj_)
            obj_.original_tagname_ = 'processor'
        elif nodeName_ == 'source':
            obj_ = LI_Source_PropertyType.factory()
            obj_.build(child_)
            self.source.append(obj_)
            obj_.original_tagname_ = 'source'
        super(LI_ProcessStep_Type, self).buildChildren(child_, node, nodeName_, True)
# end class LI_ProcessStep_Type


class LI_ProcessStep_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, LI_ProcessStep=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.LI_ProcessStep = LI_ProcessStep
    def factory(*args_, **kwargs_):
        if LI_ProcessStep_PropertyType.subclass:
            return LI_ProcessStep_PropertyType.subclass(*args_, **kwargs_)
        else:
            return LI_ProcessStep_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LI_ProcessStep(self): return self.LI_ProcessStep
    def set_LI_ProcessStep(self, LI_ProcessStep): self.LI_ProcessStep = LI_ProcessStep
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.LI_ProcessStep is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LI_ProcessStep_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LI_ProcessStep_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LI_ProcessStep_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LI_ProcessStep_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LI_ProcessStep_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LI_ProcessStep is not None:
            self.LI_ProcessStep.export(outfile, level, namespace_='gmd:', name_='LI_ProcessStep', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LI_ProcessStep_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LI_ProcessStep is not None:
            showIndent(outfile, level)
            outfile.write('LI_ProcessStep=model_.LI_ProcessStep(\n')
            self.LI_ProcessStep.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LI_ProcessStep':
            obj_ = LI_ProcessStep_Type.factory()
            obj_.build(child_)
            self.LI_ProcessStep = obj_
            obj_.original_tagname_ = 'LI_ProcessStep'
# end class LI_ProcessStep_PropertyType


class LI_Source_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, description=None, scaleDenominator=None, sourceReferenceSystem=None, sourceCitation=None, sourceExtent=None, sourceStep=None):
        self.original_tagname_ = None
        super(LI_Source_Type, self).__init__(id, uuid, )
        self.description = description
        self.scaleDenominator = scaleDenominator
        self.sourceReferenceSystem = sourceReferenceSystem
        self.sourceCitation = sourceCitation
        if sourceExtent is None:
            self.sourceExtent = []
        else:
            self.sourceExtent = sourceExtent
        if sourceStep is None:
            self.sourceStep = []
        else:
            self.sourceStep = sourceStep
    def factory(*args_, **kwargs_):
        if LI_Source_Type.subclass:
            return LI_Source_Type.subclass(*args_, **kwargs_)
        else:
            return LI_Source_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_scaleDenominator(self): return self.scaleDenominator
    def set_scaleDenominator(self, scaleDenominator): self.scaleDenominator = scaleDenominator
    def get_sourceReferenceSystem(self): return self.sourceReferenceSystem
    def set_sourceReferenceSystem(self, sourceReferenceSystem): self.sourceReferenceSystem = sourceReferenceSystem
    def get_sourceCitation(self): return self.sourceCitation
    def set_sourceCitation(self, sourceCitation): self.sourceCitation = sourceCitation
    def get_sourceExtent(self): return self.sourceExtent
    def set_sourceExtent(self, sourceExtent): self.sourceExtent = sourceExtent
    def add_sourceExtent(self, value): self.sourceExtent.append(value)
    def insert_sourceExtent_at(self, index, value): self.sourceExtent.insert(index, value)
    def replace_sourceExtent_at(self, index, value): self.sourceExtent[index] = value
    def get_sourceStep(self): return self.sourceStep
    def set_sourceStep(self, sourceStep): self.sourceStep = sourceStep
    def add_sourceStep(self, value): self.sourceStep.append(value)
    def insert_sourceStep_at(self, index, value): self.sourceStep.insert(index, value)
    def replace_sourceStep_at(self, index, value): self.sourceStep[index] = value
    def hasContent_(self):
        if (
            self.description is not None or
            self.scaleDenominator is not None or
            self.sourceReferenceSystem is not None or
            self.sourceCitation is not None or
            self.sourceExtent or
            self.sourceStep or
            super(LI_Source_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LI_Source_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LI_Source_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LI_Source_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LI_Source_Type'):
        super(LI_Source_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LI_Source_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LI_Source_Type', fromsubclass_=False, pretty_print=True):
        super(LI_Source_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.description is not None:
            self.description.export(outfile, level, namespace_, name_='description', pretty_print=pretty_print)
        if self.scaleDenominator is not None:
            self.scaleDenominator.export(outfile, level, namespace_, name_='scaleDenominator', pretty_print=pretty_print)
        if self.sourceReferenceSystem is not None:
            self.sourceReferenceSystem.export(outfile, level, namespace_, name_='sourceReferenceSystem', pretty_print=pretty_print)
        if self.sourceCitation is not None:
            self.sourceCitation.export(outfile, level, namespace_, name_='sourceCitation', pretty_print=pretty_print)
        for sourceExtent_ in self.sourceExtent:
            sourceExtent_.export(outfile, level, namespace_, name_='sourceExtent', pretty_print=pretty_print)
        for sourceStep_ in self.sourceStep:
            sourceStep_.export(outfile, level, namespace_, name_='sourceStep', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LI_Source_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LI_Source_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LI_Source_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.scaleDenominator is not None:
            showIndent(outfile, level)
            outfile.write('scaleDenominator=model_.MD_RepresentativeFraction_PropertyType(\n')
            self.scaleDenominator.exportLiteral(outfile, level, name_='scaleDenominator')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.sourceReferenceSystem is not None:
            showIndent(outfile, level)
            outfile.write('sourceReferenceSystem=model_.MD_ReferenceSystem_PropertyType(\n')
            self.sourceReferenceSystem.exportLiteral(outfile, level, name_='sourceReferenceSystem')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.sourceCitation is not None:
            showIndent(outfile, level)
            outfile.write('sourceCitation=model_.CI_Citation_PropertyType(\n')
            self.sourceCitation.exportLiteral(outfile, level, name_='sourceCitation')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('sourceExtent=[\n')
        level += 1
        for sourceExtent_ in self.sourceExtent:
            showIndent(outfile, level)
            outfile.write('model_.EX_Extent_PropertyType(\n')
            sourceExtent_.exportLiteral(outfile, level, name_='EX_Extent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('sourceStep=[\n')
        level += 1
        for sourceStep_ in self.sourceStep:
            showIndent(outfile, level)
            outfile.write('model_.LI_ProcessStep_PropertyType(\n')
            sourceStep_.exportLiteral(outfile, level, name_='LI_ProcessStep_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LI_Source_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'scaleDenominator':
            obj_ = MD_RepresentativeFraction_PropertyType.factory()
            obj_.build(child_)
            self.scaleDenominator = obj_
            obj_.original_tagname_ = 'scaleDenominator'
        elif nodeName_ == 'sourceReferenceSystem':
            obj_ = MD_ReferenceSystem_PropertyType.factory()
            obj_.build(child_)
            self.sourceReferenceSystem = obj_
            obj_.original_tagname_ = 'sourceReferenceSystem'
        elif nodeName_ == 'sourceCitation':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.sourceCitation = obj_
            obj_.original_tagname_ = 'sourceCitation'
        elif nodeName_ == 'sourceExtent':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.sourceExtent.append(obj_)
            obj_.original_tagname_ = 'sourceExtent'
        elif nodeName_ == 'sourceStep':
            obj_ = LI_ProcessStep_PropertyType.factory()
            obj_.build(child_)
            self.sourceStep.append(obj_)
            obj_.original_tagname_ = 'sourceStep'
        super(LI_Source_Type, self).buildChildren(child_, node, nodeName_, True)
# end class LI_Source_Type


class LI_Source_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, LI_Source=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.LI_Source = LI_Source
    def factory(*args_, **kwargs_):
        if LI_Source_PropertyType.subclass:
            return LI_Source_PropertyType.subclass(*args_, **kwargs_)
        else:
            return LI_Source_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LI_Source(self): return self.LI_Source
    def set_LI_Source(self, LI_Source): self.LI_Source = LI_Source
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.LI_Source is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LI_Source_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LI_Source_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LI_Source_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LI_Source_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LI_Source_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LI_Source is not None:
            self.LI_Source.export(outfile, level, namespace_='gmd:', name_='LI_Source', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LI_Source_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LI_Source is not None:
            showIndent(outfile, level)
            outfile.write('LI_Source=model_.LI_Source(\n')
            self.LI_Source.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LI_Source':
            obj_ = LI_Source_Type.factory()
            obj_.build(child_)
            self.LI_Source = obj_
            obj_.original_tagname_ = 'LI_Source'
# end class LI_Source_PropertyType


class LI_Lineage_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, statement=None, processStep=None, source=None):
        self.original_tagname_ = None
        super(LI_Lineage_Type, self).__init__(id, uuid, )
        self.statement = statement
        if processStep is None:
            self.processStep = []
        else:
            self.processStep = processStep
        if source is None:
            self.source = []
        else:
            self.source = source
    def factory(*args_, **kwargs_):
        if LI_Lineage_Type.subclass:
            return LI_Lineage_Type.subclass(*args_, **kwargs_)
        else:
            return LI_Lineage_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_statement(self): return self.statement
    def set_statement(self, statement): self.statement = statement
    def get_processStep(self): return self.processStep
    def set_processStep(self, processStep): self.processStep = processStep
    def add_processStep(self, value): self.processStep.append(value)
    def insert_processStep_at(self, index, value): self.processStep.insert(index, value)
    def replace_processStep_at(self, index, value): self.processStep[index] = value
    def get_source(self): return self.source
    def set_source(self, source): self.source = source
    def add_source(self, value): self.source.append(value)
    def insert_source_at(self, index, value): self.source.insert(index, value)
    def replace_source_at(self, index, value): self.source[index] = value
    def hasContent_(self):
        if (
            self.statement is not None or
            self.processStep or
            self.source or
            super(LI_Lineage_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LI_Lineage_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LI_Lineage_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LI_Lineage_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LI_Lineage_Type'):
        super(LI_Lineage_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LI_Lineage_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LI_Lineage_Type', fromsubclass_=False, pretty_print=True):
        super(LI_Lineage_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.statement is not None:
            self.statement.export(outfile, level, namespace_, name_='statement', pretty_print=pretty_print)
        for processStep_ in self.processStep:
            processStep_.export(outfile, level, namespace_, name_='processStep', pretty_print=pretty_print)
        for source_ in self.source:
            source_.export(outfile, level, namespace_, name_='source', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LI_Lineage_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LI_Lineage_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LI_Lineage_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.statement is not None:
            showIndent(outfile, level)
            outfile.write('statement=model_.CharacterString_PropertyType(\n')
            self.statement.exportLiteral(outfile, level, name_='statement')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('processStep=[\n')
        level += 1
        for processStep_ in self.processStep:
            showIndent(outfile, level)
            outfile.write('model_.LI_ProcessStep_PropertyType(\n')
            processStep_.exportLiteral(outfile, level, name_='LI_ProcessStep_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('source=[\n')
        level += 1
        for source_ in self.source:
            showIndent(outfile, level)
            outfile.write('model_.LI_Source_PropertyType(\n')
            source_.exportLiteral(outfile, level, name_='LI_Source_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LI_Lineage_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'statement':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.statement = obj_
            obj_.original_tagname_ = 'statement'
        elif nodeName_ == 'processStep':
            obj_ = LI_ProcessStep_PropertyType.factory()
            obj_.build(child_)
            self.processStep.append(obj_)
            obj_.original_tagname_ = 'processStep'
        elif nodeName_ == 'source':
            obj_ = LI_Source_PropertyType.factory()
            obj_.build(child_)
            self.source.append(obj_)
            obj_.original_tagname_ = 'source'
        super(LI_Lineage_Type, self).buildChildren(child_, node, nodeName_, True)
# end class LI_Lineage_Type


class LI_Lineage_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, LI_Lineage=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.LI_Lineage = LI_Lineage
    def factory(*args_, **kwargs_):
        if LI_Lineage_PropertyType.subclass:
            return LI_Lineage_PropertyType.subclass(*args_, **kwargs_)
        else:
            return LI_Lineage_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LI_Lineage(self): return self.LI_Lineage
    def set_LI_Lineage(self, LI_Lineage): self.LI_Lineage = LI_Lineage
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.LI_Lineage is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LI_Lineage_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LI_Lineage_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LI_Lineage_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LI_Lineage_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LI_Lineage_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LI_Lineage is not None:
            self.LI_Lineage.export(outfile, level, namespace_='gmd:', name_='LI_Lineage', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LI_Lineage_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LI_Lineage is not None:
            showIndent(outfile, level)
            outfile.write('LI_Lineage=model_.LI_Lineage(\n')
            self.LI_Lineage.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LI_Lineage':
            obj_ = LI_Lineage_Type.factory()
            obj_.build(child_)
            self.LI_Lineage = obj_
            obj_.original_tagname_ = 'LI_Lineage'
# end class LI_Lineage_PropertyType


class DQ_ConformanceResult_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_ConformanceResult=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_ConformanceResult = DQ_ConformanceResult
    def factory(*args_, **kwargs_):
        if DQ_ConformanceResult_PropertyType.subclass:
            return DQ_ConformanceResult_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_ConformanceResult_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_ConformanceResult(self): return self.DQ_ConformanceResult
    def set_DQ_ConformanceResult(self, DQ_ConformanceResult): self.DQ_ConformanceResult = DQ_ConformanceResult
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_ConformanceResult is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ConformanceResult_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ConformanceResult_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ConformanceResult_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ConformanceResult_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ConformanceResult_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_ConformanceResult is not None:
            self.DQ_ConformanceResult.export(outfile, level, namespace_='gmd:', name_='DQ_ConformanceResult', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ConformanceResult_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_ConformanceResult is not None:
            showIndent(outfile, level)
            outfile.write('DQ_ConformanceResult=model_.DQ_ConformanceResult(\n')
            self.DQ_ConformanceResult.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_ConformanceResult':
            obj_ = DQ_ConformanceResult_Type.factory()
            obj_.build(child_)
            self.DQ_ConformanceResult = obj_
            obj_.original_tagname_ = 'DQ_ConformanceResult'
# end class DQ_ConformanceResult_PropertyType


class DQ_QuantitativeResult_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_QuantitativeResult=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_QuantitativeResult = DQ_QuantitativeResult
    def factory(*args_, **kwargs_):
        if DQ_QuantitativeResult_PropertyType.subclass:
            return DQ_QuantitativeResult_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_QuantitativeResult_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_QuantitativeResult(self): return self.DQ_QuantitativeResult
    def set_DQ_QuantitativeResult(self, DQ_QuantitativeResult): self.DQ_QuantitativeResult = DQ_QuantitativeResult
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_QuantitativeResult is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeResult_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_QuantitativeResult_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_QuantitativeResult_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_QuantitativeResult_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeResult_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_QuantitativeResult is not None:
            self.DQ_QuantitativeResult.export(outfile, level, namespace_='gmd:', name_='DQ_QuantitativeResult', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_QuantitativeResult_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_QuantitativeResult is not None:
            showIndent(outfile, level)
            outfile.write('DQ_QuantitativeResult=model_.DQ_QuantitativeResult(\n')
            self.DQ_QuantitativeResult.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_QuantitativeResult':
            obj_ = DQ_QuantitativeResult_Type.factory()
            obj_.build(child_)
            self.DQ_QuantitativeResult = obj_
            obj_.original_tagname_ = 'DQ_QuantitativeResult'
# end class DQ_QuantitativeResult_PropertyType


class AbstractDQ_Result_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_Result_Type, self).__init__(id, uuid, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_Result_Type.subclass:
            return AbstractDQ_Result_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_Result_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractDQ_Result_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_Result_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_Result_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_Result_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_Result_Type'):
        super(AbstractDQ_Result_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_Result_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_Result_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_Result_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='AbstractDQ_Result_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_Result_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_Result_Type, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_Result_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractDQ_Result_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractDQ_Result_Type


class DQ_Result_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_Result=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_Result = AbstractDQ_Result
    def factory(*args_, **kwargs_):
        if DQ_Result_PropertyType.subclass:
            return DQ_Result_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_Result_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_Result(self): return self.AbstractDQ_Result
    def set_AbstractDQ_Result(self, AbstractDQ_Result): self.AbstractDQ_Result = AbstractDQ_Result
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_Result is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_Result_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_Result_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_Result_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_Result_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_Result_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_Result is not None:
            self.AbstractDQ_Result.export(outfile, level, namespace_, name_='AbstractDQ_Result', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_Result_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_Result is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_Result=model_.AbstractDQ_Result(\n')
            self.AbstractDQ_Result.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_Result':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_Result> element')
            self.AbstractDQ_Result = obj_
            obj_.original_tagname_ = 'AbstractDQ_Result'
        elif nodeName_ == 'DQ_ConformanceResult':
            obj_ = DQ_ConformanceResult_Type.factory()
            obj_.build(child_)
            self.DQ_ConformanceResult = obj_
            obj_.original_tagname_ = 'DQ_ConformanceResult'
        elif nodeName_ == 'DQ_QuantitativeResult':
            obj_ = DQ_QuantitativeResult_Type.factory()
            obj_.build(child_)
            self.DQ_QuantitativeResult = obj_
            obj_.original_tagname_ = 'DQ_QuantitativeResult'
# end class DQ_Result_PropertyType


class DQ_TemporalValidity_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_TemporalValidity=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_TemporalValidity = DQ_TemporalValidity
    def factory(*args_, **kwargs_):
        if DQ_TemporalValidity_PropertyType.subclass:
            return DQ_TemporalValidity_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_TemporalValidity_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_TemporalValidity(self): return self.DQ_TemporalValidity
    def set_DQ_TemporalValidity(self, DQ_TemporalValidity): self.DQ_TemporalValidity = DQ_TemporalValidity
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_TemporalValidity is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TemporalValidity_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalValidity_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TemporalValidity_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TemporalValidity_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TemporalValidity_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_TemporalValidity is not None:
            self.DQ_TemporalValidity.export(outfile, level, namespace_='gmd:', name_='DQ_TemporalValidity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TemporalValidity_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_TemporalValidity is not None:
            showIndent(outfile, level)
            outfile.write('DQ_TemporalValidity=model_.DQ_TemporalValidity(\n')
            self.DQ_TemporalValidity.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_TemporalValidity':
            obj_ = DQ_TemporalValidity_Type.factory()
            obj_.build(child_)
            self.DQ_TemporalValidity = obj_
            obj_.original_tagname_ = 'DQ_TemporalValidity'
# end class DQ_TemporalValidity_PropertyType


class DQ_TemporalConsistency_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_TemporalConsistency=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_TemporalConsistency = DQ_TemporalConsistency
    def factory(*args_, **kwargs_):
        if DQ_TemporalConsistency_PropertyType.subclass:
            return DQ_TemporalConsistency_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_TemporalConsistency_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_TemporalConsistency(self): return self.DQ_TemporalConsistency
    def set_DQ_TemporalConsistency(self, DQ_TemporalConsistency): self.DQ_TemporalConsistency = DQ_TemporalConsistency
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_TemporalConsistency is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TemporalConsistency_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalConsistency_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TemporalConsistency_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TemporalConsistency_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TemporalConsistency_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_TemporalConsistency is not None:
            self.DQ_TemporalConsistency.export(outfile, level, namespace_='gmd:', name_='DQ_TemporalConsistency', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TemporalConsistency_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_TemporalConsistency is not None:
            showIndent(outfile, level)
            outfile.write('DQ_TemporalConsistency=model_.DQ_TemporalConsistency(\n')
            self.DQ_TemporalConsistency.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_TemporalConsistency':
            obj_ = DQ_TemporalConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_TemporalConsistency = obj_
            obj_.original_tagname_ = 'DQ_TemporalConsistency'
# end class DQ_TemporalConsistency_PropertyType


class DQ_AccuracyOfATimeMeasurement_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_AccuracyOfATimeMeasurement=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_AccuracyOfATimeMeasurement = DQ_AccuracyOfATimeMeasurement
    def factory(*args_, **kwargs_):
        if DQ_AccuracyOfATimeMeasurement_PropertyType.subclass:
            return DQ_AccuracyOfATimeMeasurement_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_AccuracyOfATimeMeasurement_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_AccuracyOfATimeMeasurement(self): return self.DQ_AccuracyOfATimeMeasurement
    def set_DQ_AccuracyOfATimeMeasurement(self, DQ_AccuracyOfATimeMeasurement): self.DQ_AccuracyOfATimeMeasurement = DQ_AccuracyOfATimeMeasurement
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_AccuracyOfATimeMeasurement is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_AccuracyOfATimeMeasurement_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_AccuracyOfATimeMeasurement is not None:
            self.DQ_AccuracyOfATimeMeasurement.export(outfile, level, namespace_='gmd:', name_='DQ_AccuracyOfATimeMeasurement', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_AccuracyOfATimeMeasurement_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_AccuracyOfATimeMeasurement is not None:
            showIndent(outfile, level)
            outfile.write('DQ_AccuracyOfATimeMeasurement=model_.DQ_AccuracyOfATimeMeasurement(\n')
            self.DQ_AccuracyOfATimeMeasurement.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_AccuracyOfATimeMeasurement':
            obj_ = DQ_AccuracyOfATimeMeasurement_Type.factory()
            obj_.build(child_)
            self.DQ_AccuracyOfATimeMeasurement = obj_
            obj_.original_tagname_ = 'DQ_AccuracyOfATimeMeasurement'
# end class DQ_AccuracyOfATimeMeasurement_PropertyType


class DQ_QuantitativeAttributeAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_QuantitativeAttributeAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_QuantitativeAttributeAccuracy = DQ_QuantitativeAttributeAccuracy
    def factory(*args_, **kwargs_):
        if DQ_QuantitativeAttributeAccuracy_PropertyType.subclass:
            return DQ_QuantitativeAttributeAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_QuantitativeAttributeAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_QuantitativeAttributeAccuracy(self): return self.DQ_QuantitativeAttributeAccuracy
    def set_DQ_QuantitativeAttributeAccuracy(self, DQ_QuantitativeAttributeAccuracy): self.DQ_QuantitativeAttributeAccuracy = DQ_QuantitativeAttributeAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_QuantitativeAttributeAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_QuantitativeAttributeAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_QuantitativeAttributeAccuracy is not None:
            self.DQ_QuantitativeAttributeAccuracy.export(outfile, level, namespace_='gmd:', name_='DQ_QuantitativeAttributeAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_QuantitativeAttributeAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_QuantitativeAttributeAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('DQ_QuantitativeAttributeAccuracy=model_.DQ_QuantitativeAttributeAccuracy(\n')
            self.DQ_QuantitativeAttributeAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_QuantitativeAttributeAccuracy':
            obj_ = DQ_QuantitativeAttributeAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_QuantitativeAttributeAccuracy = obj_
            obj_.original_tagname_ = 'DQ_QuantitativeAttributeAccuracy'
# end class DQ_QuantitativeAttributeAccuracy_PropertyType


class DQ_NonQuantitativeAttributeAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_NonQuantitativeAttributeAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_NonQuantitativeAttributeAccuracy = DQ_NonQuantitativeAttributeAccuracy
    def factory(*args_, **kwargs_):
        if DQ_NonQuantitativeAttributeAccuracy_PropertyType.subclass:
            return DQ_NonQuantitativeAttributeAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_NonQuantitativeAttributeAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_NonQuantitativeAttributeAccuracy(self): return self.DQ_NonQuantitativeAttributeAccuracy
    def set_DQ_NonQuantitativeAttributeAccuracy(self, DQ_NonQuantitativeAttributeAccuracy): self.DQ_NonQuantitativeAttributeAccuracy = DQ_NonQuantitativeAttributeAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_NonQuantitativeAttributeAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_NonQuantitativeAttributeAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_NonQuantitativeAttributeAccuracy is not None:
            self.DQ_NonQuantitativeAttributeAccuracy.export(outfile, level, namespace_='gmd:', name_='DQ_NonQuantitativeAttributeAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_NonQuantitativeAttributeAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_NonQuantitativeAttributeAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('DQ_NonQuantitativeAttributeAccuracy=model_.DQ_NonQuantitativeAttributeAccuracy(\n')
            self.DQ_NonQuantitativeAttributeAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_NonQuantitativeAttributeAccuracy':
            obj_ = DQ_NonQuantitativeAttributeAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_NonQuantitativeAttributeAccuracy = obj_
            obj_.original_tagname_ = 'DQ_NonQuantitativeAttributeAccuracy'
# end class DQ_NonQuantitativeAttributeAccuracy_PropertyType


class DQ_ThematicClassificationCorrectness_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_ThematicClassificationCorrectness=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_ThematicClassificationCorrectness = DQ_ThematicClassificationCorrectness
    def factory(*args_, **kwargs_):
        if DQ_ThematicClassificationCorrectness_PropertyType.subclass:
            return DQ_ThematicClassificationCorrectness_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_ThematicClassificationCorrectness_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_ThematicClassificationCorrectness(self): return self.DQ_ThematicClassificationCorrectness
    def set_DQ_ThematicClassificationCorrectness(self, DQ_ThematicClassificationCorrectness): self.DQ_ThematicClassificationCorrectness = DQ_ThematicClassificationCorrectness
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_ThematicClassificationCorrectness is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ThematicClassificationCorrectness_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_ThematicClassificationCorrectness is not None:
            self.DQ_ThematicClassificationCorrectness.export(outfile, level, namespace_='gmd:', name_='DQ_ThematicClassificationCorrectness', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ThematicClassificationCorrectness_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_ThematicClassificationCorrectness is not None:
            showIndent(outfile, level)
            outfile.write('DQ_ThematicClassificationCorrectness=model_.DQ_ThematicClassificationCorrectness(\n')
            self.DQ_ThematicClassificationCorrectness.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_ThematicClassificationCorrectness':
            obj_ = DQ_ThematicClassificationCorrectness_Type.factory()
            obj_.build(child_)
            self.DQ_ThematicClassificationCorrectness = obj_
            obj_.original_tagname_ = 'DQ_ThematicClassificationCorrectness'
# end class DQ_ThematicClassificationCorrectness_PropertyType


class DQ_RelativeInternalPositionalAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_RelativeInternalPositionalAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_RelativeInternalPositionalAccuracy = DQ_RelativeInternalPositionalAccuracy
    def factory(*args_, **kwargs_):
        if DQ_RelativeInternalPositionalAccuracy_PropertyType.subclass:
            return DQ_RelativeInternalPositionalAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_RelativeInternalPositionalAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_RelativeInternalPositionalAccuracy(self): return self.DQ_RelativeInternalPositionalAccuracy
    def set_DQ_RelativeInternalPositionalAccuracy(self, DQ_RelativeInternalPositionalAccuracy): self.DQ_RelativeInternalPositionalAccuracy = DQ_RelativeInternalPositionalAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_RelativeInternalPositionalAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_RelativeInternalPositionalAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_RelativeInternalPositionalAccuracy is not None:
            self.DQ_RelativeInternalPositionalAccuracy.export(outfile, level, namespace_='gmd:', name_='DQ_RelativeInternalPositionalAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_RelativeInternalPositionalAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_RelativeInternalPositionalAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('DQ_RelativeInternalPositionalAccuracy=model_.DQ_RelativeInternalPositionalAccuracy(\n')
            self.DQ_RelativeInternalPositionalAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_RelativeInternalPositionalAccuracy':
            obj_ = DQ_RelativeInternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_RelativeInternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_RelativeInternalPositionalAccuracy'
# end class DQ_RelativeInternalPositionalAccuracy_PropertyType


class DQ_GriddedDataPositionalAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_GriddedDataPositionalAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_GriddedDataPositionalAccuracy = DQ_GriddedDataPositionalAccuracy
    def factory(*args_, **kwargs_):
        if DQ_GriddedDataPositionalAccuracy_PropertyType.subclass:
            return DQ_GriddedDataPositionalAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_GriddedDataPositionalAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_GriddedDataPositionalAccuracy(self): return self.DQ_GriddedDataPositionalAccuracy
    def set_DQ_GriddedDataPositionalAccuracy(self, DQ_GriddedDataPositionalAccuracy): self.DQ_GriddedDataPositionalAccuracy = DQ_GriddedDataPositionalAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_GriddedDataPositionalAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_GriddedDataPositionalAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_GriddedDataPositionalAccuracy is not None:
            self.DQ_GriddedDataPositionalAccuracy.export(outfile, level, namespace_='gmd:', name_='DQ_GriddedDataPositionalAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_GriddedDataPositionalAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_GriddedDataPositionalAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('DQ_GriddedDataPositionalAccuracy=model_.DQ_GriddedDataPositionalAccuracy(\n')
            self.DQ_GriddedDataPositionalAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_GriddedDataPositionalAccuracy':
            obj_ = DQ_GriddedDataPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_GriddedDataPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_GriddedDataPositionalAccuracy'
# end class DQ_GriddedDataPositionalAccuracy_PropertyType


class DQ_AbsoluteExternalPositionalAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_AbsoluteExternalPositionalAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_AbsoluteExternalPositionalAccuracy = DQ_AbsoluteExternalPositionalAccuracy
    def factory(*args_, **kwargs_):
        if DQ_AbsoluteExternalPositionalAccuracy_PropertyType.subclass:
            return DQ_AbsoluteExternalPositionalAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_AbsoluteExternalPositionalAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_AbsoluteExternalPositionalAccuracy(self): return self.DQ_AbsoluteExternalPositionalAccuracy
    def set_DQ_AbsoluteExternalPositionalAccuracy(self, DQ_AbsoluteExternalPositionalAccuracy): self.DQ_AbsoluteExternalPositionalAccuracy = DQ_AbsoluteExternalPositionalAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_AbsoluteExternalPositionalAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_AbsoluteExternalPositionalAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_AbsoluteExternalPositionalAccuracy is not None:
            self.DQ_AbsoluteExternalPositionalAccuracy.export(outfile, level, namespace_='gmd:', name_='DQ_AbsoluteExternalPositionalAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_AbsoluteExternalPositionalAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_AbsoluteExternalPositionalAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('DQ_AbsoluteExternalPositionalAccuracy=model_.DQ_AbsoluteExternalPositionalAccuracy(\n')
            self.DQ_AbsoluteExternalPositionalAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_AbsoluteExternalPositionalAccuracy':
            obj_ = DQ_AbsoluteExternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_AbsoluteExternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_AbsoluteExternalPositionalAccuracy'
# end class DQ_AbsoluteExternalPositionalAccuracy_PropertyType


class DQ_TopologicalConsistency_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_TopologicalConsistency=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_TopologicalConsistency = DQ_TopologicalConsistency
    def factory(*args_, **kwargs_):
        if DQ_TopologicalConsistency_PropertyType.subclass:
            return DQ_TopologicalConsistency_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_TopologicalConsistency_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_TopologicalConsistency(self): return self.DQ_TopologicalConsistency
    def set_DQ_TopologicalConsistency(self, DQ_TopologicalConsistency): self.DQ_TopologicalConsistency = DQ_TopologicalConsistency
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_TopologicalConsistency is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TopologicalConsistency_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TopologicalConsistency_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TopologicalConsistency_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TopologicalConsistency_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TopologicalConsistency_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_TopologicalConsistency is not None:
            self.DQ_TopologicalConsistency.export(outfile, level, namespace_='gmd:', name_='DQ_TopologicalConsistency', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TopologicalConsistency_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_TopologicalConsistency is not None:
            showIndent(outfile, level)
            outfile.write('DQ_TopologicalConsistency=model_.DQ_TopologicalConsistency(\n')
            self.DQ_TopologicalConsistency.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_TopologicalConsistency':
            obj_ = DQ_TopologicalConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_TopologicalConsistency = obj_
            obj_.original_tagname_ = 'DQ_TopologicalConsistency'
# end class DQ_TopologicalConsistency_PropertyType


class DQ_FormatConsistency_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_FormatConsistency=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_FormatConsistency = DQ_FormatConsistency
    def factory(*args_, **kwargs_):
        if DQ_FormatConsistency_PropertyType.subclass:
            return DQ_FormatConsistency_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_FormatConsistency_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_FormatConsistency(self): return self.DQ_FormatConsistency
    def set_DQ_FormatConsistency(self, DQ_FormatConsistency): self.DQ_FormatConsistency = DQ_FormatConsistency
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_FormatConsistency is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_FormatConsistency_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_FormatConsistency_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_FormatConsistency_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_FormatConsistency_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_FormatConsistency_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_FormatConsistency is not None:
            self.DQ_FormatConsistency.export(outfile, level, namespace_='gmd:', name_='DQ_FormatConsistency', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_FormatConsistency_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_FormatConsistency is not None:
            showIndent(outfile, level)
            outfile.write('DQ_FormatConsistency=model_.DQ_FormatConsistency(\n')
            self.DQ_FormatConsistency.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_FormatConsistency':
            obj_ = DQ_FormatConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_FormatConsistency = obj_
            obj_.original_tagname_ = 'DQ_FormatConsistency'
# end class DQ_FormatConsistency_PropertyType


class DQ_DomainConsistency_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_DomainConsistency=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_DomainConsistency = DQ_DomainConsistency
    def factory(*args_, **kwargs_):
        if DQ_DomainConsistency_PropertyType.subclass:
            return DQ_DomainConsistency_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_DomainConsistency_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_DomainConsistency(self): return self.DQ_DomainConsistency
    def set_DQ_DomainConsistency(self, DQ_DomainConsistency): self.DQ_DomainConsistency = DQ_DomainConsistency
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_DomainConsistency is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_DomainConsistency_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_DomainConsistency_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_DomainConsistency_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_DomainConsistency_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_DomainConsistency_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_DomainConsistency is not None:
            self.DQ_DomainConsistency.export(outfile, level, namespace_='gmd:', name_='DQ_DomainConsistency', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_DomainConsistency_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_DomainConsistency is not None:
            showIndent(outfile, level)
            outfile.write('DQ_DomainConsistency=model_.DQ_DomainConsistency(\n')
            self.DQ_DomainConsistency.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_DomainConsistency':
            obj_ = DQ_DomainConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_DomainConsistency = obj_
            obj_.original_tagname_ = 'DQ_DomainConsistency'
# end class DQ_DomainConsistency_PropertyType


class DQ_ConceptualConsistency_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_ConceptualConsistency=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_ConceptualConsistency = DQ_ConceptualConsistency
    def factory(*args_, **kwargs_):
        if DQ_ConceptualConsistency_PropertyType.subclass:
            return DQ_ConceptualConsistency_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_ConceptualConsistency_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_ConceptualConsistency(self): return self.DQ_ConceptualConsistency
    def set_DQ_ConceptualConsistency(self, DQ_ConceptualConsistency): self.DQ_ConceptualConsistency = DQ_ConceptualConsistency
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_ConceptualConsistency is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ConceptualConsistency_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ConceptualConsistency_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ConceptualConsistency_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ConceptualConsistency_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ConceptualConsistency_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_ConceptualConsistency is not None:
            self.DQ_ConceptualConsistency.export(outfile, level, namespace_='gmd:', name_='DQ_ConceptualConsistency', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ConceptualConsistency_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_ConceptualConsistency is not None:
            showIndent(outfile, level)
            outfile.write('DQ_ConceptualConsistency=model_.DQ_ConceptualConsistency(\n')
            self.DQ_ConceptualConsistency.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_ConceptualConsistency':
            obj_ = DQ_ConceptualConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_ConceptualConsistency = obj_
            obj_.original_tagname_ = 'DQ_ConceptualConsistency'
# end class DQ_ConceptualConsistency_PropertyType


class DQ_CompletenessOmission_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_CompletenessOmission=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_CompletenessOmission = DQ_CompletenessOmission
    def factory(*args_, **kwargs_):
        if DQ_CompletenessOmission_PropertyType.subclass:
            return DQ_CompletenessOmission_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_CompletenessOmission_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_CompletenessOmission(self): return self.DQ_CompletenessOmission
    def set_DQ_CompletenessOmission(self, DQ_CompletenessOmission): self.DQ_CompletenessOmission = DQ_CompletenessOmission
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_CompletenessOmission is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessOmission_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_CompletenessOmission_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_CompletenessOmission_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_CompletenessOmission_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessOmission_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_CompletenessOmission is not None:
            self.DQ_CompletenessOmission.export(outfile, level, namespace_='gmd:', name_='DQ_CompletenessOmission', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_CompletenessOmission_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_CompletenessOmission is not None:
            showIndent(outfile, level)
            outfile.write('DQ_CompletenessOmission=model_.DQ_CompletenessOmission(\n')
            self.DQ_CompletenessOmission.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_CompletenessOmission':
            obj_ = DQ_CompletenessOmission_Type.factory()
            obj_.build(child_)
            self.DQ_CompletenessOmission = obj_
            obj_.original_tagname_ = 'DQ_CompletenessOmission'
# end class DQ_CompletenessOmission_PropertyType


class DQ_CompletenessCommission_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_CompletenessCommission=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_CompletenessCommission = DQ_CompletenessCommission
    def factory(*args_, **kwargs_):
        if DQ_CompletenessCommission_PropertyType.subclass:
            return DQ_CompletenessCommission_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_CompletenessCommission_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_CompletenessCommission(self): return self.DQ_CompletenessCommission
    def set_DQ_CompletenessCommission(self, DQ_CompletenessCommission): self.DQ_CompletenessCommission = DQ_CompletenessCommission
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_CompletenessCommission is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessCommission_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_CompletenessCommission_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_CompletenessCommission_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_CompletenessCommission_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessCommission_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_CompletenessCommission is not None:
            self.DQ_CompletenessCommission.export(outfile, level, namespace_='gmd:', name_='DQ_CompletenessCommission', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_CompletenessCommission_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_CompletenessCommission is not None:
            showIndent(outfile, level)
            outfile.write('DQ_CompletenessCommission=model_.DQ_CompletenessCommission(\n')
            self.DQ_CompletenessCommission.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_CompletenessCommission':
            obj_ = DQ_CompletenessCommission_Type.factory()
            obj_.build(child_)
            self.DQ_CompletenessCommission = obj_
            obj_.original_tagname_ = 'DQ_CompletenessCommission'
# end class DQ_CompletenessCommission_PropertyType


class DQ_TemporalAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_TemporalAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_TemporalAccuracy = AbstractDQ_TemporalAccuracy
    def factory(*args_, **kwargs_):
        if DQ_TemporalAccuracy_PropertyType.subclass:
            return DQ_TemporalAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_TemporalAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_TemporalAccuracy(self): return self.AbstractDQ_TemporalAccuracy
    def set_AbstractDQ_TemporalAccuracy(self, AbstractDQ_TemporalAccuracy): self.AbstractDQ_TemporalAccuracy = AbstractDQ_TemporalAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_TemporalAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TemporalAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TemporalAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TemporalAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TemporalAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_TemporalAccuracy is not None:
            self.AbstractDQ_TemporalAccuracy.export(outfile, level, namespace_, name_='AbstractDQ_TemporalAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TemporalAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_TemporalAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_TemporalAccuracy=model_.AbstractDQ_TemporalAccuracy(\n')
            self.AbstractDQ_TemporalAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_TemporalAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_TemporalAccuracy> element')
            self.AbstractDQ_TemporalAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_TemporalAccuracy'
        elif nodeName_ == 'DQ_TemporalValidity':
            obj_ = DQ_TemporalValidity_Type.factory()
            obj_.build(child_)
            self.DQ_TemporalValidity = obj_
            obj_.original_tagname_ = 'DQ_TemporalValidity'
        elif nodeName_ == 'DQ_TemporalConsistency':
            obj_ = DQ_TemporalConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_TemporalConsistency = obj_
            obj_.original_tagname_ = 'DQ_TemporalConsistency'
        elif nodeName_ == 'DQ_AccuracyOfATimeMeasurement':
            obj_ = DQ_AccuracyOfATimeMeasurement_Type.factory()
            obj_.build(child_)
            self.DQ_AccuracyOfATimeMeasurement = obj_
            obj_.original_tagname_ = 'DQ_AccuracyOfATimeMeasurement'
# end class DQ_TemporalAccuracy_PropertyType


class DQ_ThematicAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_ThematicAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_ThematicAccuracy = AbstractDQ_ThematicAccuracy
    def factory(*args_, **kwargs_):
        if DQ_ThematicAccuracy_PropertyType.subclass:
            return DQ_ThematicAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_ThematicAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_ThematicAccuracy(self): return self.AbstractDQ_ThematicAccuracy
    def set_AbstractDQ_ThematicAccuracy(self, AbstractDQ_ThematicAccuracy): self.AbstractDQ_ThematicAccuracy = AbstractDQ_ThematicAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_ThematicAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ThematicAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ThematicAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ThematicAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ThematicAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ThematicAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_ThematicAccuracy is not None:
            self.AbstractDQ_ThematicAccuracy.export(outfile, level, namespace_, name_='AbstractDQ_ThematicAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ThematicAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_ThematicAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_ThematicAccuracy=model_.AbstractDQ_ThematicAccuracy(\n')
            self.AbstractDQ_ThematicAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_ThematicAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_ThematicAccuracy> element')
            self.AbstractDQ_ThematicAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_ThematicAccuracy'
        elif nodeName_ == 'DQ_QuantitativeAttributeAccuracy':
            obj_ = DQ_QuantitativeAttributeAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_QuantitativeAttributeAccuracy = obj_
            obj_.original_tagname_ = 'DQ_QuantitativeAttributeAccuracy'
        elif nodeName_ == 'DQ_NonQuantitativeAttributeAccuracy':
            obj_ = DQ_NonQuantitativeAttributeAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_NonQuantitativeAttributeAccuracy = obj_
            obj_.original_tagname_ = 'DQ_NonQuantitativeAttributeAccuracy'
        elif nodeName_ == 'DQ_ThematicClassificationCorrectness':
            obj_ = DQ_ThematicClassificationCorrectness_Type.factory()
            obj_.build(child_)
            self.DQ_ThematicClassificationCorrectness = obj_
            obj_.original_tagname_ = 'DQ_ThematicClassificationCorrectness'
# end class DQ_ThematicAccuracy_PropertyType


class DQ_PositionalAccuracy_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_PositionalAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_PositionalAccuracy = AbstractDQ_PositionalAccuracy
    def factory(*args_, **kwargs_):
        if DQ_PositionalAccuracy_PropertyType.subclass:
            return DQ_PositionalAccuracy_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_PositionalAccuracy_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_PositionalAccuracy(self): return self.AbstractDQ_PositionalAccuracy
    def set_AbstractDQ_PositionalAccuracy(self, AbstractDQ_PositionalAccuracy): self.AbstractDQ_PositionalAccuracy = AbstractDQ_PositionalAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_PositionalAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_PositionalAccuracy_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_PositionalAccuracy_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_PositionalAccuracy_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_PositionalAccuracy_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_PositionalAccuracy_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_PositionalAccuracy is not None:
            self.AbstractDQ_PositionalAccuracy.export(outfile, level, namespace_, name_='AbstractDQ_PositionalAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_PositionalAccuracy_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_PositionalAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_PositionalAccuracy=model_.AbstractDQ_PositionalAccuracy(\n')
            self.AbstractDQ_PositionalAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_PositionalAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_PositionalAccuracy> element')
            self.AbstractDQ_PositionalAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_PositionalAccuracy'
        elif nodeName_ == 'DQ_RelativeInternalPositionalAccuracy':
            obj_ = DQ_RelativeInternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_RelativeInternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_RelativeInternalPositionalAccuracy'
        elif nodeName_ == 'DQ_GriddedDataPositionalAccuracy':
            obj_ = DQ_GriddedDataPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_GriddedDataPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_GriddedDataPositionalAccuracy'
        elif nodeName_ == 'DQ_AbsoluteExternalPositionalAccuracy':
            obj_ = DQ_AbsoluteExternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_AbsoluteExternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_AbsoluteExternalPositionalAccuracy'
# end class DQ_PositionalAccuracy_PropertyType


class DQ_LogicalConsistency_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_LogicalConsistency=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_LogicalConsistency = AbstractDQ_LogicalConsistency
    def factory(*args_, **kwargs_):
        if DQ_LogicalConsistency_PropertyType.subclass:
            return DQ_LogicalConsistency_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_LogicalConsistency_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_LogicalConsistency(self): return self.AbstractDQ_LogicalConsistency
    def set_AbstractDQ_LogicalConsistency(self, AbstractDQ_LogicalConsistency): self.AbstractDQ_LogicalConsistency = AbstractDQ_LogicalConsistency
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_LogicalConsistency is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_LogicalConsistency_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_LogicalConsistency_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_LogicalConsistency_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_LogicalConsistency_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_LogicalConsistency_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_LogicalConsistency is not None:
            self.AbstractDQ_LogicalConsistency.export(outfile, level, namespace_, name_='AbstractDQ_LogicalConsistency', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_LogicalConsistency_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_LogicalConsistency is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_LogicalConsistency=model_.AbstractDQ_LogicalConsistency(\n')
            self.AbstractDQ_LogicalConsistency.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_LogicalConsistency':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_LogicalConsistency> element')
            self.AbstractDQ_LogicalConsistency = obj_
            obj_.original_tagname_ = 'AbstractDQ_LogicalConsistency'
        elif nodeName_ == 'DQ_TopologicalConsistency':
            obj_ = DQ_TopologicalConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_TopologicalConsistency = obj_
            obj_.original_tagname_ = 'DQ_TopologicalConsistency'
        elif nodeName_ == 'DQ_FormatConsistency':
            obj_ = DQ_FormatConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_FormatConsistency = obj_
            obj_.original_tagname_ = 'DQ_FormatConsistency'
        elif nodeName_ == 'DQ_DomainConsistency':
            obj_ = DQ_DomainConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_DomainConsistency = obj_
            obj_.original_tagname_ = 'DQ_DomainConsistency'
        elif nodeName_ == 'DQ_ConceptualConsistency':
            obj_ = DQ_ConceptualConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_ConceptualConsistency = obj_
            obj_.original_tagname_ = 'DQ_ConceptualConsistency'
# end class DQ_LogicalConsistency_PropertyType


class DQ_Completeness_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_Completeness=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_Completeness = AbstractDQ_Completeness
    def factory(*args_, **kwargs_):
        if DQ_Completeness_PropertyType.subclass:
            return DQ_Completeness_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_Completeness_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_Completeness(self): return self.AbstractDQ_Completeness
    def set_AbstractDQ_Completeness(self, AbstractDQ_Completeness): self.AbstractDQ_Completeness = AbstractDQ_Completeness
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_Completeness is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_Completeness_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_Completeness_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_Completeness_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_Completeness_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_Completeness_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_Completeness is not None:
            self.AbstractDQ_Completeness.export(outfile, level, namespace_, name_='AbstractDQ_Completeness', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_Completeness_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_Completeness is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_Completeness=model_.AbstractDQ_Completeness(\n')
            self.AbstractDQ_Completeness.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_Completeness':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_Completeness> element')
            self.AbstractDQ_Completeness = obj_
            obj_.original_tagname_ = 'AbstractDQ_Completeness'
        elif nodeName_ == 'DQ_CompletenessOmission':
            obj_ = DQ_CompletenessOmission_Type.factory()
            obj_.build(child_)
            self.DQ_CompletenessOmission = obj_
            obj_.original_tagname_ = 'DQ_CompletenessOmission'
        elif nodeName_ == 'DQ_CompletenessCommission':
            obj_ = DQ_CompletenessCommission_Type.factory()
            obj_.build(child_)
            self.DQ_CompletenessCommission = obj_
            obj_.original_tagname_ = 'DQ_CompletenessCommission'
# end class DQ_Completeness_PropertyType


class AbstractDQ_Element_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_Element_Type, self).__init__(id, uuid, extensiontype_, )
        if nameOfMeasure is None:
            self.nameOfMeasure = []
        else:
            self.nameOfMeasure = nameOfMeasure
        self.measureIdentification = measureIdentification
        self.measureDescription = measureDescription
        self.evaluationMethodType = evaluationMethodType
        self.evaluationMethodDescription = evaluationMethodDescription
        self.evaluationProcedure = evaluationProcedure
        if dateTime is None:
            self.dateTime = []
        else:
            self.dateTime = dateTime
        if result is None:
            self.result = []
        else:
            self.result = result
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_Element_Type.subclass:
            return AbstractDQ_Element_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_Element_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nameOfMeasure(self): return self.nameOfMeasure
    def set_nameOfMeasure(self, nameOfMeasure): self.nameOfMeasure = nameOfMeasure
    def add_nameOfMeasure(self, value): self.nameOfMeasure.append(value)
    def insert_nameOfMeasure_at(self, index, value): self.nameOfMeasure.insert(index, value)
    def replace_nameOfMeasure_at(self, index, value): self.nameOfMeasure[index] = value
    def get_measureIdentification(self): return self.measureIdentification
    def set_measureIdentification(self, measureIdentification): self.measureIdentification = measureIdentification
    def get_measureDescription(self): return self.measureDescription
    def set_measureDescription(self, measureDescription): self.measureDescription = measureDescription
    def get_evaluationMethodType(self): return self.evaluationMethodType
    def set_evaluationMethodType(self, evaluationMethodType): self.evaluationMethodType = evaluationMethodType
    def get_evaluationMethodDescription(self): return self.evaluationMethodDescription
    def set_evaluationMethodDescription(self, evaluationMethodDescription): self.evaluationMethodDescription = evaluationMethodDescription
    def get_evaluationProcedure(self): return self.evaluationProcedure
    def set_evaluationProcedure(self, evaluationProcedure): self.evaluationProcedure = evaluationProcedure
    def get_dateTime(self): return self.dateTime
    def set_dateTime(self, dateTime): self.dateTime = dateTime
    def add_dateTime(self, value): self.dateTime.append(value)
    def insert_dateTime_at(self, index, value): self.dateTime.insert(index, value)
    def replace_dateTime_at(self, index, value): self.dateTime[index] = value
    def get_result(self): return self.result
    def set_result(self, result): self.result = result
    def add_result(self, value): self.result.append(value)
    def insert_result_at(self, index, value): self.result.insert(index, value)
    def replace_result_at(self, index, value): self.result[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.nameOfMeasure or
            self.measureIdentification is not None or
            self.measureDescription is not None or
            self.evaluationMethodType is not None or
            self.evaluationMethodDescription is not None or
            self.evaluationProcedure is not None or
            self.dateTime or
            self.result or
            super(AbstractDQ_Element_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_Element_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_Element_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_Element_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_Element_Type'):
        super(AbstractDQ_Element_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_Element_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_Element_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_Element_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for nameOfMeasure_ in self.nameOfMeasure:
            nameOfMeasure_.export(outfile, level, namespace_, name_='nameOfMeasure', pretty_print=pretty_print)
        if self.measureIdentification is not None:
            self.measureIdentification.export(outfile, level, namespace_, name_='measureIdentification', pretty_print=pretty_print)
        if self.measureDescription is not None:
            self.measureDescription.export(outfile, level, namespace_, name_='measureDescription', pretty_print=pretty_print)
        if self.evaluationMethodType is not None:
            self.evaluationMethodType.export(outfile, level, namespace_, name_='evaluationMethodType', pretty_print=pretty_print)
        if self.evaluationMethodDescription is not None:
            self.evaluationMethodDescription.export(outfile, level, namespace_, name_='evaluationMethodDescription', pretty_print=pretty_print)
        if self.evaluationProcedure is not None:
            self.evaluationProcedure.export(outfile, level, namespace_, name_='evaluationProcedure', pretty_print=pretty_print)
        for dateTime_ in self.dateTime:
            dateTime_.export(outfile, level, namespace_, name_='dateTime', pretty_print=pretty_print)
        for result_ in self.result:
            result_.export(outfile, level, namespace_, name_='result', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDQ_Element_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_Element_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_Element_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('nameOfMeasure=[\n')
        level += 1
        for nameOfMeasure_ in self.nameOfMeasure:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            nameOfMeasure_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.measureIdentification is not None:
            showIndent(outfile, level)
            outfile.write('measureIdentification=model_.MD_Identifier_PropertyType(\n')
            self.measureIdentification.exportLiteral(outfile, level, name_='measureIdentification')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.measureDescription is not None:
            showIndent(outfile, level)
            outfile.write('measureDescription=model_.CharacterString_PropertyType(\n')
            self.measureDescription.exportLiteral(outfile, level, name_='measureDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.evaluationMethodType is not None:
            showIndent(outfile, level)
            outfile.write('evaluationMethodType=model_.DQ_EvaluationMethodTypeCode_PropertyType(\n')
            self.evaluationMethodType.exportLiteral(outfile, level, name_='evaluationMethodType')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.evaluationMethodDescription is not None:
            showIndent(outfile, level)
            outfile.write('evaluationMethodDescription=model_.CharacterString_PropertyType(\n')
            self.evaluationMethodDescription.exportLiteral(outfile, level, name_='evaluationMethodDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.evaluationProcedure is not None:
            showIndent(outfile, level)
            outfile.write('evaluationProcedure=model_.CI_Citation_PropertyType(\n')
            self.evaluationProcedure.exportLiteral(outfile, level, name_='evaluationProcedure')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('dateTime=[\n')
        level += 1
        for dateTime_ in self.dateTime:
            showIndent(outfile, level)
            outfile.write('model_.DateTime_PropertyType(\n')
            dateTime_.exportLiteral(outfile, level, name_='DateTime_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('result=[\n')
        level += 1
        for result_ in self.result:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Result_PropertyType(\n')
            result_.exportLiteral(outfile, level, name_='DQ_Result_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_Element_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'nameOfMeasure':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.nameOfMeasure.append(obj_)
            obj_.original_tagname_ = 'nameOfMeasure'
        elif nodeName_ == 'measureIdentification':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.measureIdentification = obj_
            obj_.original_tagname_ = 'measureIdentification'
        elif nodeName_ == 'measureDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.measureDescription = obj_
            obj_.original_tagname_ = 'measureDescription'
        elif nodeName_ == 'evaluationMethodType':
            obj_ = DQ_EvaluationMethodTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.evaluationMethodType = obj_
            obj_.original_tagname_ = 'evaluationMethodType'
        elif nodeName_ == 'evaluationMethodDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.evaluationMethodDescription = obj_
            obj_.original_tagname_ = 'evaluationMethodDescription'
        elif nodeName_ == 'evaluationProcedure':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.evaluationProcedure = obj_
            obj_.original_tagname_ = 'evaluationProcedure'
        elif nodeName_ == 'dateTime':
            obj_ = DateTime_PropertyType.factory()
            obj_.build(child_)
            self.dateTime.append(obj_)
            obj_.original_tagname_ = 'dateTime'
        elif nodeName_ == 'result':
            obj_ = DQ_Result_PropertyType.factory()
            obj_.build(child_)
            self.result.append(obj_)
            obj_.original_tagname_ = 'result'
        super(AbstractDQ_Element_Type, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractDQ_Element_Type


class DQ_Element_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractDQ_Element=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_Element = AbstractDQ_Element
    def factory(*args_, **kwargs_):
        if DQ_Element_PropertyType.subclass:
            return DQ_Element_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_Element_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_Element(self): return self.AbstractDQ_Element
    def set_AbstractDQ_Element(self, AbstractDQ_Element): self.AbstractDQ_Element = AbstractDQ_Element
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_Element is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_Element_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_Element_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_Element_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_Element_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_Element_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_Element is not None:
            self.AbstractDQ_Element.export(outfile, level, namespace_, name_='AbstractDQ_Element', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_Element_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_Element is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_Element=model_.AbstractDQ_Element(\n')
            self.AbstractDQ_Element.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_Element':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_Element> element')
            self.AbstractDQ_Element = obj_
            obj_.original_tagname_ = 'AbstractDQ_Element'
        elif nodeName_ == 'AbstractDQ_TemporalAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_TemporalAccuracy> element')
            self.AbstractDQ_TemporalAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_TemporalAccuracy'
        elif nodeName_ == 'AbstractDQ_ThematicAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_ThematicAccuracy> element')
            self.AbstractDQ_ThematicAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_ThematicAccuracy'
        elif nodeName_ == 'AbstractDQ_PositionalAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_PositionalAccuracy> element')
            self.AbstractDQ_PositionalAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_PositionalAccuracy'
        elif nodeName_ == 'AbstractDQ_LogicalConsistency':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_LogicalConsistency> element')
            self.AbstractDQ_LogicalConsistency = obj_
            obj_.original_tagname_ = 'AbstractDQ_LogicalConsistency'
        elif nodeName_ == 'AbstractDQ_Completeness':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_Completeness> element')
            self.AbstractDQ_Completeness = obj_
            obj_.original_tagname_ = 'AbstractDQ_Completeness'
        elif nodeName_ == 'DQ_TemporalValidity':
            obj_ = DQ_TemporalValidity_Type.factory()
            obj_.build(child_)
            self.DQ_TemporalValidity = obj_
            obj_.original_tagname_ = 'DQ_TemporalValidity'
        elif nodeName_ == 'DQ_TemporalConsistency':
            obj_ = DQ_TemporalConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_TemporalConsistency = obj_
            obj_.original_tagname_ = 'DQ_TemporalConsistency'
        elif nodeName_ == 'DQ_AccuracyOfATimeMeasurement':
            obj_ = DQ_AccuracyOfATimeMeasurement_Type.factory()
            obj_.build(child_)
            self.DQ_AccuracyOfATimeMeasurement = obj_
            obj_.original_tagname_ = 'DQ_AccuracyOfATimeMeasurement'
        elif nodeName_ == 'DQ_QuantitativeAttributeAccuracy':
            obj_ = DQ_QuantitativeAttributeAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_QuantitativeAttributeAccuracy = obj_
            obj_.original_tagname_ = 'DQ_QuantitativeAttributeAccuracy'
        elif nodeName_ == 'DQ_NonQuantitativeAttributeAccuracy':
            obj_ = DQ_NonQuantitativeAttributeAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_NonQuantitativeAttributeAccuracy = obj_
            obj_.original_tagname_ = 'DQ_NonQuantitativeAttributeAccuracy'
        elif nodeName_ == 'DQ_ThematicClassificationCorrectness':
            obj_ = DQ_ThematicClassificationCorrectness_Type.factory()
            obj_.build(child_)
            self.DQ_ThematicClassificationCorrectness = obj_
            obj_.original_tagname_ = 'DQ_ThematicClassificationCorrectness'
        elif nodeName_ == 'DQ_RelativeInternalPositionalAccuracy':
            obj_ = DQ_RelativeInternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_RelativeInternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_RelativeInternalPositionalAccuracy'
        elif nodeName_ == 'DQ_GriddedDataPositionalAccuracy':
            obj_ = DQ_GriddedDataPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_GriddedDataPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_GriddedDataPositionalAccuracy'
        elif nodeName_ == 'DQ_AbsoluteExternalPositionalAccuracy':
            obj_ = DQ_AbsoluteExternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_AbsoluteExternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_AbsoluteExternalPositionalAccuracy'
        elif nodeName_ == 'DQ_TopologicalConsistency':
            obj_ = DQ_TopologicalConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_TopologicalConsistency = obj_
            obj_.original_tagname_ = 'DQ_TopologicalConsistency'
        elif nodeName_ == 'DQ_FormatConsistency':
            obj_ = DQ_FormatConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_FormatConsistency = obj_
            obj_.original_tagname_ = 'DQ_FormatConsistency'
        elif nodeName_ == 'DQ_DomainConsistency':
            obj_ = DQ_DomainConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_DomainConsistency = obj_
            obj_.original_tagname_ = 'DQ_DomainConsistency'
        elif nodeName_ == 'DQ_ConceptualConsistency':
            obj_ = DQ_ConceptualConsistency_Type.factory()
            obj_.build(child_)
            self.DQ_ConceptualConsistency = obj_
            obj_.original_tagname_ = 'DQ_ConceptualConsistency'
        elif nodeName_ == 'DQ_CompletenessOmission':
            obj_ = DQ_CompletenessOmission_Type.factory()
            obj_.build(child_)
            self.DQ_CompletenessOmission = obj_
            obj_.original_tagname_ = 'DQ_CompletenessOmission'
        elif nodeName_ == 'DQ_CompletenessCommission':
            obj_ = DQ_CompletenessCommission_Type.factory()
            obj_.build(child_)
            self.DQ_CompletenessCommission = obj_
            obj_.original_tagname_ = 'DQ_CompletenessCommission'
# end class DQ_Element_PropertyType


class DQ_DataQuality_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, scope=None, report=None, lineage=None):
        self.original_tagname_ = None
        super(DQ_DataQuality_Type, self).__init__(id, uuid, )
        self.scope = scope
        if report is None:
            self.report = []
        else:
            self.report = report
        self.lineage = lineage
    def factory(*args_, **kwargs_):
        if DQ_DataQuality_Type.subclass:
            return DQ_DataQuality_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_DataQuality_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def get_report(self): return self.report
    def set_report(self, report): self.report = report
    def add_report(self, value): self.report.append(value)
    def insert_report_at(self, index, value): self.report.insert(index, value)
    def replace_report_at(self, index, value): self.report[index] = value
    def get_lineage(self): return self.lineage
    def set_lineage(self, lineage): self.lineage = lineage
    def hasContent_(self):
        if (
            self.scope is not None or
            self.report or
            self.lineage is not None or
            super(DQ_DataQuality_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_DataQuality_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_DataQuality_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_DataQuality_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_DataQuality_Type'):
        super(DQ_DataQuality_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_DataQuality_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_DataQuality_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_DataQuality_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.scope is not None:
            self.scope.export(outfile, level, namespace_, name_='scope', pretty_print=pretty_print)
        for report_ in self.report:
            report_.export(outfile, level, namespace_, name_='report', pretty_print=pretty_print)
        if self.lineage is not None:
            self.lineage.export(outfile, level, namespace_, name_='lineage', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_DataQuality_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_DataQuality_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_DataQuality_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.scope is not None:
            showIndent(outfile, level)
            outfile.write('scope=model_.DQ_Scope_PropertyType(\n')
            self.scope.exportLiteral(outfile, level, name_='scope')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('report=[\n')
        level += 1
        for report_ in self.report:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Element_PropertyType(\n')
            report_.exportLiteral(outfile, level, name_='DQ_Element_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.lineage is not None:
            showIndent(outfile, level)
            outfile.write('lineage=model_.LI_Lineage_PropertyType(\n')
            self.lineage.exportLiteral(outfile, level, name_='lineage')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_DataQuality_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'scope':
            obj_ = DQ_Scope_PropertyType.factory()
            obj_.build(child_)
            self.scope = obj_
            obj_.original_tagname_ = 'scope'
        elif nodeName_ == 'report':
            obj_ = DQ_Element_PropertyType.factory()
            obj_.build(child_)
            self.report.append(obj_)
            obj_.original_tagname_ = 'report'
        elif nodeName_ == 'lineage':
            obj_ = LI_Lineage_PropertyType.factory()
            obj_.build(child_)
            self.lineage = obj_
            obj_.original_tagname_ = 'lineage'
        super(DQ_DataQuality_Type, self).buildChildren(child_, node, nodeName_, True)
# end class DQ_DataQuality_Type


class DQ_DataQuality_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_DataQuality=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_DataQuality = DQ_DataQuality
    def factory(*args_, **kwargs_):
        if DQ_DataQuality_PropertyType.subclass:
            return DQ_DataQuality_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_DataQuality_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_DataQuality(self): return self.DQ_DataQuality
    def set_DQ_DataQuality(self, DQ_DataQuality): self.DQ_DataQuality = DQ_DataQuality
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_DataQuality is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_DataQuality_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_DataQuality_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_DataQuality_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_DataQuality_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_DataQuality_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_DataQuality is not None:
            self.DQ_DataQuality.export(outfile, level, namespace_='gmd:', name_='DQ_DataQuality', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_DataQuality_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_DataQuality is not None:
            showIndent(outfile, level)
            outfile.write('DQ_DataQuality=model_.DQ_DataQuality(\n')
            self.DQ_DataQuality.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_DataQuality':
            obj_ = DQ_DataQuality_Type.factory()
            obj_.build(child_)
            self.DQ_DataQuality = obj_
            obj_.original_tagname_ = 'DQ_DataQuality'
# end class DQ_DataQuality_PropertyType


class DQ_Scope_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, level=None, extent=None, levelDescription=None):
        self.original_tagname_ = None
        super(DQ_Scope_Type, self).__init__(id, uuid, )
        self.level = level
        self.extent = extent
        if levelDescription is None:
            self.levelDescription = []
        else:
            self.levelDescription = levelDescription
    def factory(*args_, **kwargs_):
        if DQ_Scope_Type.subclass:
            return DQ_Scope_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_Scope_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_level(self): return self.level
    def set_level(self, level): self.level = level
    def get_extent(self): return self.extent
    def set_extent(self, extent): self.extent = extent
    def get_levelDescription(self): return self.levelDescription
    def set_levelDescription(self, levelDescription): self.levelDescription = levelDescription
    def add_levelDescription(self, value): self.levelDescription.append(value)
    def insert_levelDescription_at(self, index, value): self.levelDescription.insert(index, value)
    def replace_levelDescription_at(self, index, value): self.levelDescription[index] = value
    def hasContent_(self):
        if (
            self.level is not None or
            self.extent is not None or
            self.levelDescription or
            super(DQ_Scope_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_Scope_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_Scope_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_Scope_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_Scope_Type'):
        super(DQ_Scope_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_Scope_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_Scope_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_Scope_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.level is not None:
            self.level.export(outfile, level, namespace_, name_='level', pretty_print=pretty_print)
        if self.extent is not None:
            self.extent.export(outfile, level, namespace_, name_='extent', pretty_print=pretty_print)
        for levelDescription_ in self.levelDescription:
            levelDescription_.export(outfile, level, namespace_, name_='levelDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_Scope_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_Scope_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_Scope_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.level is not None:
            showIndent(outfile, level)
            outfile.write('level=model_.MD_ScopeCode_PropertyType(\n')
            self.level.exportLiteral(outfile, level, name_='level')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.extent is not None:
            showIndent(outfile, level)
            outfile.write('extent=model_.EX_Extent_PropertyType(\n')
            self.extent.exportLiteral(outfile, level, name_='extent')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('levelDescription=[\n')
        level += 1
        for levelDescription_ in self.levelDescription:
            showIndent(outfile, level)
            outfile.write('model_.MD_ScopeDescription_PropertyType(\n')
            levelDescription_.exportLiteral(outfile, level, name_='MD_ScopeDescription_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_Scope_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'level':
            obj_ = MD_ScopeCode_PropertyType.factory()
            obj_.build(child_)
            self.level = obj_
            obj_.original_tagname_ = 'level'
        elif nodeName_ == 'extent':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.extent = obj_
            obj_.original_tagname_ = 'extent'
        elif nodeName_ == 'levelDescription':
            obj_ = MD_ScopeDescription_PropertyType.factory()
            obj_.build(child_)
            self.levelDescription.append(obj_)
            obj_.original_tagname_ = 'levelDescription'
        super(DQ_Scope_Type, self).buildChildren(child_, node, nodeName_, True)
# end class DQ_Scope_Type


class DQ_Scope_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DQ_Scope=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DQ_Scope = DQ_Scope
    def factory(*args_, **kwargs_):
        if DQ_Scope_PropertyType.subclass:
            return DQ_Scope_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_Scope_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_Scope(self): return self.DQ_Scope
    def set_DQ_Scope(self, DQ_Scope): self.DQ_Scope = DQ_Scope
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DQ_Scope is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_Scope_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_Scope_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_Scope_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_Scope_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_Scope_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_Scope is not None:
            self.DQ_Scope.export(outfile, level, namespace_='gmd:', name_='DQ_Scope', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_Scope_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_Scope is not None:
            showIndent(outfile, level)
            outfile.write('DQ_Scope=model_.DQ_Scope(\n')
            self.DQ_Scope.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_Scope':
            obj_ = DQ_Scope_Type.factory()
            obj_.build(child_)
            self.DQ_Scope = obj_
            obj_.original_tagname_ = 'DQ_Scope'
# end class DQ_Scope_PropertyType


class DQ_EvaluationMethodTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, DQ_EvaluationMethodTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.DQ_EvaluationMethodTypeCode = DQ_EvaluationMethodTypeCode
    def factory(*args_, **kwargs_):
        if DQ_EvaluationMethodTypeCode_PropertyType.subclass:
            return DQ_EvaluationMethodTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DQ_EvaluationMethodTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DQ_EvaluationMethodTypeCode(self): return self.DQ_EvaluationMethodTypeCode
    def set_DQ_EvaluationMethodTypeCode(self, DQ_EvaluationMethodTypeCode): self.DQ_EvaluationMethodTypeCode = DQ_EvaluationMethodTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.DQ_EvaluationMethodTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_EvaluationMethodTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_EvaluationMethodTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_EvaluationMethodTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_EvaluationMethodTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_EvaluationMethodTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DQ_EvaluationMethodTypeCode is not None:
            self.DQ_EvaluationMethodTypeCode.export(outfile, level, namespace_='gmd:', name_='DQ_EvaluationMethodTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_EvaluationMethodTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DQ_EvaluationMethodTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('DQ_EvaluationMethodTypeCode=model_.DQ_EvaluationMethodTypeCode(\n')
            self.DQ_EvaluationMethodTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DQ_EvaluationMethodTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.DQ_EvaluationMethodTypeCode = obj_
            obj_.original_tagname_ = 'DQ_EvaluationMethodTypeCode'
# end class DQ_EvaluationMethodTypeCode_PropertyType


class AbstractMD_Identification_Type(AbstractObject_Type):
    """Basic information about data"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, citation=None, abstract=None, purpose=None, credit=None, status=None, pointOfContact=None, resourceMaintenance=None, graphicOverview=None, resourceFormat=None, descriptiveKeywords=None, resourceSpecificUsage=None, resourceConstraints=None, aggregationInfo=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractMD_Identification_Type, self).__init__(id, uuid, extensiontype_, )
        self.citation = citation
        self.abstract = abstract
        self.purpose = purpose
        if credit is None:
            self.credit = []
        else:
            self.credit = credit
        if status is None:
            self.status = []
        else:
            self.status = status
        if pointOfContact is None:
            self.pointOfContact = []
        else:
            self.pointOfContact = pointOfContact
        if resourceMaintenance is None:
            self.resourceMaintenance = []
        else:
            self.resourceMaintenance = resourceMaintenance
        if graphicOverview is None:
            self.graphicOverview = []
        else:
            self.graphicOverview = graphicOverview
        if resourceFormat is None:
            self.resourceFormat = []
        else:
            self.resourceFormat = resourceFormat
        if descriptiveKeywords is None:
            self.descriptiveKeywords = []
        else:
            self.descriptiveKeywords = descriptiveKeywords
        if resourceSpecificUsage is None:
            self.resourceSpecificUsage = []
        else:
            self.resourceSpecificUsage = resourceSpecificUsage
        if resourceConstraints is None:
            self.resourceConstraints = []
        else:
            self.resourceConstraints = resourceConstraints
        if aggregationInfo is None:
            self.aggregationInfo = []
        else:
            self.aggregationInfo = aggregationInfo
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractMD_Identification_Type.subclass:
            return AbstractMD_Identification_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractMD_Identification_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_citation(self): return self.citation
    def set_citation(self, citation): self.citation = citation
    def get_abstract(self): return self.abstract
    def set_abstract(self, abstract): self.abstract = abstract
    def get_purpose(self): return self.purpose
    def set_purpose(self, purpose): self.purpose = purpose
    def get_credit(self): return self.credit
    def set_credit(self, credit): self.credit = credit
    def add_credit(self, value): self.credit.append(value)
    def insert_credit_at(self, index, value): self.credit.insert(index, value)
    def replace_credit_at(self, index, value): self.credit[index] = value
    def get_status(self): return self.status
    def set_status(self, status): self.status = status
    def add_status(self, value): self.status.append(value)
    def insert_status_at(self, index, value): self.status.insert(index, value)
    def replace_status_at(self, index, value): self.status[index] = value
    def get_pointOfContact(self): return self.pointOfContact
    def set_pointOfContact(self, pointOfContact): self.pointOfContact = pointOfContact
    def add_pointOfContact(self, value): self.pointOfContact.append(value)
    def insert_pointOfContact_at(self, index, value): self.pointOfContact.insert(index, value)
    def replace_pointOfContact_at(self, index, value): self.pointOfContact[index] = value
    def get_resourceMaintenance(self): return self.resourceMaintenance
    def set_resourceMaintenance(self, resourceMaintenance): self.resourceMaintenance = resourceMaintenance
    def add_resourceMaintenance(self, value): self.resourceMaintenance.append(value)
    def insert_resourceMaintenance_at(self, index, value): self.resourceMaintenance.insert(index, value)
    def replace_resourceMaintenance_at(self, index, value): self.resourceMaintenance[index] = value
    def get_graphicOverview(self): return self.graphicOverview
    def set_graphicOverview(self, graphicOverview): self.graphicOverview = graphicOverview
    def add_graphicOverview(self, value): self.graphicOverview.append(value)
    def insert_graphicOverview_at(self, index, value): self.graphicOverview.insert(index, value)
    def replace_graphicOverview_at(self, index, value): self.graphicOverview[index] = value
    def get_resourceFormat(self): return self.resourceFormat
    def set_resourceFormat(self, resourceFormat): self.resourceFormat = resourceFormat
    def add_resourceFormat(self, value): self.resourceFormat.append(value)
    def insert_resourceFormat_at(self, index, value): self.resourceFormat.insert(index, value)
    def replace_resourceFormat_at(self, index, value): self.resourceFormat[index] = value
    def get_descriptiveKeywords(self): return self.descriptiveKeywords
    def set_descriptiveKeywords(self, descriptiveKeywords): self.descriptiveKeywords = descriptiveKeywords
    def add_descriptiveKeywords(self, value): self.descriptiveKeywords.append(value)
    def insert_descriptiveKeywords_at(self, index, value): self.descriptiveKeywords.insert(index, value)
    def replace_descriptiveKeywords_at(self, index, value): self.descriptiveKeywords[index] = value
    def get_resourceSpecificUsage(self): return self.resourceSpecificUsage
    def set_resourceSpecificUsage(self, resourceSpecificUsage): self.resourceSpecificUsage = resourceSpecificUsage
    def add_resourceSpecificUsage(self, value): self.resourceSpecificUsage.append(value)
    def insert_resourceSpecificUsage_at(self, index, value): self.resourceSpecificUsage.insert(index, value)
    def replace_resourceSpecificUsage_at(self, index, value): self.resourceSpecificUsage[index] = value
    def get_resourceConstraints(self): return self.resourceConstraints
    def set_resourceConstraints(self, resourceConstraints): self.resourceConstraints = resourceConstraints
    def add_resourceConstraints(self, value): self.resourceConstraints.append(value)
    def insert_resourceConstraints_at(self, index, value): self.resourceConstraints.insert(index, value)
    def replace_resourceConstraints_at(self, index, value): self.resourceConstraints[index] = value
    def get_aggregationInfo(self): return self.aggregationInfo
    def set_aggregationInfo(self, aggregationInfo): self.aggregationInfo = aggregationInfo
    def add_aggregationInfo(self, value): self.aggregationInfo.append(value)
    def insert_aggregationInfo_at(self, index, value): self.aggregationInfo.insert(index, value)
    def replace_aggregationInfo_at(self, index, value): self.aggregationInfo[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.citation is not None or
            self.abstract is not None or
            self.purpose is not None or
            self.credit or
            self.status or
            self.pointOfContact or
            self.resourceMaintenance or
            self.graphicOverview or
            self.resourceFormat or
            self.descriptiveKeywords or
            self.resourceSpecificUsage or
            self.resourceConstraints or
            self.aggregationInfo or
            super(AbstractMD_Identification_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractMD_Identification_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMD_Identification_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractMD_Identification_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractMD_Identification_Type'):
        super(AbstractMD_Identification_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMD_Identification_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractMD_Identification_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractMD_Identification_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.citation is not None:
            self.citation.export(outfile, level, namespace_, name_='citation', pretty_print=pretty_print)
        if self.abstract is not None:
            self.abstract.export(outfile, level, namespace_, name_='abstract', pretty_print=pretty_print)
        if self.purpose is not None:
            self.purpose.export(outfile, level, namespace_, name_='purpose', pretty_print=pretty_print)
        for credit_ in self.credit:
            credit_.export(outfile, level, namespace_, name_='credit', pretty_print=pretty_print)
        for status_ in self.status:
            status_.export(outfile, level, namespace_, name_='status', pretty_print=pretty_print)
        for pointOfContact_ in self.pointOfContact:
            pointOfContact_.export(outfile, level, namespace_, name_='pointOfContact', pretty_print=pretty_print)
        for resourceMaintenance_ in self.resourceMaintenance:
            resourceMaintenance_.export(outfile, level, namespace_, name_='resourceMaintenance', pretty_print=pretty_print)
        for graphicOverview_ in self.graphicOverview:
            graphicOverview_.export(outfile, level, namespace_, name_='graphicOverview', pretty_print=pretty_print)
        for resourceFormat_ in self.resourceFormat:
            resourceFormat_.export(outfile, level, namespace_, name_='resourceFormat', pretty_print=pretty_print)
        for descriptiveKeywords_ in self.descriptiveKeywords:
            descriptiveKeywords_.export(outfile, level, namespace_, name_='descriptiveKeywords', pretty_print=pretty_print)
        for resourceSpecificUsage_ in self.resourceSpecificUsage:
            resourceSpecificUsage_.export(outfile, level, namespace_, name_='resourceSpecificUsage', pretty_print=pretty_print)
        for resourceConstraints_ in self.resourceConstraints:
            resourceConstraints_.export(outfile, level, namespace_, name_='resourceConstraints', pretty_print=pretty_print)
        for aggregationInfo_ in self.aggregationInfo:
            aggregationInfo_.export(outfile, level, namespace_, name_='aggregationInfo', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractMD_Identification_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractMD_Identification_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractMD_Identification_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.citation is not None:
            showIndent(outfile, level)
            outfile.write('citation=model_.CI_Citation_PropertyType(\n')
            self.citation.exportLiteral(outfile, level, name_='citation')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.abstract is not None:
            showIndent(outfile, level)
            outfile.write('abstract=model_.CharacterString_PropertyType(\n')
            self.abstract.exportLiteral(outfile, level, name_='abstract')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.purpose is not None:
            showIndent(outfile, level)
            outfile.write('purpose=model_.CharacterString_PropertyType(\n')
            self.purpose.exportLiteral(outfile, level, name_='purpose')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('credit=[\n')
        level += 1
        for credit_ in self.credit:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            credit_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('status=[\n')
        level += 1
        for status_ in self.status:
            showIndent(outfile, level)
            outfile.write('model_.MD_ProgressCode_PropertyType(\n')
            status_.exportLiteral(outfile, level, name_='MD_ProgressCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointOfContact=[\n')
        level += 1
        for pointOfContact_ in self.pointOfContact:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            pointOfContact_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('resourceMaintenance=[\n')
        level += 1
        for resourceMaintenance_ in self.resourceMaintenance:
            showIndent(outfile, level)
            outfile.write('model_.MD_MaintenanceInformation_PropertyType(\n')
            resourceMaintenance_.exportLiteral(outfile, level, name_='MD_MaintenanceInformation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('graphicOverview=[\n')
        level += 1
        for graphicOverview_ in self.graphicOverview:
            showIndent(outfile, level)
            outfile.write('model_.MD_BrowseGraphic_PropertyType(\n')
            graphicOverview_.exportLiteral(outfile, level, name_='MD_BrowseGraphic_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('resourceFormat=[\n')
        level += 1
        for resourceFormat_ in self.resourceFormat:
            showIndent(outfile, level)
            outfile.write('model_.MD_Format_PropertyType(\n')
            resourceFormat_.exportLiteral(outfile, level, name_='MD_Format_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('descriptiveKeywords=[\n')
        level += 1
        for descriptiveKeywords_ in self.descriptiveKeywords:
            showIndent(outfile, level)
            outfile.write('model_.MD_Keywords_PropertyType(\n')
            descriptiveKeywords_.exportLiteral(outfile, level, name_='MD_Keywords_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('resourceSpecificUsage=[\n')
        level += 1
        for resourceSpecificUsage_ in self.resourceSpecificUsage:
            showIndent(outfile, level)
            outfile.write('model_.MD_Usage_PropertyType(\n')
            resourceSpecificUsage_.exportLiteral(outfile, level, name_='MD_Usage_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('resourceConstraints=[\n')
        level += 1
        for resourceConstraints_ in self.resourceConstraints:
            showIndent(outfile, level)
            outfile.write('model_.MD_Constraints_PropertyType(\n')
            resourceConstraints_.exportLiteral(outfile, level, name_='MD_Constraints_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('aggregationInfo=[\n')
        level += 1
        for aggregationInfo_ in self.aggregationInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_AggregateInformation_PropertyType(\n')
            aggregationInfo_.exportLiteral(outfile, level, name_='MD_AggregateInformation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractMD_Identification_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'citation':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.citation = obj_
            obj_.original_tagname_ = 'citation'
        elif nodeName_ == 'abstract':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.abstract = obj_
            obj_.original_tagname_ = 'abstract'
        elif nodeName_ == 'purpose':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.purpose = obj_
            obj_.original_tagname_ = 'purpose'
        elif nodeName_ == 'credit':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.credit.append(obj_)
            obj_.original_tagname_ = 'credit'
        elif nodeName_ == 'status':
            obj_ = MD_ProgressCode_PropertyType.factory()
            obj_.build(child_)
            self.status.append(obj_)
            obj_.original_tagname_ = 'status'
        elif nodeName_ == 'pointOfContact':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.pointOfContact.append(obj_)
            obj_.original_tagname_ = 'pointOfContact'
        elif nodeName_ == 'resourceMaintenance':
            obj_ = MD_MaintenanceInformation_PropertyType.factory()
            obj_.build(child_)
            self.resourceMaintenance.append(obj_)
            obj_.original_tagname_ = 'resourceMaintenance'
        elif nodeName_ == 'graphicOverview':
            obj_ = MD_BrowseGraphic_PropertyType.factory()
            obj_.build(child_)
            self.graphicOverview.append(obj_)
            obj_.original_tagname_ = 'graphicOverview'
        elif nodeName_ == 'resourceFormat':
            obj_ = MD_Format_PropertyType.factory()
            obj_.build(child_)
            self.resourceFormat.append(obj_)
            obj_.original_tagname_ = 'resourceFormat'
        elif nodeName_ == 'descriptiveKeywords':
            obj_ = MD_Keywords_PropertyType.factory()
            obj_.build(child_)
            self.descriptiveKeywords.append(obj_)
            obj_.original_tagname_ = 'descriptiveKeywords'
        elif nodeName_ == 'resourceSpecificUsage':
            obj_ = MD_Usage_PropertyType.factory()
            obj_.build(child_)
            self.resourceSpecificUsage.append(obj_)
            obj_.original_tagname_ = 'resourceSpecificUsage'
        elif nodeName_ == 'resourceConstraints':
            obj_ = MD_Constraints_PropertyType.factory()
            obj_.build(child_)
            self.resourceConstraints.append(obj_)
            obj_.original_tagname_ = 'resourceConstraints'
        elif nodeName_ == 'aggregationInfo':
            obj_ = MD_AggregateInformation_PropertyType.factory()
            obj_.build(child_)
            self.aggregationInfo.append(obj_)
            obj_.original_tagname_ = 'aggregationInfo'
        super(AbstractMD_Identification_Type, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractMD_Identification_Type


class MD_Identification_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, AbstractMD_Identification=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.AbstractMD_Identification = AbstractMD_Identification
    def factory(*args_, **kwargs_):
        if MD_Identification_PropertyType.subclass:
            return MD_Identification_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Identification_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractMD_Identification(self): return self.AbstractMD_Identification
    def set_AbstractMD_Identification(self, AbstractMD_Identification): self.AbstractMD_Identification = AbstractMD_Identification
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractMD_Identification is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Identification_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Identification_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Identification_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Identification_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Identification_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractMD_Identification is not None:
            self.AbstractMD_Identification.export(outfile, level, namespace_, name_='AbstractMD_Identification', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Identification_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractMD_Identification is not None:
            showIndent(outfile, level)
            outfile.write('AbstractMD_Identification=model_.AbstractMD_Identification(\n')
            self.AbstractMD_Identification.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractMD_Identification':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractMD_Identification> element')
            self.AbstractMD_Identification = obj_
            obj_.original_tagname_ = 'AbstractMD_Identification'
        elif nodeName_ == 'MD_DataIdentification':
            obj_ = MD_DataIdentification_Type.factory()
            obj_.build(child_)
            self.MD_DataIdentification = obj_
            obj_.original_tagname_ = 'MD_DataIdentification'
        elif nodeName_ == 'MD_ServiceIdentification':
            obj_ = MD_ServiceIdentification_Type.factory()
            obj_.build(child_)
            self.MD_ServiceIdentification = obj_
            obj_.original_tagname_ = 'MD_ServiceIdentification'
# end class MD_Identification_PropertyType


class MD_BrowseGraphic_Type(AbstractObject_Type):
    """Graphic that provides an illustration of the dataset (should include
    a legend for the graphic)"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, fileName=None, fileDescription=None, fileType=None):
        self.original_tagname_ = None
        super(MD_BrowseGraphic_Type, self).__init__(id, uuid, )
        self.fileName = fileName
        self.fileDescription = fileDescription
        self.fileType = fileType
    def factory(*args_, **kwargs_):
        if MD_BrowseGraphic_Type.subclass:
            return MD_BrowseGraphic_Type.subclass(*args_, **kwargs_)
        else:
            return MD_BrowseGraphic_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_fileName(self): return self.fileName
    def set_fileName(self, fileName): self.fileName = fileName
    def get_fileDescription(self): return self.fileDescription
    def set_fileDescription(self, fileDescription): self.fileDescription = fileDescription
    def get_fileType(self): return self.fileType
    def set_fileType(self, fileType): self.fileType = fileType
    def hasContent_(self):
        if (
            self.fileName is not None or
            self.fileDescription is not None or
            self.fileType is not None or
            super(MD_BrowseGraphic_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_BrowseGraphic_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_BrowseGraphic_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_BrowseGraphic_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_BrowseGraphic_Type'):
        super(MD_BrowseGraphic_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_BrowseGraphic_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_BrowseGraphic_Type', fromsubclass_=False, pretty_print=True):
        super(MD_BrowseGraphic_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.fileName is not None:
            self.fileName.export(outfile, level, namespace_, name_='fileName', pretty_print=pretty_print)
        if self.fileDescription is not None:
            self.fileDescription.export(outfile, level, namespace_, name_='fileDescription', pretty_print=pretty_print)
        if self.fileType is not None:
            self.fileType.export(outfile, level, namespace_, name_='fileType', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_BrowseGraphic_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_BrowseGraphic_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_BrowseGraphic_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.fileName is not None:
            showIndent(outfile, level)
            outfile.write('fileName=model_.CharacterString_PropertyType(\n')
            self.fileName.exportLiteral(outfile, level, name_='fileName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.fileDescription is not None:
            showIndent(outfile, level)
            outfile.write('fileDescription=model_.CharacterString_PropertyType(\n')
            self.fileDescription.exportLiteral(outfile, level, name_='fileDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.fileType is not None:
            showIndent(outfile, level)
            outfile.write('fileType=model_.CharacterString_PropertyType(\n')
            self.fileType.exportLiteral(outfile, level, name_='fileType')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_BrowseGraphic_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'fileName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fileName = obj_
            obj_.original_tagname_ = 'fileName'
        elif nodeName_ == 'fileDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fileDescription = obj_
            obj_.original_tagname_ = 'fileDescription'
        elif nodeName_ == 'fileType':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fileType = obj_
            obj_.original_tagname_ = 'fileType'
        super(MD_BrowseGraphic_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_BrowseGraphic_Type


class MD_BrowseGraphic_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_BrowseGraphic=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_BrowseGraphic = MD_BrowseGraphic
    def factory(*args_, **kwargs_):
        if MD_BrowseGraphic_PropertyType.subclass:
            return MD_BrowseGraphic_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_BrowseGraphic_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_BrowseGraphic(self): return self.MD_BrowseGraphic
    def set_MD_BrowseGraphic(self, MD_BrowseGraphic): self.MD_BrowseGraphic = MD_BrowseGraphic
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_BrowseGraphic is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_BrowseGraphic_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_BrowseGraphic_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_BrowseGraphic_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_BrowseGraphic_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_BrowseGraphic_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_BrowseGraphic is not None:
            self.MD_BrowseGraphic.export(outfile, level, namespace_='gmd:', name_='MD_BrowseGraphic', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_BrowseGraphic_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_BrowseGraphic is not None:
            showIndent(outfile, level)
            outfile.write('MD_BrowseGraphic=model_.MD_BrowseGraphic(\n')
            self.MD_BrowseGraphic.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_BrowseGraphic':
            obj_ = MD_BrowseGraphic_Type.factory()
            obj_.build(child_)
            self.MD_BrowseGraphic = obj_
            obj_.original_tagname_ = 'MD_BrowseGraphic'
# end class MD_BrowseGraphic_PropertyType


class MD_DataIdentification_Type(AbstractMD_Identification_Type):
    subclass = None
    superclass = AbstractMD_Identification_Type
    def __init__(self, id=None, uuid=None, citation=None, abstract=None, purpose=None, credit=None, status=None, pointOfContact=None, resourceMaintenance=None, graphicOverview=None, resourceFormat=None, descriptiveKeywords=None, resourceSpecificUsage=None, resourceConstraints=None, aggregationInfo=None, spatialRepresentationType=None, spatialResolution=None, language=None, characterSet=None, topicCategory=None, environmentDescription=None, extent=None, supplementalInformation=None):
        self.original_tagname_ = None
        super(MD_DataIdentification_Type, self).__init__(id, uuid, citation, abstract, purpose, credit, status, pointOfContact, resourceMaintenance, graphicOverview, resourceFormat, descriptiveKeywords, resourceSpecificUsage, resourceConstraints, aggregationInfo, )
        if spatialRepresentationType is None:
            self.spatialRepresentationType = []
        else:
            self.spatialRepresentationType = spatialRepresentationType
        if spatialResolution is None:
            self.spatialResolution = []
        else:
            self.spatialResolution = spatialResolution
        if language is None:
            self.language = []
        else:
            self.language = language
        if characterSet is None:
            self.characterSet = []
        else:
            self.characterSet = characterSet
        if topicCategory is None:
            self.topicCategory = []
        else:
            self.topicCategory = topicCategory
        self.environmentDescription = environmentDescription
        if extent is None:
            self.extent = []
        else:
            self.extent = extent
        self.supplementalInformation = supplementalInformation
    def factory(*args_, **kwargs_):
        if MD_DataIdentification_Type.subclass:
            return MD_DataIdentification_Type.subclass(*args_, **kwargs_)
        else:
            return MD_DataIdentification_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_spatialRepresentationType(self): return self.spatialRepresentationType
    def set_spatialRepresentationType(self, spatialRepresentationType): self.spatialRepresentationType = spatialRepresentationType
    def add_spatialRepresentationType(self, value): self.spatialRepresentationType.append(value)
    def insert_spatialRepresentationType_at(self, index, value): self.spatialRepresentationType.insert(index, value)
    def replace_spatialRepresentationType_at(self, index, value): self.spatialRepresentationType[index] = value
    def get_spatialResolution(self): return self.spatialResolution
    def set_spatialResolution(self, spatialResolution): self.spatialResolution = spatialResolution
    def add_spatialResolution(self, value): self.spatialResolution.append(value)
    def insert_spatialResolution_at(self, index, value): self.spatialResolution.insert(index, value)
    def replace_spatialResolution_at(self, index, value): self.spatialResolution[index] = value
    def get_language(self): return self.language
    def set_language(self, language): self.language = language
    def add_language(self, value): self.language.append(value)
    def insert_language_at(self, index, value): self.language.insert(index, value)
    def replace_language_at(self, index, value): self.language[index] = value
    def get_characterSet(self): return self.characterSet
    def set_characterSet(self, characterSet): self.characterSet = characterSet
    def add_characterSet(self, value): self.characterSet.append(value)
    def insert_characterSet_at(self, index, value): self.characterSet.insert(index, value)
    def replace_characterSet_at(self, index, value): self.characterSet[index] = value
    def get_topicCategory(self): return self.topicCategory
    def set_topicCategory(self, topicCategory): self.topicCategory = topicCategory
    def add_topicCategory(self, value): self.topicCategory.append(value)
    def insert_topicCategory_at(self, index, value): self.topicCategory.insert(index, value)
    def replace_topicCategory_at(self, index, value): self.topicCategory[index] = value
    def get_environmentDescription(self): return self.environmentDescription
    def set_environmentDescription(self, environmentDescription): self.environmentDescription = environmentDescription
    def get_extent(self): return self.extent
    def set_extent(self, extent): self.extent = extent
    def add_extent(self, value): self.extent.append(value)
    def insert_extent_at(self, index, value): self.extent.insert(index, value)
    def replace_extent_at(self, index, value): self.extent[index] = value
    def get_supplementalInformation(self): return self.supplementalInformation
    def set_supplementalInformation(self, supplementalInformation): self.supplementalInformation = supplementalInformation
    def hasContent_(self):
        if (
            self.spatialRepresentationType or
            self.spatialResolution or
            self.language or
            self.characterSet or
            self.topicCategory or
            self.environmentDescription is not None or
            self.extent or
            self.supplementalInformation is not None or
            super(MD_DataIdentification_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DataIdentification_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DataIdentification_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DataIdentification_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DataIdentification_Type'):
        super(MD_DataIdentification_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DataIdentification_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DataIdentification_Type', fromsubclass_=False, pretty_print=True):
        super(MD_DataIdentification_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for spatialRepresentationType_ in self.spatialRepresentationType:
            spatialRepresentationType_.export(outfile, level, namespace_, name_='spatialRepresentationType', pretty_print=pretty_print)
        for spatialResolution_ in self.spatialResolution:
            spatialResolution_.export(outfile, level, namespace_, name_='spatialResolution', pretty_print=pretty_print)
        for language_ in self.language:
            language_.export(outfile, level, namespace_, name_='language', pretty_print=pretty_print)
        for characterSet_ in self.characterSet:
            characterSet_.export(outfile, level, namespace_, name_='characterSet', pretty_print=pretty_print)
        for topicCategory_ in self.topicCategory:
            topicCategory_.export(outfile, level, namespace_, name_='topicCategory', pretty_print=pretty_print)
        if self.environmentDescription is not None:
            self.environmentDescription.export(outfile, level, namespace_, name_='environmentDescription', pretty_print=pretty_print)
        for extent_ in self.extent:
            extent_.export(outfile, level, namespace_, name_='extent', pretty_print=pretty_print)
        if self.supplementalInformation is not None:
            self.supplementalInformation.export(outfile, level, namespace_, name_='supplementalInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DataIdentification_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_DataIdentification_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_DataIdentification_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('spatialRepresentationType=[\n')
        level += 1
        for spatialRepresentationType_ in self.spatialRepresentationType:
            showIndent(outfile, level)
            outfile.write('model_.MD_SpatialRepresentationTypeCode_PropertyType(\n')
            spatialRepresentationType_.exportLiteral(outfile, level, name_='MD_SpatialRepresentationTypeCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('spatialResolution=[\n')
        level += 1
        for spatialResolution_ in self.spatialResolution:
            showIndent(outfile, level)
            outfile.write('model_.MD_Resolution_PropertyType(\n')
            spatialResolution_.exportLiteral(outfile, level, name_='MD_Resolution_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('language=[\n')
        level += 1
        for language_ in self.language:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            language_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('characterSet=[\n')
        level += 1
        for characterSet_ in self.characterSet:
            showIndent(outfile, level)
            outfile.write('model_.MD_CharacterSetCode_PropertyType(\n')
            characterSet_.exportLiteral(outfile, level, name_='MD_CharacterSetCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('topicCategory=[\n')
        level += 1
        for topicCategory_ in self.topicCategory:
            showIndent(outfile, level)
            outfile.write('model_.MD_TopicCategoryCode_PropertyType(\n')
            topicCategory_.exportLiteral(outfile, level, name_='MD_TopicCategoryCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.environmentDescription is not None:
            showIndent(outfile, level)
            outfile.write('environmentDescription=model_.CharacterString_PropertyType(\n')
            self.environmentDescription.exportLiteral(outfile, level, name_='environmentDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('extent=[\n')
        level += 1
        for extent_ in self.extent:
            showIndent(outfile, level)
            outfile.write('model_.EX_Extent_PropertyType(\n')
            extent_.exportLiteral(outfile, level, name_='EX_Extent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.supplementalInformation is not None:
            showIndent(outfile, level)
            outfile.write('supplementalInformation=model_.CharacterString_PropertyType(\n')
            self.supplementalInformation.exportLiteral(outfile, level, name_='supplementalInformation')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_DataIdentification_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'spatialRepresentationType':
            obj_ = MD_SpatialRepresentationTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.spatialRepresentationType.append(obj_)
            obj_.original_tagname_ = 'spatialRepresentationType'
        elif nodeName_ == 'spatialResolution':
            obj_ = MD_Resolution_PropertyType.factory()
            obj_.build(child_)
            self.spatialResolution.append(obj_)
            obj_.original_tagname_ = 'spatialResolution'
        elif nodeName_ == 'language':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.language.append(obj_)
            obj_.original_tagname_ = 'language'
        elif nodeName_ == 'characterSet':
            obj_ = MD_CharacterSetCode_PropertyType.factory()
            obj_.build(child_)
            self.characterSet.append(obj_)
            obj_.original_tagname_ = 'characterSet'
        elif nodeName_ == 'topicCategory':
            obj_ = MD_TopicCategoryCode_PropertyType.factory()
            obj_.build(child_)
            self.topicCategory.append(obj_)
            obj_.original_tagname_ = 'topicCategory'
        elif nodeName_ == 'environmentDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.environmentDescription = obj_
            obj_.original_tagname_ = 'environmentDescription'
        elif nodeName_ == 'extent':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.extent.append(obj_)
            obj_.original_tagname_ = 'extent'
        elif nodeName_ == 'supplementalInformation':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.supplementalInformation = obj_
            obj_.original_tagname_ = 'supplementalInformation'
        super(MD_DataIdentification_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_DataIdentification_Type


class MD_DataIdentification_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_DataIdentification=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_DataIdentification = MD_DataIdentification
    def factory(*args_, **kwargs_):
        if MD_DataIdentification_PropertyType.subclass:
            return MD_DataIdentification_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_DataIdentification_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_DataIdentification(self): return self.MD_DataIdentification
    def set_MD_DataIdentification(self, MD_DataIdentification): self.MD_DataIdentification = MD_DataIdentification
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_DataIdentification is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DataIdentification_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DataIdentification_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DataIdentification_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DataIdentification_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DataIdentification_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_DataIdentification is not None:
            self.MD_DataIdentification.export(outfile, level, namespace_='gmd:', name_='MD_DataIdentification', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DataIdentification_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_DataIdentification is not None:
            showIndent(outfile, level)
            outfile.write('MD_DataIdentification=model_.MD_DataIdentification(\n')
            self.MD_DataIdentification.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_DataIdentification':
            obj_ = MD_DataIdentification_Type.factory()
            obj_.build(child_)
            self.MD_DataIdentification = obj_
            obj_.original_tagname_ = 'MD_DataIdentification'
# end class MD_DataIdentification_PropertyType


class MD_ServiceIdentification_Type(AbstractMD_Identification_Type):
    """See 19119 for further info"""
    subclass = None
    superclass = AbstractMD_Identification_Type
    def __init__(self, id=None, uuid=None, citation=None, abstract=None, purpose=None, credit=None, status=None, pointOfContact=None, resourceMaintenance=None, graphicOverview=None, resourceFormat=None, descriptiveKeywords=None, resourceSpecificUsage=None, resourceConstraints=None, aggregationInfo=None):
        self.original_tagname_ = None
        super(MD_ServiceIdentification_Type, self).__init__(id, uuid, citation, abstract, purpose, credit, status, pointOfContact, resourceMaintenance, graphicOverview, resourceFormat, descriptiveKeywords, resourceSpecificUsage, resourceConstraints, aggregationInfo, )
    def factory(*args_, **kwargs_):
        if MD_ServiceIdentification_Type.subclass:
            return MD_ServiceIdentification_Type.subclass(*args_, **kwargs_)
        else:
            return MD_ServiceIdentification_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(MD_ServiceIdentification_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ServiceIdentification_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ServiceIdentification_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ServiceIdentification_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ServiceIdentification_Type'):
        super(MD_ServiceIdentification_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ServiceIdentification_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ServiceIdentification_Type', fromsubclass_=False, pretty_print=True):
        super(MD_ServiceIdentification_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ServiceIdentification_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_ServiceIdentification_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_ServiceIdentification_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_ServiceIdentification_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(MD_ServiceIdentification_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class MD_ServiceIdentification_Type


class MD_ServiceIdentification_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_ServiceIdentification=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_ServiceIdentification = MD_ServiceIdentification
    def factory(*args_, **kwargs_):
        if MD_ServiceIdentification_PropertyType.subclass:
            return MD_ServiceIdentification_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ServiceIdentification_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ServiceIdentification(self): return self.MD_ServiceIdentification
    def set_MD_ServiceIdentification(self, MD_ServiceIdentification): self.MD_ServiceIdentification = MD_ServiceIdentification
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_ServiceIdentification is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ServiceIdentification_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ServiceIdentification_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ServiceIdentification_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ServiceIdentification_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ServiceIdentification_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ServiceIdentification is not None:
            self.MD_ServiceIdentification.export(outfile, level, namespace_='gmd:', name_='MD_ServiceIdentification', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ServiceIdentification_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ServiceIdentification is not None:
            showIndent(outfile, level)
            outfile.write('MD_ServiceIdentification=model_.MD_ServiceIdentification(\n')
            self.MD_ServiceIdentification.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ServiceIdentification':
            obj_ = MD_ServiceIdentification_Type.factory()
            obj_.build(child_)
            self.MD_ServiceIdentification = obj_
            obj_.original_tagname_ = 'MD_ServiceIdentification'
# end class MD_ServiceIdentification_PropertyType


class MD_RepresentativeFraction_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, denominator=None):
        self.original_tagname_ = None
        super(MD_RepresentativeFraction_Type, self).__init__(id, uuid, )
        self.denominator = denominator
    def factory(*args_, **kwargs_):
        if MD_RepresentativeFraction_Type.subclass:
            return MD_RepresentativeFraction_Type.subclass(*args_, **kwargs_)
        else:
            return MD_RepresentativeFraction_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_denominator(self): return self.denominator
    def set_denominator(self, denominator): self.denominator = denominator
    def hasContent_(self):
        if (
            self.denominator is not None or
            super(MD_RepresentativeFraction_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_RepresentativeFraction_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RepresentativeFraction_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_RepresentativeFraction_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_RepresentativeFraction_Type'):
        super(MD_RepresentativeFraction_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RepresentativeFraction_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_RepresentativeFraction_Type', fromsubclass_=False, pretty_print=True):
        super(MD_RepresentativeFraction_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.denominator is not None:
            self.denominator.export(outfile, level, namespace_, name_='denominator', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_RepresentativeFraction_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_RepresentativeFraction_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_RepresentativeFraction_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.denominator is not None:
            showIndent(outfile, level)
            outfile.write('denominator=model_.Integer_PropertyType(\n')
            self.denominator.exportLiteral(outfile, level, name_='denominator')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_RepresentativeFraction_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'denominator':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.denominator = obj_
            obj_.original_tagname_ = 'denominator'
        super(MD_RepresentativeFraction_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_RepresentativeFraction_Type


class MD_RepresentativeFraction_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_RepresentativeFraction=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_RepresentativeFraction = MD_RepresentativeFraction
    def factory(*args_, **kwargs_):
        if MD_RepresentativeFraction_PropertyType.subclass:
            return MD_RepresentativeFraction_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_RepresentativeFraction_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_RepresentativeFraction(self): return self.MD_RepresentativeFraction
    def set_MD_RepresentativeFraction(self, MD_RepresentativeFraction): self.MD_RepresentativeFraction = MD_RepresentativeFraction
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_RepresentativeFraction is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_RepresentativeFraction_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RepresentativeFraction_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_RepresentativeFraction_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_RepresentativeFraction_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_RepresentativeFraction_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_RepresentativeFraction is not None:
            self.MD_RepresentativeFraction.export(outfile, level, namespace_='gmd:', name_='MD_RepresentativeFraction', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_RepresentativeFraction_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_RepresentativeFraction is not None:
            showIndent(outfile, level)
            outfile.write('MD_RepresentativeFraction=model_.MD_RepresentativeFraction(\n')
            self.MD_RepresentativeFraction.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_RepresentativeFraction':
            obj_ = MD_RepresentativeFraction_Type.factory()
            obj_.build(child_)
            self.MD_RepresentativeFraction = obj_
            obj_.original_tagname_ = 'MD_RepresentativeFraction'
# end class MD_RepresentativeFraction_PropertyType


class MD_Usage_Type(AbstractObject_Type):
    """Brief description of ways in which the dataset is currently used."""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, specificUsage=None, usageDateTime=None, userDeterminedLimitations=None, userContactInfo=None):
        self.original_tagname_ = None
        super(MD_Usage_Type, self).__init__(id, uuid, )
        self.specificUsage = specificUsage
        self.usageDateTime = usageDateTime
        self.userDeterminedLimitations = userDeterminedLimitations
        if userContactInfo is None:
            self.userContactInfo = []
        else:
            self.userContactInfo = userContactInfo
    def factory(*args_, **kwargs_):
        if MD_Usage_Type.subclass:
            return MD_Usage_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Usage_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_specificUsage(self): return self.specificUsage
    def set_specificUsage(self, specificUsage): self.specificUsage = specificUsage
    def get_usageDateTime(self): return self.usageDateTime
    def set_usageDateTime(self, usageDateTime): self.usageDateTime = usageDateTime
    def get_userDeterminedLimitations(self): return self.userDeterminedLimitations
    def set_userDeterminedLimitations(self, userDeterminedLimitations): self.userDeterminedLimitations = userDeterminedLimitations
    def get_userContactInfo(self): return self.userContactInfo
    def set_userContactInfo(self, userContactInfo): self.userContactInfo = userContactInfo
    def add_userContactInfo(self, value): self.userContactInfo.append(value)
    def insert_userContactInfo_at(self, index, value): self.userContactInfo.insert(index, value)
    def replace_userContactInfo_at(self, index, value): self.userContactInfo[index] = value
    def hasContent_(self):
        if (
            self.specificUsage is not None or
            self.usageDateTime is not None or
            self.userDeterminedLimitations is not None or
            self.userContactInfo or
            super(MD_Usage_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Usage_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Usage_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Usage_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Usage_Type'):
        super(MD_Usage_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Usage_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Usage_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Usage_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.specificUsage is not None:
            self.specificUsage.export(outfile, level, namespace_, name_='specificUsage', pretty_print=pretty_print)
        if self.usageDateTime is not None:
            self.usageDateTime.export(outfile, level, namespace_, name_='usageDateTime', pretty_print=pretty_print)
        if self.userDeterminedLimitations is not None:
            self.userDeterminedLimitations.export(outfile, level, namespace_, name_='userDeterminedLimitations', pretty_print=pretty_print)
        for userContactInfo_ in self.userContactInfo:
            userContactInfo_.export(outfile, level, namespace_, name_='userContactInfo', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Usage_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Usage_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Usage_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.specificUsage is not None:
            showIndent(outfile, level)
            outfile.write('specificUsage=model_.CharacterString_PropertyType(\n')
            self.specificUsage.exportLiteral(outfile, level, name_='specificUsage')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.usageDateTime is not None:
            showIndent(outfile, level)
            outfile.write('usageDateTime=model_.DateTime_PropertyType(\n')
            self.usageDateTime.exportLiteral(outfile, level, name_='usageDateTime')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.userDeterminedLimitations is not None:
            showIndent(outfile, level)
            outfile.write('userDeterminedLimitations=model_.CharacterString_PropertyType(\n')
            self.userDeterminedLimitations.exportLiteral(outfile, level, name_='userDeterminedLimitations')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('userContactInfo=[\n')
        level += 1
        for userContactInfo_ in self.userContactInfo:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            userContactInfo_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Usage_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'specificUsage':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.specificUsage = obj_
            obj_.original_tagname_ = 'specificUsage'
        elif nodeName_ == 'usageDateTime':
            obj_ = DateTime_PropertyType.factory()
            obj_.build(child_)
            self.usageDateTime = obj_
            obj_.original_tagname_ = 'usageDateTime'
        elif nodeName_ == 'userDeterminedLimitations':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.userDeterminedLimitations = obj_
            obj_.original_tagname_ = 'userDeterminedLimitations'
        elif nodeName_ == 'userContactInfo':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.userContactInfo.append(obj_)
            obj_.original_tagname_ = 'userContactInfo'
        super(MD_Usage_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Usage_Type


class MD_Usage_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Usage=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Usage = MD_Usage
    def factory(*args_, **kwargs_):
        if MD_Usage_PropertyType.subclass:
            return MD_Usage_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Usage_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Usage(self): return self.MD_Usage
    def set_MD_Usage(self, MD_Usage): self.MD_Usage = MD_Usage
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Usage is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Usage_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Usage_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Usage_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Usage_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Usage_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Usage is not None:
            self.MD_Usage.export(outfile, level, namespace_='gmd:', name_='MD_Usage', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Usage_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Usage is not None:
            showIndent(outfile, level)
            outfile.write('MD_Usage=model_.MD_Usage(\n')
            self.MD_Usage.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Usage':
            obj_ = MD_Usage_Type.factory()
            obj_.build(child_)
            self.MD_Usage = obj_
            obj_.original_tagname_ = 'MD_Usage'
# end class MD_Usage_PropertyType


class MD_Keywords_Type(AbstractObject_Type):
    """Keywords, their type and reference source"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, keyword=None, type_=None, thesaurusName=None):
        self.original_tagname_ = None
        super(MD_Keywords_Type, self).__init__(id, uuid, )
        if keyword is None:
            self.keyword = []
        else:
            self.keyword = keyword
        self.type_ = type_
        self.thesaurusName = thesaurusName
    def factory(*args_, **kwargs_):
        if MD_Keywords_Type.subclass:
            return MD_Keywords_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Keywords_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_keyword(self): return self.keyword
    def set_keyword(self, keyword): self.keyword = keyword
    def add_keyword(self, value): self.keyword.append(value)
    def insert_keyword_at(self, index, value): self.keyword.insert(index, value)
    def replace_keyword_at(self, index, value): self.keyword[index] = value
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_thesaurusName(self): return self.thesaurusName
    def set_thesaurusName(self, thesaurusName): self.thesaurusName = thesaurusName
    def hasContent_(self):
        if (
            self.keyword or
            self.type_ is not None or
            self.thesaurusName is not None or
            super(MD_Keywords_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Keywords_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Keywords_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Keywords_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Keywords_Type'):
        super(MD_Keywords_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Keywords_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Keywords_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Keywords_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for keyword_ in self.keyword:
            keyword_.export(outfile, level, namespace_, name_='keyword', pretty_print=pretty_print)
        if self.type_ is not None:
            self.type_.export(outfile, level, namespace_, name_='type', pretty_print=pretty_print)
        if self.thesaurusName is not None:
            self.thesaurusName.export(outfile, level, namespace_, name_='thesaurusName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Keywords_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Keywords_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Keywords_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('keyword=[\n')
        level += 1
        for keyword_ in self.keyword:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            keyword_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.type_ is not None:
            showIndent(outfile, level)
            outfile.write('type_=model_.MD_KeywordTypeCode_PropertyType(\n')
            self.type_.exportLiteral(outfile, level, name_='type')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.thesaurusName is not None:
            showIndent(outfile, level)
            outfile.write('thesaurusName=model_.CI_Citation_PropertyType(\n')
            self.thesaurusName.exportLiteral(outfile, level, name_='thesaurusName')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Keywords_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'keyword':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.keyword.append(obj_)
            obj_.original_tagname_ = 'keyword'
        elif nodeName_ == 'type':
            obj_ = MD_KeywordTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.type_ = obj_
            obj_.original_tagname_ = 'type'
        elif nodeName_ == 'thesaurusName':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.thesaurusName = obj_
            obj_.original_tagname_ = 'thesaurusName'
        super(MD_Keywords_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Keywords_Type


class MD_Keywords_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Keywords=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Keywords = MD_Keywords
    def factory(*args_, **kwargs_):
        if MD_Keywords_PropertyType.subclass:
            return MD_Keywords_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Keywords_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Keywords(self): return self.MD_Keywords
    def set_MD_Keywords(self, MD_Keywords): self.MD_Keywords = MD_Keywords
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Keywords is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Keywords_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Keywords_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Keywords_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Keywords_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Keywords_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Keywords is not None:
            self.MD_Keywords.export(outfile, level, namespace_='gmd:', name_='MD_Keywords', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Keywords_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Keywords is not None:
            showIndent(outfile, level)
            outfile.write('MD_Keywords=model_.MD_Keywords(\n')
            self.MD_Keywords.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Keywords':
            obj_ = MD_Keywords_Type.factory()
            obj_.build(child_)
            self.MD_Keywords = obj_
            obj_.original_tagname_ = 'MD_Keywords'
# end class MD_Keywords_PropertyType


class DS_Association_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None):
        self.original_tagname_ = None
        super(DS_Association_Type, self).__init__(id, uuid, )
    def factory(*args_, **kwargs_):
        if DS_Association_Type.subclass:
            return DS_Association_Type.subclass(*args_, **kwargs_)
        else:
            return DS_Association_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DS_Association_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Association_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Association_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Association_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Association_Type'):
        super(DS_Association_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Association_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Association_Type', fromsubclass_=False, pretty_print=True):
        super(DS_Association_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='DS_Association_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_Association_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_Association_Type, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_Association_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_Association_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_Association_Type


class DS_Association_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, DS_Association=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.DS_Association = DS_Association
    def factory(*args_, **kwargs_):
        if DS_Association_PropertyType.subclass:
            return DS_Association_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_Association_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_Association(self): return self.DS_Association
    def set_DS_Association(self, DS_Association): self.DS_Association = DS_Association
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DS_Association is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Association_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Association_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Association_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Association_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Association_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_Association is not None:
            self.DS_Association.export(outfile, level, namespace_='gmd:', name_='DS_Association', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Association_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_Association is not None:
            showIndent(outfile, level)
            outfile.write('DS_Association=model_.DS_Association(\n')
            self.DS_Association.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_Association':
            obj_ = DS_Association_Type.factory()
            obj_.build(child_)
            self.DS_Association = obj_
            obj_.original_tagname_ = 'DS_Association'
# end class DS_Association_PropertyType


class MD_AggregateInformation_Type(AbstractObject_Type):
    """Encapsulates the dataset aggregation information"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, aggregateDataSetName=None, aggregateDataSetIdentifier=None, associationType=None, initiativeType=None):
        self.original_tagname_ = None
        super(MD_AggregateInformation_Type, self).__init__(id, uuid, )
        self.aggregateDataSetName = aggregateDataSetName
        self.aggregateDataSetIdentifier = aggregateDataSetIdentifier
        self.associationType = associationType
        self.initiativeType = initiativeType
    def factory(*args_, **kwargs_):
        if MD_AggregateInformation_Type.subclass:
            return MD_AggregateInformation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_AggregateInformation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_aggregateDataSetName(self): return self.aggregateDataSetName
    def set_aggregateDataSetName(self, aggregateDataSetName): self.aggregateDataSetName = aggregateDataSetName
    def get_aggregateDataSetIdentifier(self): return self.aggregateDataSetIdentifier
    def set_aggregateDataSetIdentifier(self, aggregateDataSetIdentifier): self.aggregateDataSetIdentifier = aggregateDataSetIdentifier
    def get_associationType(self): return self.associationType
    def set_associationType(self, associationType): self.associationType = associationType
    def get_initiativeType(self): return self.initiativeType
    def set_initiativeType(self, initiativeType): self.initiativeType = initiativeType
    def hasContent_(self):
        if (
            self.aggregateDataSetName is not None or
            self.aggregateDataSetIdentifier is not None or
            self.associationType is not None or
            self.initiativeType is not None or
            super(MD_AggregateInformation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_AggregateInformation_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_AggregateInformation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_AggregateInformation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_AggregateInformation_Type'):
        super(MD_AggregateInformation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_AggregateInformation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_AggregateInformation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_AggregateInformation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.aggregateDataSetName is not None:
            self.aggregateDataSetName.export(outfile, level, namespace_, name_='aggregateDataSetName', pretty_print=pretty_print)
        if self.aggregateDataSetIdentifier is not None:
            self.aggregateDataSetIdentifier.export(outfile, level, namespace_, name_='aggregateDataSetIdentifier', pretty_print=pretty_print)
        if self.associationType is not None:
            self.associationType.export(outfile, level, namespace_, name_='associationType', pretty_print=pretty_print)
        if self.initiativeType is not None:
            self.initiativeType.export(outfile, level, namespace_, name_='initiativeType', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_AggregateInformation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_AggregateInformation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_AggregateInformation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.aggregateDataSetName is not None:
            showIndent(outfile, level)
            outfile.write('aggregateDataSetName=model_.CI_Citation_PropertyType(\n')
            self.aggregateDataSetName.exportLiteral(outfile, level, name_='aggregateDataSetName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.aggregateDataSetIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('aggregateDataSetIdentifier=model_.MD_Identifier_PropertyType(\n')
            self.aggregateDataSetIdentifier.exportLiteral(outfile, level, name_='aggregateDataSetIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.associationType is not None:
            showIndent(outfile, level)
            outfile.write('associationType=model_.DS_AssociationTypeCode_PropertyType(\n')
            self.associationType.exportLiteral(outfile, level, name_='associationType')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.initiativeType is not None:
            showIndent(outfile, level)
            outfile.write('initiativeType=model_.DS_InitiativeTypeCode_PropertyType(\n')
            self.initiativeType.exportLiteral(outfile, level, name_='initiativeType')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_AggregateInformation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'aggregateDataSetName':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.aggregateDataSetName = obj_
            obj_.original_tagname_ = 'aggregateDataSetName'
        elif nodeName_ == 'aggregateDataSetIdentifier':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.aggregateDataSetIdentifier = obj_
            obj_.original_tagname_ = 'aggregateDataSetIdentifier'
        elif nodeName_ == 'associationType':
            obj_ = DS_AssociationTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.associationType = obj_
            obj_.original_tagname_ = 'associationType'
        elif nodeName_ == 'initiativeType':
            obj_ = DS_InitiativeTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.initiativeType = obj_
            obj_.original_tagname_ = 'initiativeType'
        super(MD_AggregateInformation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_AggregateInformation_Type


class MD_AggregateInformation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_AggregateInformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_AggregateInformation = MD_AggregateInformation
    def factory(*args_, **kwargs_):
        if MD_AggregateInformation_PropertyType.subclass:
            return MD_AggregateInformation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_AggregateInformation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_AggregateInformation(self): return self.MD_AggregateInformation
    def set_MD_AggregateInformation(self, MD_AggregateInformation): self.MD_AggregateInformation = MD_AggregateInformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_AggregateInformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_AggregateInformation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_AggregateInformation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_AggregateInformation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_AggregateInformation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_AggregateInformation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_AggregateInformation is not None:
            self.MD_AggregateInformation.export(outfile, level, namespace_='gmd:', name_='MD_AggregateInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_AggregateInformation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_AggregateInformation is not None:
            showIndent(outfile, level)
            outfile.write('MD_AggregateInformation=model_.MD_AggregateInformation(\n')
            self.MD_AggregateInformation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_AggregateInformation':
            obj_ = MD_AggregateInformation_Type.factory()
            obj_.build(child_)
            self.MD_AggregateInformation = obj_
            obj_.original_tagname_ = 'MD_AggregateInformation'
# end class MD_AggregateInformation_PropertyType


class MD_Resolution_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, equivalentScale=None, distance=None):
        self.original_tagname_ = None
        self.equivalentScale = equivalentScale
        self.distance = distance
    def factory(*args_, **kwargs_):
        if MD_Resolution_Type.subclass:
            return MD_Resolution_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Resolution_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_equivalentScale(self): return self.equivalentScale
    def set_equivalentScale(self, equivalentScale): self.equivalentScale = equivalentScale
    def get_distance(self): return self.distance
    def set_distance(self, distance): self.distance = distance
    def hasContent_(self):
        if (
            self.equivalentScale is not None or
            self.distance is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Resolution_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Resolution_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Resolution_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Resolution_Type'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Resolution_Type', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.equivalentScale is not None:
            self.equivalentScale.export(outfile, level, namespace_, name_='equivalentScale', pretty_print=pretty_print)
        if self.distance is not None:
            self.distance.export(outfile, level, namespace_, name_='distance', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Resolution_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.equivalentScale is not None:
            showIndent(outfile, level)
            outfile.write('equivalentScale=model_.MD_RepresentativeFraction_PropertyType(\n')
            self.equivalentScale.exportLiteral(outfile, level, name_='equivalentScale')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.distance is not None:
            showIndent(outfile, level)
            outfile.write('distance=model_.Distance_PropertyType(\n')
            self.distance.exportLiteral(outfile, level, name_='distance')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'equivalentScale':
            obj_ = MD_RepresentativeFraction_PropertyType.factory()
            obj_.build(child_)
            self.equivalentScale = obj_
            obj_.original_tagname_ = 'equivalentScale'
        elif nodeName_ == 'distance':
            obj_ = Distance_PropertyType.factory()
            obj_.build(child_)
            self.distance = obj_
            obj_.original_tagname_ = 'distance'
# end class MD_Resolution_Type


class MD_Resolution_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_Resolution=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_Resolution = MD_Resolution
    def factory(*args_, **kwargs_):
        if MD_Resolution_PropertyType.subclass:
            return MD_Resolution_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Resolution_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Resolution(self): return self.MD_Resolution
    def set_MD_Resolution(self, MD_Resolution): self.MD_Resolution = MD_Resolution
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_Resolution is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Resolution_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Resolution_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Resolution_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Resolution_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Resolution_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Resolution is not None:
            self.MD_Resolution.export(outfile, level, namespace_='gmd:', name_='MD_Resolution', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Resolution_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Resolution is not None:
            showIndent(outfile, level)
            outfile.write('MD_Resolution=model_.MD_Resolution(\n')
            self.MD_Resolution.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Resolution':
            obj_ = MD_Resolution_Type.factory()
            obj_.build(child_)
            self.MD_Resolution = obj_
            obj_.original_tagname_ = 'MD_Resolution'
# end class MD_Resolution_PropertyType


class MD_TopicCategoryCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_TopicCategoryCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_TopicCategoryCode = MD_TopicCategoryCode
    def factory(*args_, **kwargs_):
        if MD_TopicCategoryCode_PropertyType.subclass:
            return MD_TopicCategoryCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_TopicCategoryCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_TopicCategoryCode(self): return self.MD_TopicCategoryCode
    def set_MD_TopicCategoryCode(self, MD_TopicCategoryCode): self.MD_TopicCategoryCode = MD_TopicCategoryCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_TopicCategoryCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_TopicCategoryCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_TopicCategoryCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_TopicCategoryCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_TopicCategoryCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_TopicCategoryCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_TopicCategoryCode is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sMD_TopicCategoryCode>%s</%sMD_TopicCategoryCode>%s' % (namespace_, self.gds_format_string(quote_xml(self.MD_TopicCategoryCode).encode(ExternalEncoding), input_name='MD_TopicCategoryCode'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='MD_TopicCategoryCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_TopicCategoryCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_TopicCategoryCode=%s,\n' % quote_python(self.MD_TopicCategoryCode).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_TopicCategoryCode':
            MD_TopicCategoryCode_ = child_.text
            MD_TopicCategoryCode_ = self.gds_validate_string(MD_TopicCategoryCode_, node, 'MD_TopicCategoryCode')
            self.MD_TopicCategoryCode = MD_TopicCategoryCode_
# end class MD_TopicCategoryCode_PropertyType


class MD_CharacterSetCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_CharacterSetCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_CharacterSetCode = MD_CharacterSetCode
    def factory(*args_, **kwargs_):
        if MD_CharacterSetCode_PropertyType.subclass:
            return MD_CharacterSetCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_CharacterSetCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_CharacterSetCode(self): return self.MD_CharacterSetCode
    def set_MD_CharacterSetCode(self, MD_CharacterSetCode): self.MD_CharacterSetCode = MD_CharacterSetCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_CharacterSetCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_CharacterSetCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_CharacterSetCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_CharacterSetCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_CharacterSetCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_CharacterSetCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_CharacterSetCode is not None:
            self.MD_CharacterSetCode.export(outfile, level, namespace_='gmd:', name_='MD_CharacterSetCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_CharacterSetCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_CharacterSetCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_CharacterSetCode=model_.MD_CharacterSetCode(\n')
            self.MD_CharacterSetCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_CharacterSetCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_CharacterSetCode = obj_
            obj_.original_tagname_ = 'MD_CharacterSetCode'
# end class MD_CharacterSetCode_PropertyType


class MD_SpatialRepresentationTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_SpatialRepresentationTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_SpatialRepresentationTypeCode = MD_SpatialRepresentationTypeCode
    def factory(*args_, **kwargs_):
        if MD_SpatialRepresentationTypeCode_PropertyType.subclass:
            return MD_SpatialRepresentationTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_SpatialRepresentationTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_SpatialRepresentationTypeCode(self): return self.MD_SpatialRepresentationTypeCode
    def set_MD_SpatialRepresentationTypeCode(self, MD_SpatialRepresentationTypeCode): self.MD_SpatialRepresentationTypeCode = MD_SpatialRepresentationTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_SpatialRepresentationTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_SpatialRepresentationTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_SpatialRepresentationTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_SpatialRepresentationTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_SpatialRepresentationTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_SpatialRepresentationTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_SpatialRepresentationTypeCode is not None:
            self.MD_SpatialRepresentationTypeCode.export(outfile, level, namespace_='gmd:', name_='MD_SpatialRepresentationTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_SpatialRepresentationTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_SpatialRepresentationTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_SpatialRepresentationTypeCode=model_.MD_SpatialRepresentationTypeCode(\n')
            self.MD_SpatialRepresentationTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_SpatialRepresentationTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_SpatialRepresentationTypeCode = obj_
            obj_.original_tagname_ = 'MD_SpatialRepresentationTypeCode'
# end class MD_SpatialRepresentationTypeCode_PropertyType


class MD_ProgressCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_ProgressCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_ProgressCode = MD_ProgressCode
    def factory(*args_, **kwargs_):
        if MD_ProgressCode_PropertyType.subclass:
            return MD_ProgressCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ProgressCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ProgressCode(self): return self.MD_ProgressCode
    def set_MD_ProgressCode(self, MD_ProgressCode): self.MD_ProgressCode = MD_ProgressCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_ProgressCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ProgressCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ProgressCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ProgressCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ProgressCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ProgressCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ProgressCode is not None:
            self.MD_ProgressCode.export(outfile, level, namespace_='gmd:', name_='MD_ProgressCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ProgressCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ProgressCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_ProgressCode=model_.MD_ProgressCode(\n')
            self.MD_ProgressCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ProgressCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ProgressCode = obj_
            obj_.original_tagname_ = 'MD_ProgressCode'
# end class MD_ProgressCode_PropertyType


class MD_KeywordTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_KeywordTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_KeywordTypeCode = MD_KeywordTypeCode
    def factory(*args_, **kwargs_):
        if MD_KeywordTypeCode_PropertyType.subclass:
            return MD_KeywordTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_KeywordTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_KeywordTypeCode(self): return self.MD_KeywordTypeCode
    def set_MD_KeywordTypeCode(self, MD_KeywordTypeCode): self.MD_KeywordTypeCode = MD_KeywordTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_KeywordTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_KeywordTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_KeywordTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_KeywordTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_KeywordTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_KeywordTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_KeywordTypeCode is not None:
            self.MD_KeywordTypeCode.export(outfile, level, namespace_='gmd:', name_='MD_KeywordTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_KeywordTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_KeywordTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_KeywordTypeCode=model_.MD_KeywordTypeCode(\n')
            self.MD_KeywordTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_KeywordTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_KeywordTypeCode = obj_
            obj_.original_tagname_ = 'MD_KeywordTypeCode'
# end class MD_KeywordTypeCode_PropertyType


class DS_AssociationTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, DS_AssociationTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.DS_AssociationTypeCode = DS_AssociationTypeCode
    def factory(*args_, **kwargs_):
        if DS_AssociationTypeCode_PropertyType.subclass:
            return DS_AssociationTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_AssociationTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_AssociationTypeCode(self): return self.DS_AssociationTypeCode
    def set_DS_AssociationTypeCode(self, DS_AssociationTypeCode): self.DS_AssociationTypeCode = DS_AssociationTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.DS_AssociationTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_AssociationTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_AssociationTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_AssociationTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_AssociationTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_AssociationTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_AssociationTypeCode is not None:
            self.DS_AssociationTypeCode.export(outfile, level, namespace_='gmd:', name_='DS_AssociationTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_AssociationTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_AssociationTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('DS_AssociationTypeCode=model_.DS_AssociationTypeCode(\n')
            self.DS_AssociationTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_AssociationTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.DS_AssociationTypeCode = obj_
            obj_.original_tagname_ = 'DS_AssociationTypeCode'
# end class DS_AssociationTypeCode_PropertyType


class DS_InitiativeTypeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, DS_InitiativeTypeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.DS_InitiativeTypeCode = DS_InitiativeTypeCode
    def factory(*args_, **kwargs_):
        if DS_InitiativeTypeCode_PropertyType.subclass:
            return DS_InitiativeTypeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return DS_InitiativeTypeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DS_InitiativeTypeCode(self): return self.DS_InitiativeTypeCode
    def set_DS_InitiativeTypeCode(self, DS_InitiativeTypeCode): self.DS_InitiativeTypeCode = DS_InitiativeTypeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.DS_InitiativeTypeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_InitiativeTypeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_InitiativeTypeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_InitiativeTypeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_InitiativeTypeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_InitiativeTypeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DS_InitiativeTypeCode is not None:
            self.DS_InitiativeTypeCode.export(outfile, level, namespace_='gmd:', name_='DS_InitiativeTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_InitiativeTypeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DS_InitiativeTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('DS_InitiativeTypeCode=model_.DS_InitiativeTypeCode(\n')
            self.DS_InitiativeTypeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DS_InitiativeTypeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.DS_InitiativeTypeCode = obj_
            obj_.original_tagname_ = 'DS_InitiativeTypeCode'
# end class DS_InitiativeTypeCode_PropertyType


class MD_Constraints_Type(AbstractObject_Type):
    """Restrictions on the access and use of a dataset or metadata"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, useLimitation=None, extensiontype_=None):
        self.original_tagname_ = None
        super(MD_Constraints_Type, self).__init__(id, uuid, extensiontype_, )
        if useLimitation is None:
            self.useLimitation = []
        else:
            self.useLimitation = useLimitation
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MD_Constraints_Type.subclass:
            return MD_Constraints_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Constraints_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_useLimitation(self): return self.useLimitation
    def set_useLimitation(self, useLimitation): self.useLimitation = useLimitation
    def add_useLimitation(self, value): self.useLimitation.append(value)
    def insert_useLimitation_at(self, index, value): self.useLimitation.insert(index, value)
    def replace_useLimitation_at(self, index, value): self.useLimitation[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.useLimitation or
            super(MD_Constraints_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Constraints_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Constraints_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Constraints_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Constraints_Type'):
        super(MD_Constraints_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Constraints_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Constraints_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Constraints_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for useLimitation_ in self.useLimitation:
            useLimitation_.export(outfile, level, namespace_, name_='useLimitation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Constraints_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Constraints_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Constraints_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('useLimitation=[\n')
        level += 1
        for useLimitation_ in self.useLimitation:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            useLimitation_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(MD_Constraints_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'useLimitation':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.useLimitation.append(obj_)
            obj_.original_tagname_ = 'useLimitation'
        super(MD_Constraints_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Constraints_Type


class MD_Constraints_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Constraints=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Constraints = MD_Constraints
    def factory(*args_, **kwargs_):
        if MD_Constraints_PropertyType.subclass:
            return MD_Constraints_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Constraints_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Constraints(self): return self.MD_Constraints
    def set_MD_Constraints(self, MD_Constraints): self.MD_Constraints = MD_Constraints
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Constraints is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Constraints_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Constraints_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Constraints_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Constraints_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Constraints_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Constraints is not None:
            self.MD_Constraints.export(outfile, level, namespace_='gmd:', name_='MD_Constraints', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Constraints_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Constraints is not None:
            showIndent(outfile, level)
            outfile.write('MD_Constraints=model_.MD_Constraints(\n')
            self.MD_Constraints.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Constraints':
            class_obj_ = self.get_class_obj_(child_, MD_Constraints_Type)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.MD_Constraints = obj_
            obj_.original_tagname_ = 'MD_Constraints'
        elif nodeName_ == 'MD_LegalConstraints':
            obj_ = MD_LegalConstraints_Type.factory()
            obj_.build(child_)
            self.MD_LegalConstraints = obj_
            obj_.original_tagname_ = 'MD_LegalConstraints'
        elif nodeName_ == 'MD_SecurityConstraints':
            obj_ = MD_SecurityConstraints_Type.factory()
            obj_.build(child_)
            self.MD_SecurityConstraints = obj_
            obj_.original_tagname_ = 'MD_SecurityConstraints'
# end class MD_Constraints_PropertyType


class MD_LegalConstraints_Type(MD_Constraints_Type):
    """Restrictions and legal prerequisites for accessing and using the
    dataset."""
    subclass = None
    superclass = MD_Constraints_Type
    def __init__(self, id=None, uuid=None, useLimitation=None, accessConstraints=None, useConstraints=None, otherConstraints=None):
        self.original_tagname_ = None
        super(MD_LegalConstraints_Type, self).__init__(id, uuid, useLimitation, )
        if accessConstraints is None:
            self.accessConstraints = []
        else:
            self.accessConstraints = accessConstraints
        if useConstraints is None:
            self.useConstraints = []
        else:
            self.useConstraints = useConstraints
        if otherConstraints is None:
            self.otherConstraints = []
        else:
            self.otherConstraints = otherConstraints
    def factory(*args_, **kwargs_):
        if MD_LegalConstraints_Type.subclass:
            return MD_LegalConstraints_Type.subclass(*args_, **kwargs_)
        else:
            return MD_LegalConstraints_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_accessConstraints(self): return self.accessConstraints
    def set_accessConstraints(self, accessConstraints): self.accessConstraints = accessConstraints
    def add_accessConstraints(self, value): self.accessConstraints.append(value)
    def insert_accessConstraints_at(self, index, value): self.accessConstraints.insert(index, value)
    def replace_accessConstraints_at(self, index, value): self.accessConstraints[index] = value
    def get_useConstraints(self): return self.useConstraints
    def set_useConstraints(self, useConstraints): self.useConstraints = useConstraints
    def add_useConstraints(self, value): self.useConstraints.append(value)
    def insert_useConstraints_at(self, index, value): self.useConstraints.insert(index, value)
    def replace_useConstraints_at(self, index, value): self.useConstraints[index] = value
    def get_otherConstraints(self): return self.otherConstraints
    def set_otherConstraints(self, otherConstraints): self.otherConstraints = otherConstraints
    def add_otherConstraints(self, value): self.otherConstraints.append(value)
    def insert_otherConstraints_at(self, index, value): self.otherConstraints.insert(index, value)
    def replace_otherConstraints_at(self, index, value): self.otherConstraints[index] = value
    def hasContent_(self):
        if (
            self.accessConstraints or
            self.useConstraints or
            self.otherConstraints or
            super(MD_LegalConstraints_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_LegalConstraints_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_LegalConstraints_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_LegalConstraints_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_LegalConstraints_Type'):
        super(MD_LegalConstraints_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_LegalConstraints_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_LegalConstraints_Type', fromsubclass_=False, pretty_print=True):
        super(MD_LegalConstraints_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for accessConstraints_ in self.accessConstraints:
            accessConstraints_.export(outfile, level, namespace_, name_='accessConstraints', pretty_print=pretty_print)
        for useConstraints_ in self.useConstraints:
            useConstraints_.export(outfile, level, namespace_, name_='useConstraints', pretty_print=pretty_print)
        for otherConstraints_ in self.otherConstraints:
            otherConstraints_.export(outfile, level, namespace_, name_='otherConstraints', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_LegalConstraints_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_LegalConstraints_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_LegalConstraints_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('accessConstraints=[\n')
        level += 1
        for accessConstraints_ in self.accessConstraints:
            showIndent(outfile, level)
            outfile.write('model_.MD_RestrictionCode_PropertyType(\n')
            accessConstraints_.exportLiteral(outfile, level, name_='MD_RestrictionCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('useConstraints=[\n')
        level += 1
        for useConstraints_ in self.useConstraints:
            showIndent(outfile, level)
            outfile.write('model_.MD_RestrictionCode_PropertyType(\n')
            useConstraints_.exportLiteral(outfile, level, name_='MD_RestrictionCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('otherConstraints=[\n')
        level += 1
        for otherConstraints_ in self.otherConstraints:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            otherConstraints_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_LegalConstraints_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'accessConstraints':
            obj_ = MD_RestrictionCode_PropertyType.factory()
            obj_.build(child_)
            self.accessConstraints.append(obj_)
            obj_.original_tagname_ = 'accessConstraints'
        elif nodeName_ == 'useConstraints':
            obj_ = MD_RestrictionCode_PropertyType.factory()
            obj_.build(child_)
            self.useConstraints.append(obj_)
            obj_.original_tagname_ = 'useConstraints'
        elif nodeName_ == 'otherConstraints':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.otherConstraints.append(obj_)
            obj_.original_tagname_ = 'otherConstraints'
        super(MD_LegalConstraints_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_LegalConstraints_Type


class MD_LegalConstraints_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_LegalConstraints=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_LegalConstraints = MD_LegalConstraints
    def factory(*args_, **kwargs_):
        if MD_LegalConstraints_PropertyType.subclass:
            return MD_LegalConstraints_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_LegalConstraints_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_LegalConstraints(self): return self.MD_LegalConstraints
    def set_MD_LegalConstraints(self, MD_LegalConstraints): self.MD_LegalConstraints = MD_LegalConstraints
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_LegalConstraints is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_LegalConstraints_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_LegalConstraints_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_LegalConstraints_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_LegalConstraints_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_LegalConstraints_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_LegalConstraints is not None:
            self.MD_LegalConstraints.export(outfile, level, namespace_='gmd:', name_='MD_LegalConstraints', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_LegalConstraints_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_LegalConstraints is not None:
            showIndent(outfile, level)
            outfile.write('MD_LegalConstraints=model_.MD_LegalConstraints(\n')
            self.MD_LegalConstraints.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_LegalConstraints':
            obj_ = MD_LegalConstraints_Type.factory()
            obj_.build(child_)
            self.MD_LegalConstraints = obj_
            obj_.original_tagname_ = 'MD_LegalConstraints'
# end class MD_LegalConstraints_PropertyType


class MD_SecurityConstraints_Type(MD_Constraints_Type):
    """Handling restrictions imposed on the dataset because of national
    security, privacy, or other concerns"""
    subclass = None
    superclass = MD_Constraints_Type
    def __init__(self, id=None, uuid=None, useLimitation=None, classification=None, userNote=None, classificationSystem=None, handlingDescription=None):
        self.original_tagname_ = None
        super(MD_SecurityConstraints_Type, self).__init__(id, uuid, useLimitation, )
        self.classification = classification
        self.userNote = userNote
        self.classificationSystem = classificationSystem
        self.handlingDescription = handlingDescription
    def factory(*args_, **kwargs_):
        if MD_SecurityConstraints_Type.subclass:
            return MD_SecurityConstraints_Type.subclass(*args_, **kwargs_)
        else:
            return MD_SecurityConstraints_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_classification(self): return self.classification
    def set_classification(self, classification): self.classification = classification
    def get_userNote(self): return self.userNote
    def set_userNote(self, userNote): self.userNote = userNote
    def get_classificationSystem(self): return self.classificationSystem
    def set_classificationSystem(self, classificationSystem): self.classificationSystem = classificationSystem
    def get_handlingDescription(self): return self.handlingDescription
    def set_handlingDescription(self, handlingDescription): self.handlingDescription = handlingDescription
    def hasContent_(self):
        if (
            self.classification is not None or
            self.userNote is not None or
            self.classificationSystem is not None or
            self.handlingDescription is not None or
            super(MD_SecurityConstraints_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_SecurityConstraints_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_SecurityConstraints_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_SecurityConstraints_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_SecurityConstraints_Type'):
        super(MD_SecurityConstraints_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_SecurityConstraints_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_SecurityConstraints_Type', fromsubclass_=False, pretty_print=True):
        super(MD_SecurityConstraints_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.classification is not None:
            self.classification.export(outfile, level, namespace_, name_='classification', pretty_print=pretty_print)
        if self.userNote is not None:
            self.userNote.export(outfile, level, namespace_, name_='userNote', pretty_print=pretty_print)
        if self.classificationSystem is not None:
            self.classificationSystem.export(outfile, level, namespace_, name_='classificationSystem', pretty_print=pretty_print)
        if self.handlingDescription is not None:
            self.handlingDescription.export(outfile, level, namespace_, name_='handlingDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_SecurityConstraints_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_SecurityConstraints_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_SecurityConstraints_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.classification is not None:
            showIndent(outfile, level)
            outfile.write('classification=model_.MD_ClassificationCode_PropertyType(\n')
            self.classification.exportLiteral(outfile, level, name_='classification')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.userNote is not None:
            showIndent(outfile, level)
            outfile.write('userNote=model_.CharacterString_PropertyType(\n')
            self.userNote.exportLiteral(outfile, level, name_='userNote')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.classificationSystem is not None:
            showIndent(outfile, level)
            outfile.write('classificationSystem=model_.CharacterString_PropertyType(\n')
            self.classificationSystem.exportLiteral(outfile, level, name_='classificationSystem')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.handlingDescription is not None:
            showIndent(outfile, level)
            outfile.write('handlingDescription=model_.CharacterString_PropertyType(\n')
            self.handlingDescription.exportLiteral(outfile, level, name_='handlingDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_SecurityConstraints_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'classification':
            obj_ = MD_ClassificationCode_PropertyType.factory()
            obj_.build(child_)
            self.classification = obj_
            obj_.original_tagname_ = 'classification'
        elif nodeName_ == 'userNote':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.userNote = obj_
            obj_.original_tagname_ = 'userNote'
        elif nodeName_ == 'classificationSystem':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.classificationSystem = obj_
            obj_.original_tagname_ = 'classificationSystem'
        elif nodeName_ == 'handlingDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.handlingDescription = obj_
            obj_.original_tagname_ = 'handlingDescription'
        super(MD_SecurityConstraints_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_SecurityConstraints_Type


class MD_SecurityConstraints_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_SecurityConstraints=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_SecurityConstraints = MD_SecurityConstraints
    def factory(*args_, **kwargs_):
        if MD_SecurityConstraints_PropertyType.subclass:
            return MD_SecurityConstraints_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_SecurityConstraints_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_SecurityConstraints(self): return self.MD_SecurityConstraints
    def set_MD_SecurityConstraints(self, MD_SecurityConstraints): self.MD_SecurityConstraints = MD_SecurityConstraints
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_SecurityConstraints is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_SecurityConstraints_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_SecurityConstraints_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_SecurityConstraints_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_SecurityConstraints_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_SecurityConstraints_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_SecurityConstraints is not None:
            self.MD_SecurityConstraints.export(outfile, level, namespace_='gmd:', name_='MD_SecurityConstraints', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_SecurityConstraints_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_SecurityConstraints is not None:
            showIndent(outfile, level)
            outfile.write('MD_SecurityConstraints=model_.MD_SecurityConstraints(\n')
            self.MD_SecurityConstraints.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_SecurityConstraints':
            obj_ = MD_SecurityConstraints_Type.factory()
            obj_.build(child_)
            self.MD_SecurityConstraints = obj_
            obj_.original_tagname_ = 'MD_SecurityConstraints'
# end class MD_SecurityConstraints_PropertyType


class MD_ClassificationCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_ClassificationCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_ClassificationCode = MD_ClassificationCode
    def factory(*args_, **kwargs_):
        if MD_ClassificationCode_PropertyType.subclass:
            return MD_ClassificationCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ClassificationCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ClassificationCode(self): return self.MD_ClassificationCode
    def set_MD_ClassificationCode(self, MD_ClassificationCode): self.MD_ClassificationCode = MD_ClassificationCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_ClassificationCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ClassificationCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ClassificationCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ClassificationCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ClassificationCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ClassificationCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ClassificationCode is not None:
            self.MD_ClassificationCode.export(outfile, level, namespace_='gmd:', name_='MD_ClassificationCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ClassificationCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ClassificationCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_ClassificationCode=model_.MD_ClassificationCode(\n')
            self.MD_ClassificationCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ClassificationCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ClassificationCode = obj_
            obj_.original_tagname_ = 'MD_ClassificationCode'
# end class MD_ClassificationCode_PropertyType


class MD_RestrictionCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_RestrictionCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_RestrictionCode = MD_RestrictionCode
    def factory(*args_, **kwargs_):
        if MD_RestrictionCode_PropertyType.subclass:
            return MD_RestrictionCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_RestrictionCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_RestrictionCode(self): return self.MD_RestrictionCode
    def set_MD_RestrictionCode(self, MD_RestrictionCode): self.MD_RestrictionCode = MD_RestrictionCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_RestrictionCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_RestrictionCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_RestrictionCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_RestrictionCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_RestrictionCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_RestrictionCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_RestrictionCode is not None:
            self.MD_RestrictionCode.export(outfile, level, namespace_='gmd:', name_='MD_RestrictionCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_RestrictionCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_RestrictionCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_RestrictionCode=model_.MD_RestrictionCode(\n')
            self.MD_RestrictionCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_RestrictionCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_RestrictionCode = obj_
            obj_.original_tagname_ = 'MD_RestrictionCode'
# end class MD_RestrictionCode_PropertyType


class MD_Medium_Type(AbstractObject_Type):
    """Information about the media on which the data can be distributed"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, name=None, density=None, densityUnits=None, volumes=None, mediumFormat=None, mediumNote=None):
        self.original_tagname_ = None
        super(MD_Medium_Type, self).__init__(id, uuid, )
        self.name = name
        if density is None:
            self.density = []
        else:
            self.density = density
        self.densityUnits = densityUnits
        self.volumes = volumes
        if mediumFormat is None:
            self.mediumFormat = []
        else:
            self.mediumFormat = mediumFormat
        self.mediumNote = mediumNote
    def factory(*args_, **kwargs_):
        if MD_Medium_Type.subclass:
            return MD_Medium_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Medium_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_density(self): return self.density
    def set_density(self, density): self.density = density
    def add_density(self, value): self.density.append(value)
    def insert_density_at(self, index, value): self.density.insert(index, value)
    def replace_density_at(self, index, value): self.density[index] = value
    def get_densityUnits(self): return self.densityUnits
    def set_densityUnits(self, densityUnits): self.densityUnits = densityUnits
    def get_volumes(self): return self.volumes
    def set_volumes(self, volumes): self.volumes = volumes
    def get_mediumFormat(self): return self.mediumFormat
    def set_mediumFormat(self, mediumFormat): self.mediumFormat = mediumFormat
    def add_mediumFormat(self, value): self.mediumFormat.append(value)
    def insert_mediumFormat_at(self, index, value): self.mediumFormat.insert(index, value)
    def replace_mediumFormat_at(self, index, value): self.mediumFormat[index] = value
    def get_mediumNote(self): return self.mediumNote
    def set_mediumNote(self, mediumNote): self.mediumNote = mediumNote
    def hasContent_(self):
        if (
            self.name is not None or
            self.density or
            self.densityUnits is not None or
            self.volumes is not None or
            self.mediumFormat or
            self.mediumNote is not None or
            super(MD_Medium_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Medium_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Medium_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Medium_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Medium_Type'):
        super(MD_Medium_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Medium_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Medium_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Medium_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        for density_ in self.density:
            density_.export(outfile, level, namespace_, name_='density', pretty_print=pretty_print)
        if self.densityUnits is not None:
            self.densityUnits.export(outfile, level, namespace_, name_='densityUnits', pretty_print=pretty_print)
        if self.volumes is not None:
            self.volumes.export(outfile, level, namespace_, name_='volumes', pretty_print=pretty_print)
        for mediumFormat_ in self.mediumFormat:
            mediumFormat_.export(outfile, level, namespace_, name_='mediumFormat', pretty_print=pretty_print)
        if self.mediumNote is not None:
            self.mediumNote.export(outfile, level, namespace_, name_='mediumNote', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Medium_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Medium_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Medium_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.MD_MediumNameCode_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('density=[\n')
        level += 1
        for density_ in self.density:
            showIndent(outfile, level)
            outfile.write('model_.Real_PropertyType(\n')
            density_.exportLiteral(outfile, level, name_='Real_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.densityUnits is not None:
            showIndent(outfile, level)
            outfile.write('densityUnits=model_.CharacterString_PropertyType(\n')
            self.densityUnits.exportLiteral(outfile, level, name_='densityUnits')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.volumes is not None:
            showIndent(outfile, level)
            outfile.write('volumes=model_.Integer_PropertyType(\n')
            self.volumes.exportLiteral(outfile, level, name_='volumes')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('mediumFormat=[\n')
        level += 1
        for mediumFormat_ in self.mediumFormat:
            showIndent(outfile, level)
            outfile.write('model_.MD_MediumFormatCode_PropertyType(\n')
            mediumFormat_.exportLiteral(outfile, level, name_='MD_MediumFormatCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.mediumNote is not None:
            showIndent(outfile, level)
            outfile.write('mediumNote=model_.CharacterString_PropertyType(\n')
            self.mediumNote.exportLiteral(outfile, level, name_='mediumNote')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Medium_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'name':
            obj_ = MD_MediumNameCode_PropertyType.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'density':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.density.append(obj_)
            obj_.original_tagname_ = 'density'
        elif nodeName_ == 'densityUnits':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.densityUnits = obj_
            obj_.original_tagname_ = 'densityUnits'
        elif nodeName_ == 'volumes':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.volumes = obj_
            obj_.original_tagname_ = 'volumes'
        elif nodeName_ == 'mediumFormat':
            obj_ = MD_MediumFormatCode_PropertyType.factory()
            obj_.build(child_)
            self.mediumFormat.append(obj_)
            obj_.original_tagname_ = 'mediumFormat'
        elif nodeName_ == 'mediumNote':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.mediumNote = obj_
            obj_.original_tagname_ = 'mediumNote'
        super(MD_Medium_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Medium_Type


class MD_Medium_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Medium=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Medium = MD_Medium
    def factory(*args_, **kwargs_):
        if MD_Medium_PropertyType.subclass:
            return MD_Medium_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Medium_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Medium(self): return self.MD_Medium
    def set_MD_Medium(self, MD_Medium): self.MD_Medium = MD_Medium
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Medium is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Medium_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Medium_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Medium_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Medium_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Medium_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Medium is not None:
            self.MD_Medium.export(outfile, level, namespace_='gmd:', name_='MD_Medium', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Medium_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Medium is not None:
            showIndent(outfile, level)
            outfile.write('MD_Medium=model_.MD_Medium(\n')
            self.MD_Medium.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Medium':
            obj_ = MD_Medium_Type.factory()
            obj_.build(child_)
            self.MD_Medium = obj_
            obj_.original_tagname_ = 'MD_Medium'
# end class MD_Medium_PropertyType


class MD_DigitalTransferOptions_Type(AbstractObject_Type):
    """Technical means and media by which a dataset is obtained from the
    distributor"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, unitsOfDistribution=None, transferSize=None, onLine=None, offLine=None):
        self.original_tagname_ = None
        super(MD_DigitalTransferOptions_Type, self).__init__(id, uuid, )
        self.unitsOfDistribution = unitsOfDistribution
        self.transferSize = transferSize
        if onLine is None:
            self.onLine = []
        else:
            self.onLine = onLine
        self.offLine = offLine
    def factory(*args_, **kwargs_):
        if MD_DigitalTransferOptions_Type.subclass:
            return MD_DigitalTransferOptions_Type.subclass(*args_, **kwargs_)
        else:
            return MD_DigitalTransferOptions_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_unitsOfDistribution(self): return self.unitsOfDistribution
    def set_unitsOfDistribution(self, unitsOfDistribution): self.unitsOfDistribution = unitsOfDistribution
    def get_transferSize(self): return self.transferSize
    def set_transferSize(self, transferSize): self.transferSize = transferSize
    def get_onLine(self): return self.onLine
    def set_onLine(self, onLine): self.onLine = onLine
    def add_onLine(self, value): self.onLine.append(value)
    def insert_onLine_at(self, index, value): self.onLine.insert(index, value)
    def replace_onLine_at(self, index, value): self.onLine[index] = value
    def get_offLine(self): return self.offLine
    def set_offLine(self, offLine): self.offLine = offLine
    def hasContent_(self):
        if (
            self.unitsOfDistribution is not None or
            self.transferSize is not None or
            self.onLine or
            self.offLine is not None or
            super(MD_DigitalTransferOptions_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DigitalTransferOptions_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DigitalTransferOptions_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DigitalTransferOptions_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DigitalTransferOptions_Type'):
        super(MD_DigitalTransferOptions_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DigitalTransferOptions_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DigitalTransferOptions_Type', fromsubclass_=False, pretty_print=True):
        super(MD_DigitalTransferOptions_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.unitsOfDistribution is not None:
            self.unitsOfDistribution.export(outfile, level, namespace_, name_='unitsOfDistribution', pretty_print=pretty_print)
        if self.transferSize is not None:
            self.transferSize.export(outfile, level, namespace_, name_='transferSize', pretty_print=pretty_print)
        for onLine_ in self.onLine:
            onLine_.export(outfile, level, namespace_, name_='onLine', pretty_print=pretty_print)
        if self.offLine is not None:
            self.offLine.export(outfile, level, namespace_, name_='offLine', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DigitalTransferOptions_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_DigitalTransferOptions_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_DigitalTransferOptions_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.unitsOfDistribution is not None:
            showIndent(outfile, level)
            outfile.write('unitsOfDistribution=model_.CharacterString_PropertyType(\n')
            self.unitsOfDistribution.exportLiteral(outfile, level, name_='unitsOfDistribution')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.transferSize is not None:
            showIndent(outfile, level)
            outfile.write('transferSize=model_.Real_PropertyType(\n')
            self.transferSize.exportLiteral(outfile, level, name_='transferSize')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('onLine=[\n')
        level += 1
        for onLine_ in self.onLine:
            showIndent(outfile, level)
            outfile.write('model_.CI_OnlineResource_PropertyType(\n')
            onLine_.exportLiteral(outfile, level, name_='CI_OnlineResource_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.offLine is not None:
            showIndent(outfile, level)
            outfile.write('offLine=model_.MD_Medium_PropertyType(\n')
            self.offLine.exportLiteral(outfile, level, name_='offLine')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_DigitalTransferOptions_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'unitsOfDistribution':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.unitsOfDistribution = obj_
            obj_.original_tagname_ = 'unitsOfDistribution'
        elif nodeName_ == 'transferSize':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.transferSize = obj_
            obj_.original_tagname_ = 'transferSize'
        elif nodeName_ == 'onLine':
            obj_ = CI_OnlineResource_PropertyType.factory()
            obj_.build(child_)
            self.onLine.append(obj_)
            obj_.original_tagname_ = 'onLine'
        elif nodeName_ == 'offLine':
            obj_ = MD_Medium_PropertyType.factory()
            obj_.build(child_)
            self.offLine = obj_
            obj_.original_tagname_ = 'offLine'
        super(MD_DigitalTransferOptions_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_DigitalTransferOptions_Type


class MD_DigitalTransferOptions_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_DigitalTransferOptions=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_DigitalTransferOptions = MD_DigitalTransferOptions
    def factory(*args_, **kwargs_):
        if MD_DigitalTransferOptions_PropertyType.subclass:
            return MD_DigitalTransferOptions_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_DigitalTransferOptions_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_DigitalTransferOptions(self): return self.MD_DigitalTransferOptions
    def set_MD_DigitalTransferOptions(self, MD_DigitalTransferOptions): self.MD_DigitalTransferOptions = MD_DigitalTransferOptions
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_DigitalTransferOptions is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DigitalTransferOptions_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DigitalTransferOptions_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DigitalTransferOptions_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DigitalTransferOptions_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DigitalTransferOptions_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_DigitalTransferOptions is not None:
            self.MD_DigitalTransferOptions.export(outfile, level, namespace_='gmd:', name_='MD_DigitalTransferOptions', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DigitalTransferOptions_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_DigitalTransferOptions is not None:
            showIndent(outfile, level)
            outfile.write('MD_DigitalTransferOptions=model_.MD_DigitalTransferOptions(\n')
            self.MD_DigitalTransferOptions.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_DigitalTransferOptions':
            obj_ = MD_DigitalTransferOptions_Type.factory()
            obj_.build(child_)
            self.MD_DigitalTransferOptions = obj_
            obj_.original_tagname_ = 'MD_DigitalTransferOptions'
# end class MD_DigitalTransferOptions_PropertyType


class MD_StandardOrderProcess_Type(AbstractObject_Type):
    """Common ways in which the dataset may be obtained or received, and
    related instructions and fee information"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, fees=None, plannedAvailableDateTime=None, orderingInstructions=None, turnaround=None):
        self.original_tagname_ = None
        super(MD_StandardOrderProcess_Type, self).__init__(id, uuid, )
        self.fees = fees
        self.plannedAvailableDateTime = plannedAvailableDateTime
        self.orderingInstructions = orderingInstructions
        self.turnaround = turnaround
    def factory(*args_, **kwargs_):
        if MD_StandardOrderProcess_Type.subclass:
            return MD_StandardOrderProcess_Type.subclass(*args_, **kwargs_)
        else:
            return MD_StandardOrderProcess_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_fees(self): return self.fees
    def set_fees(self, fees): self.fees = fees
    def get_plannedAvailableDateTime(self): return self.plannedAvailableDateTime
    def set_plannedAvailableDateTime(self, plannedAvailableDateTime): self.plannedAvailableDateTime = plannedAvailableDateTime
    def get_orderingInstructions(self): return self.orderingInstructions
    def set_orderingInstructions(self, orderingInstructions): self.orderingInstructions = orderingInstructions
    def get_turnaround(self): return self.turnaround
    def set_turnaround(self, turnaround): self.turnaround = turnaround
    def hasContent_(self):
        if (
            self.fees is not None or
            self.plannedAvailableDateTime is not None or
            self.orderingInstructions is not None or
            self.turnaround is not None or
            super(MD_StandardOrderProcess_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_StandardOrderProcess_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_StandardOrderProcess_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_StandardOrderProcess_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_StandardOrderProcess_Type'):
        super(MD_StandardOrderProcess_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_StandardOrderProcess_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_StandardOrderProcess_Type', fromsubclass_=False, pretty_print=True):
        super(MD_StandardOrderProcess_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.fees is not None:
            self.fees.export(outfile, level, namespace_, name_='fees', pretty_print=pretty_print)
        if self.plannedAvailableDateTime is not None:
            self.plannedAvailableDateTime.export(outfile, level, namespace_, name_='plannedAvailableDateTime', pretty_print=pretty_print)
        if self.orderingInstructions is not None:
            self.orderingInstructions.export(outfile, level, namespace_, name_='orderingInstructions', pretty_print=pretty_print)
        if self.turnaround is not None:
            self.turnaround.export(outfile, level, namespace_, name_='turnaround', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_StandardOrderProcess_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_StandardOrderProcess_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_StandardOrderProcess_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.fees is not None:
            showIndent(outfile, level)
            outfile.write('fees=model_.CharacterString_PropertyType(\n')
            self.fees.exportLiteral(outfile, level, name_='fees')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.plannedAvailableDateTime is not None:
            showIndent(outfile, level)
            outfile.write('plannedAvailableDateTime=model_.DateTime_PropertyType(\n')
            self.plannedAvailableDateTime.exportLiteral(outfile, level, name_='plannedAvailableDateTime')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.orderingInstructions is not None:
            showIndent(outfile, level)
            outfile.write('orderingInstructions=model_.CharacterString_PropertyType(\n')
            self.orderingInstructions.exportLiteral(outfile, level, name_='orderingInstructions')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.turnaround is not None:
            showIndent(outfile, level)
            outfile.write('turnaround=model_.CharacterString_PropertyType(\n')
            self.turnaround.exportLiteral(outfile, level, name_='turnaround')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_StandardOrderProcess_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'fees':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fees = obj_
            obj_.original_tagname_ = 'fees'
        elif nodeName_ == 'plannedAvailableDateTime':
            obj_ = DateTime_PropertyType.factory()
            obj_.build(child_)
            self.plannedAvailableDateTime = obj_
            obj_.original_tagname_ = 'plannedAvailableDateTime'
        elif nodeName_ == 'orderingInstructions':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.orderingInstructions = obj_
            obj_.original_tagname_ = 'orderingInstructions'
        elif nodeName_ == 'turnaround':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.turnaround = obj_
            obj_.original_tagname_ = 'turnaround'
        super(MD_StandardOrderProcess_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_StandardOrderProcess_Type


class MD_StandardOrderProcess_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_StandardOrderProcess=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_StandardOrderProcess = MD_StandardOrderProcess
    def factory(*args_, **kwargs_):
        if MD_StandardOrderProcess_PropertyType.subclass:
            return MD_StandardOrderProcess_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_StandardOrderProcess_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_StandardOrderProcess(self): return self.MD_StandardOrderProcess
    def set_MD_StandardOrderProcess(self, MD_StandardOrderProcess): self.MD_StandardOrderProcess = MD_StandardOrderProcess
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_StandardOrderProcess is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_StandardOrderProcess_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_StandardOrderProcess_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_StandardOrderProcess_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_StandardOrderProcess_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_StandardOrderProcess_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_StandardOrderProcess is not None:
            self.MD_StandardOrderProcess.export(outfile, level, namespace_='gmd:', name_='MD_StandardOrderProcess', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_StandardOrderProcess_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_StandardOrderProcess is not None:
            showIndent(outfile, level)
            outfile.write('MD_StandardOrderProcess=model_.MD_StandardOrderProcess(\n')
            self.MD_StandardOrderProcess.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_StandardOrderProcess':
            obj_ = MD_StandardOrderProcess_Type.factory()
            obj_.build(child_)
            self.MD_StandardOrderProcess = obj_
            obj_.original_tagname_ = 'MD_StandardOrderProcess'
# end class MD_StandardOrderProcess_PropertyType


class MD_Distributor_Type(AbstractObject_Type):
    """Information about the distributor"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, distributorContact=None, distributionOrderProcess=None, distributorFormat=None, distributorTransferOptions=None):
        self.original_tagname_ = None
        super(MD_Distributor_Type, self).__init__(id, uuid, )
        self.distributorContact = distributorContact
        if distributionOrderProcess is None:
            self.distributionOrderProcess = []
        else:
            self.distributionOrderProcess = distributionOrderProcess
        if distributorFormat is None:
            self.distributorFormat = []
        else:
            self.distributorFormat = distributorFormat
        if distributorTransferOptions is None:
            self.distributorTransferOptions = []
        else:
            self.distributorTransferOptions = distributorTransferOptions
    def factory(*args_, **kwargs_):
        if MD_Distributor_Type.subclass:
            return MD_Distributor_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Distributor_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_distributorContact(self): return self.distributorContact
    def set_distributorContact(self, distributorContact): self.distributorContact = distributorContact
    def get_distributionOrderProcess(self): return self.distributionOrderProcess
    def set_distributionOrderProcess(self, distributionOrderProcess): self.distributionOrderProcess = distributionOrderProcess
    def add_distributionOrderProcess(self, value): self.distributionOrderProcess.append(value)
    def insert_distributionOrderProcess_at(self, index, value): self.distributionOrderProcess.insert(index, value)
    def replace_distributionOrderProcess_at(self, index, value): self.distributionOrderProcess[index] = value
    def get_distributorFormat(self): return self.distributorFormat
    def set_distributorFormat(self, distributorFormat): self.distributorFormat = distributorFormat
    def add_distributorFormat(self, value): self.distributorFormat.append(value)
    def insert_distributorFormat_at(self, index, value): self.distributorFormat.insert(index, value)
    def replace_distributorFormat_at(self, index, value): self.distributorFormat[index] = value
    def get_distributorTransferOptions(self): return self.distributorTransferOptions
    def set_distributorTransferOptions(self, distributorTransferOptions): self.distributorTransferOptions = distributorTransferOptions
    def add_distributorTransferOptions(self, value): self.distributorTransferOptions.append(value)
    def insert_distributorTransferOptions_at(self, index, value): self.distributorTransferOptions.insert(index, value)
    def replace_distributorTransferOptions_at(self, index, value): self.distributorTransferOptions[index] = value
    def hasContent_(self):
        if (
            self.distributorContact is not None or
            self.distributionOrderProcess or
            self.distributorFormat or
            self.distributorTransferOptions or
            super(MD_Distributor_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Distributor_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Distributor_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Distributor_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Distributor_Type'):
        super(MD_Distributor_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Distributor_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Distributor_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Distributor_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.distributorContact is not None:
            self.distributorContact.export(outfile, level, namespace_, name_='distributorContact', pretty_print=pretty_print)
        for distributionOrderProcess_ in self.distributionOrderProcess:
            distributionOrderProcess_.export(outfile, level, namespace_, name_='distributionOrderProcess', pretty_print=pretty_print)
        for distributorFormat_ in self.distributorFormat:
            distributorFormat_.export(outfile, level, namespace_, name_='distributorFormat', pretty_print=pretty_print)
        for distributorTransferOptions_ in self.distributorTransferOptions:
            distributorTransferOptions_.export(outfile, level, namespace_, name_='distributorTransferOptions', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Distributor_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Distributor_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Distributor_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.distributorContact is not None:
            showIndent(outfile, level)
            outfile.write('distributorContact=model_.CI_ResponsibleParty_PropertyType(\n')
            self.distributorContact.exportLiteral(outfile, level, name_='distributorContact')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('distributionOrderProcess=[\n')
        level += 1
        for distributionOrderProcess_ in self.distributionOrderProcess:
            showIndent(outfile, level)
            outfile.write('model_.MD_StandardOrderProcess_PropertyType(\n')
            distributionOrderProcess_.exportLiteral(outfile, level, name_='MD_StandardOrderProcess_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('distributorFormat=[\n')
        level += 1
        for distributorFormat_ in self.distributorFormat:
            showIndent(outfile, level)
            outfile.write('model_.MD_Format_PropertyType(\n')
            distributorFormat_.exportLiteral(outfile, level, name_='MD_Format_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('distributorTransferOptions=[\n')
        level += 1
        for distributorTransferOptions_ in self.distributorTransferOptions:
            showIndent(outfile, level)
            outfile.write('model_.MD_DigitalTransferOptions_PropertyType(\n')
            distributorTransferOptions_.exportLiteral(outfile, level, name_='MD_DigitalTransferOptions_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Distributor_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'distributorContact':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.distributorContact = obj_
            obj_.original_tagname_ = 'distributorContact'
        elif nodeName_ == 'distributionOrderProcess':
            obj_ = MD_StandardOrderProcess_PropertyType.factory()
            obj_.build(child_)
            self.distributionOrderProcess.append(obj_)
            obj_.original_tagname_ = 'distributionOrderProcess'
        elif nodeName_ == 'distributorFormat':
            obj_ = MD_Format_PropertyType.factory()
            obj_.build(child_)
            self.distributorFormat.append(obj_)
            obj_.original_tagname_ = 'distributorFormat'
        elif nodeName_ == 'distributorTransferOptions':
            obj_ = MD_DigitalTransferOptions_PropertyType.factory()
            obj_.build(child_)
            self.distributorTransferOptions.append(obj_)
            obj_.original_tagname_ = 'distributorTransferOptions'
        super(MD_Distributor_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Distributor_Type


class MD_Distributor_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Distributor=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Distributor = MD_Distributor
    def factory(*args_, **kwargs_):
        if MD_Distributor_PropertyType.subclass:
            return MD_Distributor_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Distributor_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Distributor(self): return self.MD_Distributor
    def set_MD_Distributor(self, MD_Distributor): self.MD_Distributor = MD_Distributor
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Distributor is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Distributor_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Distributor_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Distributor_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Distributor_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Distributor_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Distributor is not None:
            self.MD_Distributor.export(outfile, level, namespace_='gmd:', name_='MD_Distributor', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Distributor_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Distributor is not None:
            showIndent(outfile, level)
            outfile.write('MD_Distributor=model_.MD_Distributor(\n')
            self.MD_Distributor.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Distributor':
            obj_ = MD_Distributor_Type.factory()
            obj_.build(child_)
            self.MD_Distributor = obj_
            obj_.original_tagname_ = 'MD_Distributor'
# end class MD_Distributor_PropertyType


class MD_Distribution_Type(AbstractObject_Type):
    """Information about the distributor of and options for obtaining the
    dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, distributionFormat=None, distributor=None, transferOptions=None):
        self.original_tagname_ = None
        super(MD_Distribution_Type, self).__init__(id, uuid, )
        if distributionFormat is None:
            self.distributionFormat = []
        else:
            self.distributionFormat = distributionFormat
        if distributor is None:
            self.distributor = []
        else:
            self.distributor = distributor
        if transferOptions is None:
            self.transferOptions = []
        else:
            self.transferOptions = transferOptions
    def factory(*args_, **kwargs_):
        if MD_Distribution_Type.subclass:
            return MD_Distribution_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Distribution_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_distributionFormat(self): return self.distributionFormat
    def set_distributionFormat(self, distributionFormat): self.distributionFormat = distributionFormat
    def add_distributionFormat(self, value): self.distributionFormat.append(value)
    def insert_distributionFormat_at(self, index, value): self.distributionFormat.insert(index, value)
    def replace_distributionFormat_at(self, index, value): self.distributionFormat[index] = value
    def get_distributor(self): return self.distributor
    def set_distributor(self, distributor): self.distributor = distributor
    def add_distributor(self, value): self.distributor.append(value)
    def insert_distributor_at(self, index, value): self.distributor.insert(index, value)
    def replace_distributor_at(self, index, value): self.distributor[index] = value
    def get_transferOptions(self): return self.transferOptions
    def set_transferOptions(self, transferOptions): self.transferOptions = transferOptions
    def add_transferOptions(self, value): self.transferOptions.append(value)
    def insert_transferOptions_at(self, index, value): self.transferOptions.insert(index, value)
    def replace_transferOptions_at(self, index, value): self.transferOptions[index] = value
    def hasContent_(self):
        if (
            self.distributionFormat or
            self.distributor or
            self.transferOptions or
            super(MD_Distribution_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Distribution_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Distribution_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Distribution_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Distribution_Type'):
        super(MD_Distribution_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Distribution_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Distribution_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Distribution_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for distributionFormat_ in self.distributionFormat:
            distributionFormat_.export(outfile, level, namespace_, name_='distributionFormat', pretty_print=pretty_print)
        for distributor_ in self.distributor:
            distributor_.export(outfile, level, namespace_, name_='distributor', pretty_print=pretty_print)
        for transferOptions_ in self.transferOptions:
            transferOptions_.export(outfile, level, namespace_, name_='transferOptions', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Distribution_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Distribution_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Distribution_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('distributionFormat=[\n')
        level += 1
        for distributionFormat_ in self.distributionFormat:
            showIndent(outfile, level)
            outfile.write('model_.MD_Format_PropertyType(\n')
            distributionFormat_.exportLiteral(outfile, level, name_='MD_Format_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('distributor=[\n')
        level += 1
        for distributor_ in self.distributor:
            showIndent(outfile, level)
            outfile.write('model_.MD_Distributor_PropertyType(\n')
            distributor_.exportLiteral(outfile, level, name_='MD_Distributor_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('transferOptions=[\n')
        level += 1
        for transferOptions_ in self.transferOptions:
            showIndent(outfile, level)
            outfile.write('model_.MD_DigitalTransferOptions_PropertyType(\n')
            transferOptions_.exportLiteral(outfile, level, name_='MD_DigitalTransferOptions_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Distribution_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'distributionFormat':
            obj_ = MD_Format_PropertyType.factory()
            obj_.build(child_)
            self.distributionFormat.append(obj_)
            obj_.original_tagname_ = 'distributionFormat'
        elif nodeName_ == 'distributor':
            obj_ = MD_Distributor_PropertyType.factory()
            obj_.build(child_)
            self.distributor.append(obj_)
            obj_.original_tagname_ = 'distributor'
        elif nodeName_ == 'transferOptions':
            obj_ = MD_DigitalTransferOptions_PropertyType.factory()
            obj_.build(child_)
            self.transferOptions.append(obj_)
            obj_.original_tagname_ = 'transferOptions'
        super(MD_Distribution_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Distribution_Type


class MD_Distribution_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Distribution=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Distribution = MD_Distribution
    def factory(*args_, **kwargs_):
        if MD_Distribution_PropertyType.subclass:
            return MD_Distribution_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Distribution_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Distribution(self): return self.MD_Distribution
    def set_MD_Distribution(self, MD_Distribution): self.MD_Distribution = MD_Distribution
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Distribution is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Distribution_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Distribution_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Distribution_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Distribution_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Distribution_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Distribution is not None:
            self.MD_Distribution.export(outfile, level, namespace_='gmd:', name_='MD_Distribution', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Distribution_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Distribution is not None:
            showIndent(outfile, level)
            outfile.write('MD_Distribution=model_.MD_Distribution(\n')
            self.MD_Distribution.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Distribution':
            obj_ = MD_Distribution_Type.factory()
            obj_.build(child_)
            self.MD_Distribution = obj_
            obj_.original_tagname_ = 'MD_Distribution'
# end class MD_Distribution_PropertyType


class MD_Format_Type(AbstractObject_Type):
    """Description of the form of the data to be distributed"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, name=None, version=None, amendmentNumber=None, specification=None, fileDecompressionTechnique=None, formatDistributor=None):
        self.original_tagname_ = None
        super(MD_Format_Type, self).__init__(id, uuid, )
        self.name = name
        self.version = version
        self.amendmentNumber = amendmentNumber
        self.specification = specification
        self.fileDecompressionTechnique = fileDecompressionTechnique
        if formatDistributor is None:
            self.formatDistributor = []
        else:
            self.formatDistributor = formatDistributor
    def factory(*args_, **kwargs_):
        if MD_Format_Type.subclass:
            return MD_Format_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Format_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_version(self): return self.version
    def set_version(self, version): self.version = version
    def get_amendmentNumber(self): return self.amendmentNumber
    def set_amendmentNumber(self, amendmentNumber): self.amendmentNumber = amendmentNumber
    def get_specification(self): return self.specification
    def set_specification(self, specification): self.specification = specification
    def get_fileDecompressionTechnique(self): return self.fileDecompressionTechnique
    def set_fileDecompressionTechnique(self, fileDecompressionTechnique): self.fileDecompressionTechnique = fileDecompressionTechnique
    def get_formatDistributor(self): return self.formatDistributor
    def set_formatDistributor(self, formatDistributor): self.formatDistributor = formatDistributor
    def add_formatDistributor(self, value): self.formatDistributor.append(value)
    def insert_formatDistributor_at(self, index, value): self.formatDistributor.insert(index, value)
    def replace_formatDistributor_at(self, index, value): self.formatDistributor[index] = value
    def hasContent_(self):
        if (
            self.name is not None or
            self.version is not None or
            self.amendmentNumber is not None or
            self.specification is not None or
            self.fileDecompressionTechnique is not None or
            self.formatDistributor or
            super(MD_Format_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Format_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Format_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Format_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Format_Type'):
        super(MD_Format_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Format_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Format_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Format_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        if self.version is not None:
            self.version.export(outfile, level, namespace_, name_='version', pretty_print=pretty_print)
        if self.amendmentNumber is not None:
            self.amendmentNumber.export(outfile, level, namespace_, name_='amendmentNumber', pretty_print=pretty_print)
        if self.specification is not None:
            self.specification.export(outfile, level, namespace_, name_='specification', pretty_print=pretty_print)
        if self.fileDecompressionTechnique is not None:
            self.fileDecompressionTechnique.export(outfile, level, namespace_, name_='fileDecompressionTechnique', pretty_print=pretty_print)
        for formatDistributor_ in self.formatDistributor:
            formatDistributor_.export(outfile, level, namespace_, name_='formatDistributor', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Format_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Format_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Format_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.CharacterString_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.version is not None:
            showIndent(outfile, level)
            outfile.write('version=model_.CharacterString_PropertyType(\n')
            self.version.exportLiteral(outfile, level, name_='version')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.amendmentNumber is not None:
            showIndent(outfile, level)
            outfile.write('amendmentNumber=model_.CharacterString_PropertyType(\n')
            self.amendmentNumber.exportLiteral(outfile, level, name_='amendmentNumber')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.specification is not None:
            showIndent(outfile, level)
            outfile.write('specification=model_.CharacterString_PropertyType(\n')
            self.specification.exportLiteral(outfile, level, name_='specification')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.fileDecompressionTechnique is not None:
            showIndent(outfile, level)
            outfile.write('fileDecompressionTechnique=model_.CharacterString_PropertyType(\n')
            self.fileDecompressionTechnique.exportLiteral(outfile, level, name_='fileDecompressionTechnique')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('formatDistributor=[\n')
        level += 1
        for formatDistributor_ in self.formatDistributor:
            showIndent(outfile, level)
            outfile.write('model_.MD_Distributor_PropertyType(\n')
            formatDistributor_.exportLiteral(outfile, level, name_='MD_Distributor_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Format_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'version':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.version = obj_
            obj_.original_tagname_ = 'version'
        elif nodeName_ == 'amendmentNumber':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.amendmentNumber = obj_
            obj_.original_tagname_ = 'amendmentNumber'
        elif nodeName_ == 'specification':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.specification = obj_
            obj_.original_tagname_ = 'specification'
        elif nodeName_ == 'fileDecompressionTechnique':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fileDecompressionTechnique = obj_
            obj_.original_tagname_ = 'fileDecompressionTechnique'
        elif nodeName_ == 'formatDistributor':
            obj_ = MD_Distributor_PropertyType.factory()
            obj_.build(child_)
            self.formatDistributor.append(obj_)
            obj_.original_tagname_ = 'formatDistributor'
        super(MD_Format_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Format_Type


class MD_Format_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_Format=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_Format = MD_Format
    def factory(*args_, **kwargs_):
        if MD_Format_PropertyType.subclass:
            return MD_Format_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_Format_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_Format(self): return self.MD_Format
    def set_MD_Format(self, MD_Format): self.MD_Format = MD_Format
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_Format is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Format_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Format_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Format_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Format_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Format_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_Format is not None:
            self.MD_Format.export(outfile, level, namespace_='gmd:', name_='MD_Format', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Format_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_Format is not None:
            showIndent(outfile, level)
            outfile.write('MD_Format=model_.MD_Format(\n')
            self.MD_Format.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_Format':
            obj_ = MD_Format_Type.factory()
            obj_.build(child_)
            self.MD_Format = obj_
            obj_.original_tagname_ = 'MD_Format'
# end class MD_Format_PropertyType


class MD_DistributionUnits_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_DistributionUnits=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_DistributionUnits = MD_DistributionUnits
    def factory(*args_, **kwargs_):
        if MD_DistributionUnits_PropertyType.subclass:
            return MD_DistributionUnits_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_DistributionUnits_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_DistributionUnits(self): return self.MD_DistributionUnits
    def set_MD_DistributionUnits(self, MD_DistributionUnits): self.MD_DistributionUnits = MD_DistributionUnits
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_DistributionUnits is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_DistributionUnits_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_DistributionUnits_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_DistributionUnits_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_DistributionUnits_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_DistributionUnits_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_DistributionUnits is not None:
            self.MD_DistributionUnits.export(outfile, level, namespace_='gmd:', name_='MD_DistributionUnits', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_DistributionUnits_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_DistributionUnits is not None:
            showIndent(outfile, level)
            outfile.write('MD_DistributionUnits=model_.MD_DistributionUnits(\n')
            self.MD_DistributionUnits.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_DistributionUnits':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_DistributionUnits = obj_
            obj_.original_tagname_ = 'MD_DistributionUnits'
# end class MD_DistributionUnits_PropertyType


class MD_MediumFormatCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_MediumFormatCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_MediumFormatCode = MD_MediumFormatCode
    def factory(*args_, **kwargs_):
        if MD_MediumFormatCode_PropertyType.subclass:
            return MD_MediumFormatCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_MediumFormatCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_MediumFormatCode(self): return self.MD_MediumFormatCode
    def set_MD_MediumFormatCode(self, MD_MediumFormatCode): self.MD_MediumFormatCode = MD_MediumFormatCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_MediumFormatCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MediumFormatCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MediumFormatCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MediumFormatCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MediumFormatCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MediumFormatCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_MediumFormatCode is not None:
            self.MD_MediumFormatCode.export(outfile, level, namespace_='gmd:', name_='MD_MediumFormatCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MediumFormatCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_MediumFormatCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_MediumFormatCode=model_.MD_MediumFormatCode(\n')
            self.MD_MediumFormatCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_MediumFormatCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_MediumFormatCode = obj_
            obj_.original_tagname_ = 'MD_MediumFormatCode'
# end class MD_MediumFormatCode_PropertyType


class MD_MediumNameCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_MediumNameCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_MediumNameCode = MD_MediumNameCode
    def factory(*args_, **kwargs_):
        if MD_MediumNameCode_PropertyType.subclass:
            return MD_MediumNameCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_MediumNameCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_MediumNameCode(self): return self.MD_MediumNameCode
    def set_MD_MediumNameCode(self, MD_MediumNameCode): self.MD_MediumNameCode = MD_MediumNameCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_MediumNameCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MediumNameCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MediumNameCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MediumNameCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MediumNameCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MediumNameCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_MediumNameCode is not None:
            self.MD_MediumNameCode.export(outfile, level, namespace_='gmd:', name_='MD_MediumNameCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MediumNameCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_MediumNameCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_MediumNameCode=model_.MD_MediumNameCode(\n')
            self.MD_MediumNameCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_MediumNameCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_MediumNameCode = obj_
            obj_.original_tagname_ = 'MD_MediumNameCode'
# end class MD_MediumNameCode_PropertyType


class MD_MaintenanceInformation_Type(AbstractObject_Type):
    """Information about the scope and frequency of updating"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, maintenanceAndUpdateFrequency=None, dateOfNextUpdate=None, userDefinedMaintenanceFrequency=None, updateScope=None, updateScopeDescription=None, maintenanceNote=None, contact=None):
        self.original_tagname_ = None
        super(MD_MaintenanceInformation_Type, self).__init__(id, uuid, )
        self.maintenanceAndUpdateFrequency = maintenanceAndUpdateFrequency
        self.dateOfNextUpdate = dateOfNextUpdate
        self.userDefinedMaintenanceFrequency = userDefinedMaintenanceFrequency
        if updateScope is None:
            self.updateScope = []
        else:
            self.updateScope = updateScope
        if updateScopeDescription is None:
            self.updateScopeDescription = []
        else:
            self.updateScopeDescription = updateScopeDescription
        if maintenanceNote is None:
            self.maintenanceNote = []
        else:
            self.maintenanceNote = maintenanceNote
        if contact is None:
            self.contact = []
        else:
            self.contact = contact
    def factory(*args_, **kwargs_):
        if MD_MaintenanceInformation_Type.subclass:
            return MD_MaintenanceInformation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_MaintenanceInformation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_maintenanceAndUpdateFrequency(self): return self.maintenanceAndUpdateFrequency
    def set_maintenanceAndUpdateFrequency(self, maintenanceAndUpdateFrequency): self.maintenanceAndUpdateFrequency = maintenanceAndUpdateFrequency
    def get_dateOfNextUpdate(self): return self.dateOfNextUpdate
    def set_dateOfNextUpdate(self, dateOfNextUpdate): self.dateOfNextUpdate = dateOfNextUpdate
    def get_userDefinedMaintenanceFrequency(self): return self.userDefinedMaintenanceFrequency
    def set_userDefinedMaintenanceFrequency(self, userDefinedMaintenanceFrequency): self.userDefinedMaintenanceFrequency = userDefinedMaintenanceFrequency
    def get_updateScope(self): return self.updateScope
    def set_updateScope(self, updateScope): self.updateScope = updateScope
    def add_updateScope(self, value): self.updateScope.append(value)
    def insert_updateScope_at(self, index, value): self.updateScope.insert(index, value)
    def replace_updateScope_at(self, index, value): self.updateScope[index] = value
    def get_updateScopeDescription(self): return self.updateScopeDescription
    def set_updateScopeDescription(self, updateScopeDescription): self.updateScopeDescription = updateScopeDescription
    def add_updateScopeDescription(self, value): self.updateScopeDescription.append(value)
    def insert_updateScopeDescription_at(self, index, value): self.updateScopeDescription.insert(index, value)
    def replace_updateScopeDescription_at(self, index, value): self.updateScopeDescription[index] = value
    def get_maintenanceNote(self): return self.maintenanceNote
    def set_maintenanceNote(self, maintenanceNote): self.maintenanceNote = maintenanceNote
    def add_maintenanceNote(self, value): self.maintenanceNote.append(value)
    def insert_maintenanceNote_at(self, index, value): self.maintenanceNote.insert(index, value)
    def replace_maintenanceNote_at(self, index, value): self.maintenanceNote[index] = value
    def get_contact(self): return self.contact
    def set_contact(self, contact): self.contact = contact
    def add_contact(self, value): self.contact.append(value)
    def insert_contact_at(self, index, value): self.contact.insert(index, value)
    def replace_contact_at(self, index, value): self.contact[index] = value
    def hasContent_(self):
        if (
            self.maintenanceAndUpdateFrequency is not None or
            self.dateOfNextUpdate is not None or
            self.userDefinedMaintenanceFrequency is not None or
            self.updateScope or
            self.updateScopeDescription or
            self.maintenanceNote or
            self.contact or
            super(MD_MaintenanceInformation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MaintenanceInformation_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MaintenanceInformation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MaintenanceInformation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MaintenanceInformation_Type'):
        super(MD_MaintenanceInformation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MaintenanceInformation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MaintenanceInformation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_MaintenanceInformation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.maintenanceAndUpdateFrequency is not None:
            self.maintenanceAndUpdateFrequency.export(outfile, level, namespace_, name_='maintenanceAndUpdateFrequency', pretty_print=pretty_print)
        if self.dateOfNextUpdate is not None:
            self.dateOfNextUpdate.export(outfile, level, namespace_, name_='dateOfNextUpdate', pretty_print=pretty_print)
        if self.userDefinedMaintenanceFrequency is not None:
            self.userDefinedMaintenanceFrequency.export(outfile, level, namespace_, name_='userDefinedMaintenanceFrequency', pretty_print=pretty_print)
        for updateScope_ in self.updateScope:
            updateScope_.export(outfile, level, namespace_, name_='updateScope', pretty_print=pretty_print)
        for updateScopeDescription_ in self.updateScopeDescription:
            updateScopeDescription_.export(outfile, level, namespace_, name_='updateScopeDescription', pretty_print=pretty_print)
        for maintenanceNote_ in self.maintenanceNote:
            maintenanceNote_.export(outfile, level, namespace_, name_='maintenanceNote', pretty_print=pretty_print)
        for contact_ in self.contact:
            contact_.export(outfile, level, namespace_, name_='contact', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MaintenanceInformation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_MaintenanceInformation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_MaintenanceInformation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.maintenanceAndUpdateFrequency is not None:
            showIndent(outfile, level)
            outfile.write('maintenanceAndUpdateFrequency=model_.MD_MaintenanceFrequencyCode_PropertyType(\n')
            self.maintenanceAndUpdateFrequency.exportLiteral(outfile, level, name_='maintenanceAndUpdateFrequency')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dateOfNextUpdate is not None:
            showIndent(outfile, level)
            outfile.write('dateOfNextUpdate=model_.Date_PropertyType(\n')
            self.dateOfNextUpdate.exportLiteral(outfile, level, name_='dateOfNextUpdate')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.userDefinedMaintenanceFrequency is not None:
            showIndent(outfile, level)
            outfile.write('userDefinedMaintenanceFrequency=model_.TM_PeriodDuration_PropertyType(\n')
            self.userDefinedMaintenanceFrequency.exportLiteral(outfile, level, name_='userDefinedMaintenanceFrequency')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('updateScope=[\n')
        level += 1
        for updateScope_ in self.updateScope:
            showIndent(outfile, level)
            outfile.write('model_.MD_ScopeCode_PropertyType(\n')
            updateScope_.exportLiteral(outfile, level, name_='MD_ScopeCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('updateScopeDescription=[\n')
        level += 1
        for updateScopeDescription_ in self.updateScopeDescription:
            showIndent(outfile, level)
            outfile.write('model_.MD_ScopeDescription_PropertyType(\n')
            updateScopeDescription_.exportLiteral(outfile, level, name_='MD_ScopeDescription_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('maintenanceNote=[\n')
        level += 1
        for maintenanceNote_ in self.maintenanceNote:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            maintenanceNote_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('contact=[\n')
        level += 1
        for contact_ in self.contact:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            contact_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_MaintenanceInformation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'maintenanceAndUpdateFrequency':
            obj_ = MD_MaintenanceFrequencyCode_PropertyType.factory()
            obj_.build(child_)
            self.maintenanceAndUpdateFrequency = obj_
            obj_.original_tagname_ = 'maintenanceAndUpdateFrequency'
        elif nodeName_ == 'dateOfNextUpdate':
            obj_ = Date_PropertyType.factory()
            obj_.build(child_)
            self.dateOfNextUpdate = obj_
            obj_.original_tagname_ = 'dateOfNextUpdate'
        elif nodeName_ == 'userDefinedMaintenanceFrequency':
            obj_ = TM_PeriodDuration_PropertyType.factory()
            obj_.build(child_)
            self.userDefinedMaintenanceFrequency = obj_
            obj_.original_tagname_ = 'userDefinedMaintenanceFrequency'
        elif nodeName_ == 'updateScope':
            obj_ = MD_ScopeCode_PropertyType.factory()
            obj_.build(child_)
            self.updateScope.append(obj_)
            obj_.original_tagname_ = 'updateScope'
        elif nodeName_ == 'updateScopeDescription':
            obj_ = MD_ScopeDescription_PropertyType.factory()
            obj_.build(child_)
            self.updateScopeDescription.append(obj_)
            obj_.original_tagname_ = 'updateScopeDescription'
        elif nodeName_ == 'maintenanceNote':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.maintenanceNote.append(obj_)
            obj_.original_tagname_ = 'maintenanceNote'
        elif nodeName_ == 'contact':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.contact.append(obj_)
            obj_.original_tagname_ = 'contact'
        super(MD_MaintenanceInformation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_MaintenanceInformation_Type


class MD_MaintenanceInformation_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, MD_MaintenanceInformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.MD_MaintenanceInformation = MD_MaintenanceInformation
    def factory(*args_, **kwargs_):
        if MD_MaintenanceInformation_PropertyType.subclass:
            return MD_MaintenanceInformation_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_MaintenanceInformation_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_MaintenanceInformation(self): return self.MD_MaintenanceInformation
    def set_MD_MaintenanceInformation(self, MD_MaintenanceInformation): self.MD_MaintenanceInformation = MD_MaintenanceInformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.MD_MaintenanceInformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MaintenanceInformation_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MaintenanceInformation_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MaintenanceInformation_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MaintenanceInformation_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MaintenanceInformation_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_MaintenanceInformation is not None:
            self.MD_MaintenanceInformation.export(outfile, level, namespace_='gmd:', name_='MD_MaintenanceInformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MaintenanceInformation_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_MaintenanceInformation is not None:
            showIndent(outfile, level)
            outfile.write('MD_MaintenanceInformation=model_.MD_MaintenanceInformation(\n')
            self.MD_MaintenanceInformation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_MaintenanceInformation':
            obj_ = MD_MaintenanceInformation_Type.factory()
            obj_.build(child_)
            self.MD_MaintenanceInformation = obj_
            obj_.original_tagname_ = 'MD_MaintenanceInformation'
# end class MD_MaintenanceInformation_PropertyType


class MD_ScopeDescription_Type(GeneratedsSuper):
    """Description of the class of information covered by the information"""
    subclass = None
    superclass = None
    def __init__(self, attributes=None, features=None, featureInstances=None, attributeInstances=None, dataset=None, other=None):
        self.original_tagname_ = None
        if attributes is None:
            self.attributes = []
        else:
            self.attributes = attributes
        if features is None:
            self.features = []
        else:
            self.features = features
        if featureInstances is None:
            self.featureInstances = []
        else:
            self.featureInstances = featureInstances
        if attributeInstances is None:
            self.attributeInstances = []
        else:
            self.attributeInstances = attributeInstances
        self.dataset = dataset
        self.other = other
    def factory(*args_, **kwargs_):
        if MD_ScopeDescription_Type.subclass:
            return MD_ScopeDescription_Type.subclass(*args_, **kwargs_)
        else:
            return MD_ScopeDescription_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_attributes(self): return self.attributes
    def set_attributes(self, attributes): self.attributes = attributes
    def add_attributes(self, value): self.attributes.append(value)
    def insert_attributes_at(self, index, value): self.attributes.insert(index, value)
    def replace_attributes_at(self, index, value): self.attributes[index] = value
    def get_features(self): return self.features
    def set_features(self, features): self.features = features
    def add_features(self, value): self.features.append(value)
    def insert_features_at(self, index, value): self.features.insert(index, value)
    def replace_features_at(self, index, value): self.features[index] = value
    def get_featureInstances(self): return self.featureInstances
    def set_featureInstances(self, featureInstances): self.featureInstances = featureInstances
    def add_featureInstances(self, value): self.featureInstances.append(value)
    def insert_featureInstances_at(self, index, value): self.featureInstances.insert(index, value)
    def replace_featureInstances_at(self, index, value): self.featureInstances[index] = value
    def get_attributeInstances(self): return self.attributeInstances
    def set_attributeInstances(self, attributeInstances): self.attributeInstances = attributeInstances
    def add_attributeInstances(self, value): self.attributeInstances.append(value)
    def insert_attributeInstances_at(self, index, value): self.attributeInstances.insert(index, value)
    def replace_attributeInstances_at(self, index, value): self.attributeInstances[index] = value
    def get_dataset(self): return self.dataset
    def set_dataset(self, dataset): self.dataset = dataset
    def get_other(self): return self.other
    def set_other(self, other): self.other = other
    def hasContent_(self):
        if (
            self.attributes or
            self.features or
            self.featureInstances or
            self.attributeInstances or
            self.dataset is not None or
            self.other is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ScopeDescription_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ScopeDescription_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ScopeDescription_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ScopeDescription_Type'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ScopeDescription_Type', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for attributes_ in self.attributes:
            attributes_.export(outfile, level, namespace_, name_='attributes', pretty_print=pretty_print)
        for features_ in self.features:
            features_.export(outfile, level, namespace_, name_='features', pretty_print=pretty_print)
        for featureInstances_ in self.featureInstances:
            featureInstances_.export(outfile, level, namespace_, name_='featureInstances', pretty_print=pretty_print)
        for attributeInstances_ in self.attributeInstances:
            attributeInstances_.export(outfile, level, namespace_, name_='attributeInstances', pretty_print=pretty_print)
        if self.dataset is not None:
            self.dataset.export(outfile, level, namespace_, name_='dataset', pretty_print=pretty_print)
        if self.other is not None:
            self.other.export(outfile, level, namespace_, name_='other', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ScopeDescription_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('attributes=[\n')
        level += 1
        for attributes_ in self.attributes:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            attributes_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('features=[\n')
        level += 1
        for features_ in self.features:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            features_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('featureInstances=[\n')
        level += 1
        for featureInstances_ in self.featureInstances:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            featureInstances_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('attributeInstances=[\n')
        level += 1
        for attributeInstances_ in self.attributeInstances:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            attributeInstances_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.dataset is not None:
            showIndent(outfile, level)
            outfile.write('dataset=model_.CharacterString_PropertyType(\n')
            self.dataset.exportLiteral(outfile, level, name_='dataset')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.other is not None:
            showIndent(outfile, level)
            outfile.write('other=model_.CharacterString_PropertyType(\n')
            self.other.exportLiteral(outfile, level, name_='other')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'attributes':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.attributes.append(obj_)
            obj_.original_tagname_ = 'attributes'
        elif nodeName_ == 'features':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.features.append(obj_)
            obj_.original_tagname_ = 'features'
        elif nodeName_ == 'featureInstances':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.featureInstances.append(obj_)
            obj_.original_tagname_ = 'featureInstances'
        elif nodeName_ == 'attributeInstances':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.attributeInstances.append(obj_)
            obj_.original_tagname_ = 'attributeInstances'
        elif nodeName_ == 'dataset':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.dataset = obj_
            obj_.original_tagname_ = 'dataset'
        elif nodeName_ == 'other':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.other = obj_
            obj_.original_tagname_ = 'other'
# end class MD_ScopeDescription_Type


class MD_ScopeDescription_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_ScopeDescription=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_ScopeDescription = MD_ScopeDescription
    def factory(*args_, **kwargs_):
        if MD_ScopeDescription_PropertyType.subclass:
            return MD_ScopeDescription_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ScopeDescription_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ScopeDescription(self): return self.MD_ScopeDescription
    def set_MD_ScopeDescription(self, MD_ScopeDescription): self.MD_ScopeDescription = MD_ScopeDescription
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_ScopeDescription is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ScopeDescription_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ScopeDescription_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ScopeDescription_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ScopeDescription_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ScopeDescription_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ScopeDescription is not None:
            self.MD_ScopeDescription.export(outfile, level, namespace_='gmd:', name_='MD_ScopeDescription', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ScopeDescription_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ScopeDescription is not None:
            showIndent(outfile, level)
            outfile.write('MD_ScopeDescription=model_.MD_ScopeDescription(\n')
            self.MD_ScopeDescription.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ScopeDescription':
            obj_ = MD_ScopeDescription_Type.factory()
            obj_.build(child_)
            self.MD_ScopeDescription = obj_
            obj_.original_tagname_ = 'MD_ScopeDescription'
# end class MD_ScopeDescription_PropertyType


class MD_MaintenanceFrequencyCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_MaintenanceFrequencyCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_MaintenanceFrequencyCode = MD_MaintenanceFrequencyCode
    def factory(*args_, **kwargs_):
        if MD_MaintenanceFrequencyCode_PropertyType.subclass:
            return MD_MaintenanceFrequencyCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_MaintenanceFrequencyCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_MaintenanceFrequencyCode(self): return self.MD_MaintenanceFrequencyCode
    def set_MD_MaintenanceFrequencyCode(self, MD_MaintenanceFrequencyCode): self.MD_MaintenanceFrequencyCode = MD_MaintenanceFrequencyCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_MaintenanceFrequencyCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_MaintenanceFrequencyCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_MaintenanceFrequencyCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_MaintenanceFrequencyCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_MaintenanceFrequencyCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_MaintenanceFrequencyCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_MaintenanceFrequencyCode is not None:
            self.MD_MaintenanceFrequencyCode.export(outfile, level, namespace_='gmd:', name_='MD_MaintenanceFrequencyCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_MaintenanceFrequencyCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_MaintenanceFrequencyCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_MaintenanceFrequencyCode=model_.MD_MaintenanceFrequencyCode(\n')
            self.MD_MaintenanceFrequencyCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_MaintenanceFrequencyCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_MaintenanceFrequencyCode = obj_
            obj_.original_tagname_ = 'MD_MaintenanceFrequencyCode'
# end class MD_MaintenanceFrequencyCode_PropertyType


class MD_ScopeCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, MD_ScopeCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.MD_ScopeCode = MD_ScopeCode
    def factory(*args_, **kwargs_):
        if MD_ScopeCode_PropertyType.subclass:
            return MD_ScopeCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return MD_ScopeCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_MD_ScopeCode(self): return self.MD_ScopeCode
    def set_MD_ScopeCode(self, MD_ScopeCode): self.MD_ScopeCode = MD_ScopeCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.MD_ScopeCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ScopeCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ScopeCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ScopeCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ScopeCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ScopeCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.MD_ScopeCode is not None:
            self.MD_ScopeCode.export(outfile, level, namespace_='gmd:', name_='MD_ScopeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ScopeCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.MD_ScopeCode is not None:
            showIndent(outfile, level)
            outfile.write('MD_ScopeCode=model_.MD_ScopeCode(\n')
            self.MD_ScopeCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'MD_ScopeCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.MD_ScopeCode = obj_
            obj_.original_tagname_ = 'MD_ScopeCode'
# end class MD_ScopeCode_PropertyType


class PT_FreeText_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, textGroup=None):
        self.original_tagname_ = None
        super(PT_FreeText_Type, self).__init__(id, uuid, )
        if textGroup is None:
            self.textGroup = []
        else:
            self.textGroup = textGroup
    def factory(*args_, **kwargs_):
        if PT_FreeText_Type.subclass:
            return PT_FreeText_Type.subclass(*args_, **kwargs_)
        else:
            return PT_FreeText_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_textGroup(self): return self.textGroup
    def set_textGroup(self, textGroup): self.textGroup = textGroup
    def add_textGroup(self, value): self.textGroup.append(value)
    def insert_textGroup_at(self, index, value): self.textGroup.insert(index, value)
    def replace_textGroup_at(self, index, value): self.textGroup[index] = value
    def hasContent_(self):
        if (
            self.textGroup or
            super(PT_FreeText_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PT_FreeText_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PT_FreeText_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PT_FreeText_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PT_FreeText_Type'):
        super(PT_FreeText_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PT_FreeText_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PT_FreeText_Type', fromsubclass_=False, pretty_print=True):
        super(PT_FreeText_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for textGroup_ in self.textGroup:
            textGroup_.export(outfile, level, namespace_, name_='textGroup', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PT_FreeText_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PT_FreeText_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PT_FreeText_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('textGroup=[\n')
        level += 1
        for textGroup_ in self.textGroup:
            showIndent(outfile, level)
            outfile.write('model_.LocalisedCharacterString_PropertyType(\n')
            textGroup_.exportLiteral(outfile, level, name_='LocalisedCharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PT_FreeText_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'textGroup':
            obj_ = LocalisedCharacterString_PropertyType.factory()
            obj_.build(child_)
            self.textGroup.append(obj_)
            obj_.original_tagname_ = 'textGroup'
        super(PT_FreeText_Type, self).buildChildren(child_, node, nodeName_, True)
# end class PT_FreeText_Type


class PT_FreeText_PropertyType(CharacterString_PropertyType):
    subclass = None
    superclass = CharacterString_PropertyType
    def __init__(self, nilReason=None, CharacterString=None, PT_FreeText=None):
        self.original_tagname_ = None
        super(PT_FreeText_PropertyType, self).__init__(nilReason, CharacterString, )
        self.PT_FreeText = PT_FreeText
    def factory(*args_, **kwargs_):
        if PT_FreeText_PropertyType.subclass:
            return PT_FreeText_PropertyType.subclass(*args_, **kwargs_)
        else:
            return PT_FreeText_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PT_FreeText(self): return self.PT_FreeText
    def set_PT_FreeText(self, PT_FreeText): self.PT_FreeText = PT_FreeText
    def hasContent_(self):
        if (
            self.PT_FreeText is not None or
            super(PT_FreeText_PropertyType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PT_FreeText_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PT_FreeText_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PT_FreeText_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PT_FreeText_PropertyType'):
        super(PT_FreeText_PropertyType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PT_FreeText_PropertyType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PT_FreeText_PropertyType', fromsubclass_=False, pretty_print=True):
        super(PT_FreeText_PropertyType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PT_FreeText is not None:
            self.PT_FreeText.export(outfile, level, namespace_='gmd:', name_='PT_FreeText', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PT_FreeText_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PT_FreeText_PropertyType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PT_FreeText_PropertyType, self).exportLiteralChildren(outfile, level, name_)
        if self.PT_FreeText is not None:
            showIndent(outfile, level)
            outfile.write('PT_FreeText=model_.PT_FreeText(\n')
            self.PT_FreeText.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PT_FreeText_PropertyType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PT_FreeText':
            obj_ = PT_FreeText_Type.factory()
            obj_.build(child_)
            self.PT_FreeText = obj_
            obj_.original_tagname_ = 'PT_FreeText'
        super(PT_FreeText_PropertyType, self).buildChildren(child_, node, nodeName_, True)
# end class PT_FreeText_PropertyType


class PT_Locale_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, languageCode=None, country=None, characterEncoding=None):
        self.original_tagname_ = None
        super(PT_Locale_Type, self).__init__(id, uuid, )
        self.languageCode = languageCode
        self.country = country
        self.characterEncoding = characterEncoding
    def factory(*args_, **kwargs_):
        if PT_Locale_Type.subclass:
            return PT_Locale_Type.subclass(*args_, **kwargs_)
        else:
            return PT_Locale_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_languageCode(self): return self.languageCode
    def set_languageCode(self, languageCode): self.languageCode = languageCode
    def get_country(self): return self.country
    def set_country(self, country): self.country = country
    def get_characterEncoding(self): return self.characterEncoding
    def set_characterEncoding(self, characterEncoding): self.characterEncoding = characterEncoding
    def hasContent_(self):
        if (
            self.languageCode is not None or
            self.country is not None or
            self.characterEncoding is not None or
            super(PT_Locale_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PT_Locale_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PT_Locale_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PT_Locale_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PT_Locale_Type'):
        super(PT_Locale_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PT_Locale_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PT_Locale_Type', fromsubclass_=False, pretty_print=True):
        super(PT_Locale_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.languageCode is not None:
            self.languageCode.export(outfile, level, namespace_, name_='languageCode', pretty_print=pretty_print)
        if self.country is not None:
            self.country.export(outfile, level, namespace_, name_='country', pretty_print=pretty_print)
        if self.characterEncoding is not None:
            self.characterEncoding.export(outfile, level, namespace_, name_='characterEncoding', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PT_Locale_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PT_Locale_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PT_Locale_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.languageCode is not None:
            showIndent(outfile, level)
            outfile.write('languageCode=model_.LanguageCode_PropertyType(\n')
            self.languageCode.exportLiteral(outfile, level, name_='languageCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.country is not None:
            showIndent(outfile, level)
            outfile.write('country=model_.Country_PropertyType(\n')
            self.country.exportLiteral(outfile, level, name_='country')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.characterEncoding is not None:
            showIndent(outfile, level)
            outfile.write('characterEncoding=model_.MD_CharacterSetCode_PropertyType(\n')
            self.characterEncoding.exportLiteral(outfile, level, name_='characterEncoding')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PT_Locale_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'languageCode':
            obj_ = LanguageCode_PropertyType.factory()
            obj_.build(child_)
            self.languageCode = obj_
            obj_.original_tagname_ = 'languageCode'
        elif nodeName_ == 'country':
            obj_ = Country_PropertyType.factory()
            obj_.build(child_)
            self.country = obj_
            obj_.original_tagname_ = 'country'
        elif nodeName_ == 'characterEncoding':
            obj_ = MD_CharacterSetCode_PropertyType.factory()
            obj_.build(child_)
            self.characterEncoding = obj_
            obj_.original_tagname_ = 'characterEncoding'
        super(PT_Locale_Type, self).buildChildren(child_, node, nodeName_, True)
# end class PT_Locale_Type


class PT_Locale_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, PT_Locale=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.PT_Locale = PT_Locale
    def factory(*args_, **kwargs_):
        if PT_Locale_PropertyType.subclass:
            return PT_Locale_PropertyType.subclass(*args_, **kwargs_)
        else:
            return PT_Locale_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PT_Locale(self): return self.PT_Locale
    def set_PT_Locale(self, PT_Locale): self.PT_Locale = PT_Locale
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.PT_Locale is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PT_Locale_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PT_Locale_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PT_Locale_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PT_Locale_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PT_Locale_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PT_Locale is not None:
            self.PT_Locale.export(outfile, level, namespace_='gmd:', name_='PT_Locale', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PT_Locale_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PT_Locale is not None:
            showIndent(outfile, level)
            outfile.write('PT_Locale=model_.PT_Locale(\n')
            self.PT_Locale.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PT_Locale':
            obj_ = PT_Locale_Type.factory()
            obj_.build(child_)
            self.PT_Locale = obj_
            obj_.original_tagname_ = 'PT_Locale'
# end class PT_Locale_PropertyType


class LocalisedCharacterString_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, locale=None, id=None, valueOf_=None):
        self.original_tagname_ = None
        self.locale = _cast(None, locale)
        self.id = _cast(None, id)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if LocalisedCharacterString_Type.subclass:
            return LocalisedCharacterString_Type.subclass(*args_, **kwargs_)
        else:
            return LocalisedCharacterString_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_locale(self): return self.locale
    def set_locale(self, locale): self.locale = locale
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LocalisedCharacterString_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LocalisedCharacterString_Type')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LocalisedCharacterString_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LocalisedCharacterString_Type'):
        if self.locale is not None and 'locale' not in already_processed:
            already_processed.add('locale')
            outfile.write(' locale=%s' % (quote_attrib(self.locale), ))
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (quote_attrib(self.id), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LocalisedCharacterString_Type', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='LocalisedCharacterString_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.locale is not None and 'locale' not in already_processed:
            already_processed.add('locale')
            showIndent(outfile, level)
            outfile.write('locale=%s,\n' % (self.locale,))
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id=%s,\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('locale', node)
        if value is not None and 'locale' not in already_processed:
            already_processed.add('locale')
            self.locale = value
        value = find_attr_value_('id', node)
        if value is not None and 'id' not in already_processed:
            already_processed.add('id')
            self.id = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class LocalisedCharacterString_Type


class LocalisedCharacterString_PropertyType(ObjectReference_PropertyType):
    subclass = None
    superclass = ObjectReference_PropertyType
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, LocalisedCharacterString=None):
        self.original_tagname_ = None
        super(LocalisedCharacterString_PropertyType, self).__init__(nilReason, uuidref, title, show, actuate, href, role, arcrole, type_, )
        self.LocalisedCharacterString = LocalisedCharacterString
    def factory(*args_, **kwargs_):
        if LocalisedCharacterString_PropertyType.subclass:
            return LocalisedCharacterString_PropertyType.subclass(*args_, **kwargs_)
        else:
            return LocalisedCharacterString_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LocalisedCharacterString(self): return self.LocalisedCharacterString
    def set_LocalisedCharacterString(self, LocalisedCharacterString): self.LocalisedCharacterString = LocalisedCharacterString
    def hasContent_(self):
        if (
            self.LocalisedCharacterString is not None or
            super(LocalisedCharacterString_PropertyType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LocalisedCharacterString_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LocalisedCharacterString_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LocalisedCharacterString_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LocalisedCharacterString_PropertyType'):
        super(LocalisedCharacterString_PropertyType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LocalisedCharacterString_PropertyType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LocalisedCharacterString_PropertyType', fromsubclass_=False, pretty_print=True):
        super(LocalisedCharacterString_PropertyType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LocalisedCharacterString is not None:
            self.LocalisedCharacterString.export(outfile, level, namespace_='gmd:', name_='LocalisedCharacterString', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LocalisedCharacterString_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LocalisedCharacterString_PropertyType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LocalisedCharacterString_PropertyType, self).exportLiteralChildren(outfile, level, name_)
        if self.LocalisedCharacterString is not None:
            showIndent(outfile, level)
            outfile.write('LocalisedCharacterString=model_.LocalisedCharacterString(\n')
            self.LocalisedCharacterString.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LocalisedCharacterString_PropertyType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LocalisedCharacterString':
            obj_ = LocalisedCharacterString_Type.factory()
            obj_.build(child_)
            self.LocalisedCharacterString = obj_
            obj_.original_tagname_ = 'LocalisedCharacterString'
        super(LocalisedCharacterString_PropertyType, self).buildChildren(child_, node, nodeName_, True)
# end class LocalisedCharacterString_PropertyType


class PT_LocaleContainer_Type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, description=None, locale=None, date=None, responsibleParty=None, localisedString=None):
        self.original_tagname_ = None
        self.description = description
        self.locale = locale
        if date is None:
            self.date = []
        else:
            self.date = date
        if responsibleParty is None:
            self.responsibleParty = []
        else:
            self.responsibleParty = responsibleParty
        if localisedString is None:
            self.localisedString = []
        else:
            self.localisedString = localisedString
    def factory(*args_, **kwargs_):
        if PT_LocaleContainer_Type.subclass:
            return PT_LocaleContainer_Type.subclass(*args_, **kwargs_)
        else:
            return PT_LocaleContainer_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_locale(self): return self.locale
    def set_locale(self, locale): self.locale = locale
    def get_date(self): return self.date
    def set_date(self, date): self.date = date
    def add_date(self, value): self.date.append(value)
    def insert_date_at(self, index, value): self.date.insert(index, value)
    def replace_date_at(self, index, value): self.date[index] = value
    def get_responsibleParty(self): return self.responsibleParty
    def set_responsibleParty(self, responsibleParty): self.responsibleParty = responsibleParty
    def add_responsibleParty(self, value): self.responsibleParty.append(value)
    def insert_responsibleParty_at(self, index, value): self.responsibleParty.insert(index, value)
    def replace_responsibleParty_at(self, index, value): self.responsibleParty[index] = value
    def get_localisedString(self): return self.localisedString
    def set_localisedString(self, localisedString): self.localisedString = localisedString
    def add_localisedString(self, value): self.localisedString.append(value)
    def insert_localisedString_at(self, index, value): self.localisedString.insert(index, value)
    def replace_localisedString_at(self, index, value): self.localisedString[index] = value
    def hasContent_(self):
        if (
            self.description is not None or
            self.locale is not None or
            self.date or
            self.responsibleParty or
            self.localisedString
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PT_LocaleContainer_Type', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PT_LocaleContainer_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PT_LocaleContainer_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PT_LocaleContainer_Type'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PT_LocaleContainer_Type', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.description is not None:
            self.description.export(outfile, level, namespace_, name_='description', pretty_print=pretty_print)
        if self.locale is not None:
            self.locale.export(outfile, level, namespace_, name_='locale', pretty_print=pretty_print)
        for date_ in self.date:
            date_.export(outfile, level, namespace_, name_='date', pretty_print=pretty_print)
        for responsibleParty_ in self.responsibleParty:
            responsibleParty_.export(outfile, level, namespace_, name_='responsibleParty', pretty_print=pretty_print)
        for localisedString_ in self.localisedString:
            localisedString_.export(outfile, level, namespace_, name_='localisedString', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PT_LocaleContainer_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.locale is not None:
            showIndent(outfile, level)
            outfile.write('locale=model_.PT_Locale_PropertyType(\n')
            self.locale.exportLiteral(outfile, level, name_='locale')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('date=[\n')
        level += 1
        for date_ in self.date:
            showIndent(outfile, level)
            outfile.write('model_.CI_Date_PropertyType(\n')
            date_.exportLiteral(outfile, level, name_='CI_Date_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('responsibleParty=[\n')
        level += 1
        for responsibleParty_ in self.responsibleParty:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            responsibleParty_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('localisedString=[\n')
        level += 1
        for localisedString_ in self.localisedString:
            showIndent(outfile, level)
            outfile.write('model_.LocalisedCharacterString_PropertyType(\n')
            localisedString_.exportLiteral(outfile, level, name_='LocalisedCharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'locale':
            obj_ = PT_Locale_PropertyType.factory()
            obj_.build(child_)
            self.locale = obj_
            obj_.original_tagname_ = 'locale'
        elif nodeName_ == 'date':
            obj_ = CI_Date_PropertyType.factory()
            obj_.build(child_)
            self.date.append(obj_)
            obj_.original_tagname_ = 'date'
        elif nodeName_ == 'responsibleParty':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.responsibleParty.append(obj_)
            obj_.original_tagname_ = 'responsibleParty'
        elif nodeName_ == 'localisedString':
            obj_ = LocalisedCharacterString_PropertyType.factory()
            obj_.build(child_)
            self.localisedString.append(obj_)
            obj_.original_tagname_ = 'localisedString'
# end class PT_LocaleContainer_Type


class PT_LocaleContainer_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, uuidref=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, type_=None, PT_LocaleContainer=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.uuidref = _cast(None, uuidref)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.type_ = _cast(None, type_)
        self.PT_LocaleContainer = PT_LocaleContainer
    def factory(*args_, **kwargs_):
        if PT_LocaleContainer_PropertyType.subclass:
            return PT_LocaleContainer_PropertyType.subclass(*args_, **kwargs_)
        else:
            return PT_LocaleContainer_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PT_LocaleContainer(self): return self.PT_LocaleContainer
    def set_PT_LocaleContainer(self, PT_LocaleContainer): self.PT_LocaleContainer = PT_LocaleContainer
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_uuidref(self): return self.uuidref
    def set_uuidref(self, uuidref): self.uuidref = uuidref
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.PT_LocaleContainer is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PT_LocaleContainer_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PT_LocaleContainer_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PT_LocaleContainer_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PT_LocaleContainer_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            outfile.write(' uuidref=%s' % (quote_attrib(self.uuidref), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PT_LocaleContainer_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PT_LocaleContainer is not None:
            self.PT_LocaleContainer.export(outfile, level, namespace_='gmd:', name_='PT_LocaleContainer', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PT_LocaleContainer_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
        if self.uuidref is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            showIndent(outfile, level)
            outfile.write('uuidref=%s,\n' % (self.uuidref,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PT_LocaleContainer is not None:
            showIndent(outfile, level)
            outfile.write('PT_LocaleContainer=model_.PT_LocaleContainer(\n')
            self.PT_LocaleContainer.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('uuidref', node)
        if value is not None and 'uuidref' not in already_processed:
            already_processed.add('uuidref')
            self.uuidref = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PT_LocaleContainer':
            obj_ = PT_LocaleContainer_Type.factory()
            obj_.build(child_)
            self.PT_LocaleContainer = obj_
            obj_.original_tagname_ = 'PT_LocaleContainer'
# end class PT_LocaleContainer_PropertyType


class LanguageCode_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, LanguageCode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.LanguageCode = LanguageCode
    def factory(*args_, **kwargs_):
        if LanguageCode_PropertyType.subclass:
            return LanguageCode_PropertyType.subclass(*args_, **kwargs_)
        else:
            return LanguageCode_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_LanguageCode(self): return self.LanguageCode
    def set_LanguageCode(self, LanguageCode): self.LanguageCode = LanguageCode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.LanguageCode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LanguageCode_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LanguageCode_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LanguageCode_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LanguageCode_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LanguageCode_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.LanguageCode is not None:
            self.LanguageCode.export(outfile, level, namespace_='gmd:', name_='LanguageCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LanguageCode_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.LanguageCode is not None:
            showIndent(outfile, level)
            outfile.write('LanguageCode=model_.LanguageCode(\n')
            self.LanguageCode.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'LanguageCode':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.LanguageCode = obj_
            obj_.original_tagname_ = 'LanguageCode'
# end class LanguageCode_PropertyType


class Country_PropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, Country=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.Country = Country
    def factory(*args_, **kwargs_):
        if Country_PropertyType.subclass:
            return Country_PropertyType.subclass(*args_, **kwargs_)
        else:
            return Country_PropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Country(self): return self.Country
    def set_Country(self, Country): self.Country = Country
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def hasContent_(self):
        if (
            self.Country is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Country_PropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Country_PropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Country_PropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Country_PropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (self.gds_format_string(quote_attrib(self.nilReason).encode(ExternalEncoding), input_name='nilReason'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Country_PropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Country is not None:
            self.Country.export(outfile, level, namespace_='gmd:', name_='Country', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Country_PropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason="%s",\n' % (self.nilReason,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Country is not None:
            showIndent(outfile, level)
            outfile.write('Country=model_.Country(\n')
            self.Country.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Country':
            obj_ = CodeListValue_Type.factory()
            obj_.build(child_)
            self.Country = obj_
            obj_.original_tagname_ = 'Country'
# end class Country_PropertyType


class AbstractDatumType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, anchorDefinition=None, realizationEpoch=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDatumType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.domainOfValidity = domainOfValidity
        if scope is None:
            self.scope = []
        else:
            self.scope = scope
        self.anchorDefinition = anchorDefinition
        if isinstance(realizationEpoch, string_types):
            initvalue_ = datetime_.datetime.strptime(realizationEpoch, '%Y-%m-%d').date()
        else:
            initvalue_ = realizationEpoch
        self.realizationEpoch = initvalue_
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDatumType.subclass:
            return AbstractDatumType.subclass(*args_, **kwargs_)
        else:
            return AbstractDatumType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def add_scope(self, value): self.scope.append(value)
    def insert_scope_at(self, index, value): self.scope.insert(index, value)
    def replace_scope_at(self, index, value): self.scope[index] = value
    def get_anchorDefinition(self): return self.anchorDefinition
    def set_anchorDefinition(self, anchorDefinition): self.anchorDefinition = anchorDefinition
    def get_realizationEpoch(self): return self.realizationEpoch
    def set_realizationEpoch(self, realizationEpoch): self.realizationEpoch = realizationEpoch
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.domainOfValidity is not None or
            self.scope or
            self.anchorDefinition is not None or
            self.realizationEpoch is not None or
            super(AbstractDatumType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDatumType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDatumType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDatumType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDatumType'):
        super(AbstractDatumType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDatumType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDatumType', fromsubclass_=False, pretty_print=True):
        super(AbstractDatumType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.domainOfValidity is not None:
            self.domainOfValidity.export(outfile, level, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
        for scope_ in self.scope:
            scope_.export(outfile, level, namespace_='gml:', name_='scope', pretty_print=pretty_print)
        if self.anchorDefinition is not None:
            self.anchorDefinition.export(outfile, level, namespace_='gml:', name_='anchorDefinition', pretty_print=pretty_print)
        if self.realizationEpoch is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%srealizationEpoch>%s</%srealizationEpoch>%s' % (namespace_, self.gds_format_date(self.realizationEpoch, input_name='realizationEpoch'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AbstractDatumType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDatumType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDatumType, self).exportLiteralChildren(outfile, level, name_)
        if self.domainOfValidity is not None:
            showIndent(outfile, level)
            outfile.write('domainOfValidity=model_.EX_Extent_PropertyType(\n')
            self.domainOfValidity.exportLiteral(outfile, level, name_='domainOfValidity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('scope=[\n')
        level += 1
        for scope_ in self.scope:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Scope_PropertyType(\n')
            scope_.exportLiteral(outfile, level, name_='DQ_Scope_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.anchorDefinition is not None:
            showIndent(outfile, level)
            outfile.write('anchorDefinition=model_.anchorDefinition(\n')
            self.anchorDefinition.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.realizationEpoch is not None:
            showIndent(outfile, level)
            outfile.write('realizationEpoch=model_.GeneratedsSuper.gds_parse_date("%s"),\n' % self.gds_format_date(self.realizationEpoch, input_name='realizationEpoch'))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDatumType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'domainOfValidity':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.domainOfValidity = obj_
            obj_.original_tagname_ = 'domainOfValidity'
        elif nodeName_ == 'scope':
            obj_ = DQ_Scope_PropertyType.factory()
            obj_.build(child_)
            self.scope.append(obj_)
            obj_.original_tagname_ = 'scope'
        elif nodeName_ == 'anchorDefinition':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.anchorDefinition = obj_
            obj_.original_tagname_ = 'anchorDefinition'
        elif nodeName_ == 'anchorPoint':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.anchorPoint = obj_
            obj_.original_tagname_ = 'anchorPoint'
        elif nodeName_ == 'realizationEpoch':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.realizationEpoch = dval_
        super(AbstractDatumType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractDatumType


class DatumPropertyType(GeneratedsSuper):
    """gml:DatumPropertyType is a property type for association roles to a
    datum, either referencing or containing the definition of that
    datum."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractDatum=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractDatum = AbstractDatum
    def factory(*args_, **kwargs_):
        if DatumPropertyType.subclass:
            return DatumPropertyType.subclass(*args_, **kwargs_)
        else:
            return DatumPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDatum(self): return self.AbstractDatum
    def set_AbstractDatum(self, AbstractDatum): self.AbstractDatum = AbstractDatum
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDatum is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DatumPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DatumPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DatumPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DatumPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DatumPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDatum is not None:
            self.AbstractDatum.export(outfile, level, namespace_, name_='AbstractDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DatumPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDatumType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDatumType=model_.AbstractDatumType(\n')
            self.AbstractDatumType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDatum':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDatum> element')
            self.AbstractDatum = obj_
            obj_.original_tagname_ = 'AbstractDatum'
        elif nodeName_ == 'GeodeticDatum':
            obj_ = GeodeticDatumType.factory()
            obj_.build(child_)
            self.GeodeticDatum = obj_
            obj_.original_tagname_ = 'GeodeticDatum'
        elif nodeName_ == 'EngineeringDatum':
            obj_ = EngineeringDatumType.factory()
            obj_.build(child_)
            self.EngineeringDatum = obj_
            obj_.original_tagname_ = 'EngineeringDatum'
        elif nodeName_ == 'ImageDatum':
            obj_ = ImageDatumType.factory()
            obj_.build(child_)
            self.ImageDatum = obj_
            obj_.original_tagname_ = 'ImageDatum'
        elif nodeName_ == 'VerticalDatum':
            obj_ = VerticalDatumType.factory()
            obj_.build(child_)
            self.VerticalDatum = obj_
            obj_.original_tagname_ = 'VerticalDatum'
        elif nodeName_ == 'TemporalDatum':
            obj_ = TemporalDatumType.factory()
            obj_.build(child_)
            self.TemporalDatum = obj_
            obj_.original_tagname_ = 'TemporalDatum'
# end class DatumPropertyType


class GeodeticDatumType(AbstractDatumType):
    subclass = None
    superclass = AbstractDatumType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, anchorDefinition=None, realizationEpoch=None, primeMeridian=None, ellipsoid=None):
        self.original_tagname_ = None
        super(GeodeticDatumType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, anchorDefinition, realizationEpoch, )
        self.primeMeridian = primeMeridian
        self.ellipsoid = ellipsoid
    def factory(*args_, **kwargs_):
        if GeodeticDatumType.subclass:
            return GeodeticDatumType.subclass(*args_, **kwargs_)
        else:
            return GeodeticDatumType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_primeMeridian(self): return self.primeMeridian
    def set_primeMeridian(self, primeMeridian): self.primeMeridian = primeMeridian
    def get_ellipsoid(self): return self.ellipsoid
    def set_ellipsoid(self, ellipsoid): self.ellipsoid = ellipsoid
    def hasContent_(self):
        if (
            self.primeMeridian is not None or
            self.ellipsoid is not None or
            super(GeodeticDatumType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeodeticDatumType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeodeticDatumType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeodeticDatumType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeodeticDatumType'):
        super(GeodeticDatumType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeodeticDatumType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeodeticDatumType', fromsubclass_=False, pretty_print=True):
        super(GeodeticDatumType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.primeMeridian is not None:
            self.primeMeridian.export(outfile, level, namespace_='gml:', name_='primeMeridian', pretty_print=pretty_print)
        if self.ellipsoid is not None:
            self.ellipsoid.export(outfile, level, namespace_='gml:', name_='ellipsoid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeodeticDatumType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GeodeticDatumType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeodeticDatumType, self).exportLiteralChildren(outfile, level, name_)
        if self.primeMeridian is not None:
            showIndent(outfile, level)
            outfile.write('primeMeridian=model_.primeMeridian(\n')
            self.primeMeridian.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ellipsoid is not None:
            showIndent(outfile, level)
            outfile.write('ellipsoid=model_.ellipsoid(\n')
            self.ellipsoid.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GeodeticDatumType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'primeMeridian':
            obj_ = PrimeMeridianPropertyType.factory()
            obj_.build(child_)
            self.primeMeridian = obj_
            obj_.original_tagname_ = 'primeMeridian'
        elif nodeName_ == 'usesPrimeMeridian':
            obj_ = PrimeMeridianPropertyType.factory()
            obj_.build(child_)
            self.usesPrimeMeridian = obj_
            obj_.original_tagname_ = 'usesPrimeMeridian'
        elif nodeName_ == 'ellipsoid':
            obj_ = EllipsoidPropertyType.factory()
            obj_.build(child_)
            self.ellipsoid = obj_
            obj_.original_tagname_ = 'ellipsoid'
        elif nodeName_ == 'usesEllipsoid':
            obj_ = EllipsoidPropertyType.factory()
            obj_.build(child_)
            self.usesEllipsoid = obj_
            obj_.original_tagname_ = 'usesEllipsoid'
        super(GeodeticDatumType, self).buildChildren(child_, node, nodeName_, True)
# end class GeodeticDatumType


class GeodeticDatumPropertyType(GeneratedsSuper):
    """gml:GeodeticDatumPropertyType is a property type for association
    roles to a geodetic datum, either referencing or containing the
    definition of that datum."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, GeodeticDatum=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.GeodeticDatum = GeodeticDatum
    def factory(*args_, **kwargs_):
        if GeodeticDatumPropertyType.subclass:
            return GeodeticDatumPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeodeticDatumPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_GeodeticDatum(self): return self.GeodeticDatum
    def set_GeodeticDatum(self, GeodeticDatum): self.GeodeticDatum = GeodeticDatum
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.GeodeticDatum is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeodeticDatumPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeodeticDatumPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeodeticDatumPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeodeticDatumPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeodeticDatumPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.GeodeticDatum is not None:
            self.GeodeticDatum.export(outfile, level, namespace_='gml:', name_='GeodeticDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeodeticDatumPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.GeodeticDatum is not None:
            showIndent(outfile, level)
            outfile.write('GeodeticDatum=model_.GeodeticDatumType(\n')
            self.GeodeticDatum.exportLiteral(outfile, level, name_='GeodeticDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'GeodeticDatum':
            obj_ = GeodeticDatumType.factory()
            obj_.build(child_)
            self.GeodeticDatum = obj_
            obj_.original_tagname_ = 'GeodeticDatum'
# end class GeodeticDatumPropertyType


class EllipsoidType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, semiMajorAxis=None, secondDefiningParameter=None):
        self.original_tagname_ = None
        super(EllipsoidType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.semiMajorAxis = semiMajorAxis
        self.secondDefiningParameter = secondDefiningParameter
    def factory(*args_, **kwargs_):
        if EllipsoidType.subclass:
            return EllipsoidType.subclass(*args_, **kwargs_)
        else:
            return EllipsoidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_semiMajorAxis(self): return self.semiMajorAxis
    def set_semiMajorAxis(self, semiMajorAxis): self.semiMajorAxis = semiMajorAxis
    def get_secondDefiningParameter(self): return self.secondDefiningParameter
    def set_secondDefiningParameter(self, secondDefiningParameter): self.secondDefiningParameter = secondDefiningParameter
    def hasContent_(self):
        if (
            self.semiMajorAxis is not None or
            self.secondDefiningParameter is not None or
            super(EllipsoidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EllipsoidType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EllipsoidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EllipsoidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EllipsoidType'):
        super(EllipsoidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EllipsoidType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EllipsoidType', fromsubclass_=False, pretty_print=True):
        super(EllipsoidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.semiMajorAxis is not None:
            self.semiMajorAxis.export(outfile, level, namespace_='gml:', name_='semiMajorAxis', pretty_print=pretty_print)
        if self.secondDefiningParameter is not None:
            self.secondDefiningParameter.export(outfile, level, namespace_='gml:', name_='secondDefiningParameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EllipsoidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EllipsoidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EllipsoidType, self).exportLiteralChildren(outfile, level, name_)
        if self.semiMajorAxis is not None:
            showIndent(outfile, level)
            outfile.write('semiMajorAxis=model_.semiMajorAxis(\n')
            self.semiMajorAxis.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.secondDefiningParameter is not None:
            showIndent(outfile, level)
            outfile.write('secondDefiningParameter=model_.secondDefiningParameter(\n')
            self.secondDefiningParameter.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EllipsoidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'semiMajorAxis':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.semiMajorAxis = obj_
            obj_.original_tagname_ = 'semiMajorAxis'
        elif nodeName_ == 'secondDefiningParameter':
            obj_ = secondDefiningParameter.factory()
            obj_.build(child_)
            self.secondDefiningParameter = obj_
            obj_.original_tagname_ = 'secondDefiningParameter'
        super(EllipsoidType, self).buildChildren(child_, node, nodeName_, True)
# end class EllipsoidType


class secondDefiningParameter(GeneratedsSuper):
    """gml:secondDefiningParameter is a property containing the definition
    of the second parameter that defines the shape of an ellipsoid.
    An ellipsoid requires two defining parameters: semi-major axis
    and inverse flattening or semi-major axis and semi-minor axis.
    When the reference body is a sphere rather than an ellipsoid,
    only a single defining parameter is required, namely the radius
    of the sphere; in that case, the semi-major axis "degenerates"
    into the radius of the sphere. The inverseFlattening element
    contains the inverse flattening value of the ellipsoid. This
    value is a scale factor (or ratio). It uses gml:LengthType with
    the restriction that the unit of measure referenced by the uom
    attribute must be suitable for a scale factor, such as percent,
    permil, or parts-per-million. The semiMinorAxis element contains
    the length of the semi-minor axis of the ellipsoid. When the
    isSphere element is included, the ellipsoid is degenerate and is
    actually a sphere. The sphere is completely defined by the semi-
    major axis, which is the radius of the sphere."""
    subclass = None
    superclass = None
    def __init__(self, SecondDefiningParameter=None):
        self.original_tagname_ = None
        self.SecondDefiningParameter = SecondDefiningParameter
    def factory(*args_, **kwargs_):
        if secondDefiningParameter.subclass:
            return secondDefiningParameter.subclass(*args_, **kwargs_)
        else:
            return secondDefiningParameter(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_SecondDefiningParameter(self): return self.SecondDefiningParameter
    def set_SecondDefiningParameter(self, SecondDefiningParameter): self.SecondDefiningParameter = SecondDefiningParameter
    def hasContent_(self):
        if (
            self.SecondDefiningParameter is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='secondDefiningParameter', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='secondDefiningParameter')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='secondDefiningParameter', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='secondDefiningParameter'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='secondDefiningParameter', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.SecondDefiningParameter is not None:
            self.SecondDefiningParameter.export(outfile, level, namespace_='gml:', name_='SecondDefiningParameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='secondDefiningParameter'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.SecondDefiningParameter is not None:
            showIndent(outfile, level)
            outfile.write('SecondDefiningParameter=model_.SecondDefiningParameter(\n')
            self.SecondDefiningParameter.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'SecondDefiningParameter':
            obj_ = SecondDefiningParameter.factory()
            obj_.build(child_)
            self.SecondDefiningParameter = obj_
            obj_.original_tagname_ = 'SecondDefiningParameter'
# end class secondDefiningParameter


class SecondDefiningParameter(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, inverseFlattening=None, semiMinorAxis=None, isSphere=True):
        self.original_tagname_ = None
        self.inverseFlattening = inverseFlattening
        self.semiMinorAxis = semiMinorAxis
        self.isSphere = isSphere
    def factory(*args_, **kwargs_):
        if SecondDefiningParameter.subclass:
            return SecondDefiningParameter.subclass(*args_, **kwargs_)
        else:
            return SecondDefiningParameter(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_inverseFlattening(self): return self.inverseFlattening
    def set_inverseFlattening(self, inverseFlattening): self.inverseFlattening = inverseFlattening
    def get_semiMinorAxis(self): return self.semiMinorAxis
    def set_semiMinorAxis(self, semiMinorAxis): self.semiMinorAxis = semiMinorAxis
    def get_isSphere(self): return self.isSphere
    def set_isSphere(self, isSphere): self.isSphere = isSphere
    def hasContent_(self):
        if (
            self.inverseFlattening is not None or
            self.semiMinorAxis is not None or
            self.isSphere is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SecondDefiningParameter', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SecondDefiningParameter')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SecondDefiningParameter', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SecondDefiningParameter'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SecondDefiningParameter', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.inverseFlattening is not None:
            self.inverseFlattening.export(outfile, level, namespace_, name_='inverseFlattening', pretty_print=pretty_print)
        if self.semiMinorAxis is not None:
            self.semiMinorAxis.export(outfile, level, namespace_, name_='semiMinorAxis', pretty_print=pretty_print)
        if self.isSphere is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sisSphere>%s</%sisSphere>%s' % (namespace_, self.gds_format_boolean(self.isSphere, input_name='isSphere'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='SecondDefiningParameter'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.inverseFlattening is not None:
            showIndent(outfile, level)
            outfile.write('inverseFlattening=model_.MeasureType(\n')
            self.inverseFlattening.exportLiteral(outfile, level, name_='inverseFlattening')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.semiMinorAxis is not None:
            showIndent(outfile, level)
            outfile.write('semiMinorAxis=model_.LengthType(\n')
            self.semiMinorAxis.exportLiteral(outfile, level, name_='semiMinorAxis')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.isSphere is not None:
            showIndent(outfile, level)
            outfile.write('isSphere=%s,\n' % self.isSphere)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'inverseFlattening':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.inverseFlattening = obj_
            obj_.original_tagname_ = 'inverseFlattening'
        elif nodeName_ == 'semiMinorAxis':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.semiMinorAxis = obj_
            obj_.original_tagname_ = 'semiMinorAxis'
        elif nodeName_ == 'isSphere':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'isSphere')
            self.isSphere = ival_
# end class SecondDefiningParameter


class EllipsoidPropertyType(GeneratedsSuper):
    """gml:EllipsoidPropertyType is a property type for association roles
    to an ellipsoid, either referencing or containing the definition
    of that ellipsoid."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Ellipsoid=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Ellipsoid = Ellipsoid
    def factory(*args_, **kwargs_):
        if EllipsoidPropertyType.subclass:
            return EllipsoidPropertyType.subclass(*args_, **kwargs_)
        else:
            return EllipsoidPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Ellipsoid(self): return self.Ellipsoid
    def set_Ellipsoid(self, Ellipsoid): self.Ellipsoid = Ellipsoid
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Ellipsoid is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EllipsoidPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EllipsoidPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EllipsoidPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EllipsoidPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EllipsoidPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Ellipsoid is not None:
            self.Ellipsoid.export(outfile, level, namespace_='gml:', name_='Ellipsoid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EllipsoidPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Ellipsoid is not None:
            showIndent(outfile, level)
            outfile.write('Ellipsoid=model_.EllipsoidType(\n')
            self.Ellipsoid.exportLiteral(outfile, level, name_='Ellipsoid')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Ellipsoid':
            obj_ = EllipsoidType.factory()
            obj_.build(child_)
            self.Ellipsoid = obj_
            obj_.original_tagname_ = 'Ellipsoid'
# end class EllipsoidPropertyType


class PrimeMeridianType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, greenwichLongitude=None):
        self.original_tagname_ = None
        super(PrimeMeridianType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.greenwichLongitude = greenwichLongitude
    def factory(*args_, **kwargs_):
        if PrimeMeridianType.subclass:
            return PrimeMeridianType.subclass(*args_, **kwargs_)
        else:
            return PrimeMeridianType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_greenwichLongitude(self): return self.greenwichLongitude
    def set_greenwichLongitude(self, greenwichLongitude): self.greenwichLongitude = greenwichLongitude
    def hasContent_(self):
        if (
            self.greenwichLongitude is not None or
            super(PrimeMeridianType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PrimeMeridianType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PrimeMeridianType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PrimeMeridianType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PrimeMeridianType'):
        super(PrimeMeridianType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PrimeMeridianType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PrimeMeridianType', fromsubclass_=False, pretty_print=True):
        super(PrimeMeridianType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.greenwichLongitude is not None:
            self.greenwichLongitude.export(outfile, level, namespace_='gml:', name_='greenwichLongitude', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PrimeMeridianType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PrimeMeridianType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PrimeMeridianType, self).exportLiteralChildren(outfile, level, name_)
        if self.greenwichLongitude is not None:
            showIndent(outfile, level)
            outfile.write('greenwichLongitude=model_.greenwichLongitude(\n')
            self.greenwichLongitude.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PrimeMeridianType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'greenwichLongitude':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.greenwichLongitude = obj_
            obj_.original_tagname_ = 'greenwichLongitude'
        super(PrimeMeridianType, self).buildChildren(child_, node, nodeName_, True)
# end class PrimeMeridianType


class PrimeMeridianPropertyType(GeneratedsSuper):
    """gml:PrimeMeridianPropertyType is a property type for association
    roles to a prime meridian, either referencing or containing the
    definition of that meridian."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, PrimeMeridian=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.PrimeMeridian = PrimeMeridian
    def factory(*args_, **kwargs_):
        if PrimeMeridianPropertyType.subclass:
            return PrimeMeridianPropertyType.subclass(*args_, **kwargs_)
        else:
            return PrimeMeridianPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PrimeMeridian(self): return self.PrimeMeridian
    def set_PrimeMeridian(self, PrimeMeridian): self.PrimeMeridian = PrimeMeridian
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.PrimeMeridian is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PrimeMeridianPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PrimeMeridianPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PrimeMeridianPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PrimeMeridianPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PrimeMeridianPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PrimeMeridian is not None:
            self.PrimeMeridian.export(outfile, level, namespace_='gml:', name_='PrimeMeridian', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PrimeMeridianPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PrimeMeridian is not None:
            showIndent(outfile, level)
            outfile.write('PrimeMeridian=model_.PrimeMeridianType(\n')
            self.PrimeMeridian.exportLiteral(outfile, level, name_='PrimeMeridian')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PrimeMeridian':
            obj_ = PrimeMeridianType.factory()
            obj_.build(child_)
            self.PrimeMeridian = obj_
            obj_.original_tagname_ = 'PrimeMeridian'
# end class PrimeMeridianPropertyType


class EngineeringDatumType(AbstractDatumType):
    subclass = None
    superclass = AbstractDatumType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, anchorDefinition=None, realizationEpoch=None):
        self.original_tagname_ = None
        super(EngineeringDatumType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, anchorDefinition, realizationEpoch, )
    def factory(*args_, **kwargs_):
        if EngineeringDatumType.subclass:
            return EngineeringDatumType.subclass(*args_, **kwargs_)
        else:
            return EngineeringDatumType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(EngineeringDatumType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EngineeringDatumType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EngineeringDatumType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EngineeringDatumType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EngineeringDatumType'):
        super(EngineeringDatumType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EngineeringDatumType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EngineeringDatumType', fromsubclass_=False, pretty_print=True):
        super(EngineeringDatumType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EngineeringDatumType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EngineeringDatumType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EngineeringDatumType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EngineeringDatumType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(EngineeringDatumType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class EngineeringDatumType


class EngineeringDatumPropertyType(GeneratedsSuper):
    """gml:EngineeringDatumPropertyType is a property type for association
    roles to an engineering datum, either referencing or containing
    the definition of that datum."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, EngineeringDatum=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.EngineeringDatum = EngineeringDatum
    def factory(*args_, **kwargs_):
        if EngineeringDatumPropertyType.subclass:
            return EngineeringDatumPropertyType.subclass(*args_, **kwargs_)
        else:
            return EngineeringDatumPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_EngineeringDatum(self): return self.EngineeringDatum
    def set_EngineeringDatum(self, EngineeringDatum): self.EngineeringDatum = EngineeringDatum
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.EngineeringDatum is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EngineeringDatumPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EngineeringDatumPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EngineeringDatumPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EngineeringDatumPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EngineeringDatumPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.EngineeringDatum is not None:
            self.EngineeringDatum.export(outfile, level, namespace_='gml:', name_='EngineeringDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EngineeringDatumPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.EngineeringDatum is not None:
            showIndent(outfile, level)
            outfile.write('EngineeringDatum=model_.EngineeringDatumType(\n')
            self.EngineeringDatum.exportLiteral(outfile, level, name_='EngineeringDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'EngineeringDatum':
            obj_ = EngineeringDatumType.factory()
            obj_.build(child_)
            self.EngineeringDatum = obj_
            obj_.original_tagname_ = 'EngineeringDatum'
# end class EngineeringDatumPropertyType


class ImageDatumType(AbstractDatumType):
    subclass = None
    superclass = AbstractDatumType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, anchorDefinition=None, realizationEpoch=None, pixelInCell=None):
        self.original_tagname_ = None
        super(ImageDatumType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, anchorDefinition, realizationEpoch, )
        self.pixelInCell = pixelInCell
    def factory(*args_, **kwargs_):
        if ImageDatumType.subclass:
            return ImageDatumType.subclass(*args_, **kwargs_)
        else:
            return ImageDatumType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pixelInCell(self): return self.pixelInCell
    def set_pixelInCell(self, pixelInCell): self.pixelInCell = pixelInCell
    def hasContent_(self):
        if (
            self.pixelInCell is not None or
            super(ImageDatumType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ImageDatumType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ImageDatumType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ImageDatumType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ImageDatumType'):
        super(ImageDatumType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ImageDatumType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ImageDatumType', fromsubclass_=False, pretty_print=True):
        super(ImageDatumType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.pixelInCell is not None:
            self.pixelInCell.export(outfile, level, namespace_='gml:', name_='pixelInCell', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ImageDatumType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ImageDatumType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ImageDatumType, self).exportLiteralChildren(outfile, level, name_)
        if self.pixelInCell is not None:
            showIndent(outfile, level)
            outfile.write('pixelInCell=model_.pixelInCell(\n')
            self.pixelInCell.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ImageDatumType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pixelInCell':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.pixelInCell = obj_
            obj_.original_tagname_ = 'pixelInCell'
        super(ImageDatumType, self).buildChildren(child_, node, nodeName_, True)
# end class ImageDatumType


class ImageDatumPropertyType(GeneratedsSuper):
    """gml:ImageDatumPropertyType is a property type for association roles
    to an image datum, either referencing or containing the
    definition of that datum."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, ImageDatum=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.ImageDatum = ImageDatum
    def factory(*args_, **kwargs_):
        if ImageDatumPropertyType.subclass:
            return ImageDatumPropertyType.subclass(*args_, **kwargs_)
        else:
            return ImageDatumPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ImageDatum(self): return self.ImageDatum
    def set_ImageDatum(self, ImageDatum): self.ImageDatum = ImageDatum
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.ImageDatum is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ImageDatumPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ImageDatumPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ImageDatumPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ImageDatumPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ImageDatumPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ImageDatum is not None:
            self.ImageDatum.export(outfile, level, namespace_='gml:', name_='ImageDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ImageDatumPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ImageDatum is not None:
            showIndent(outfile, level)
            outfile.write('ImageDatum=model_.ImageDatumType(\n')
            self.ImageDatum.exportLiteral(outfile, level, name_='ImageDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ImageDatum':
            obj_ = ImageDatumType.factory()
            obj_.build(child_)
            self.ImageDatum = obj_
            obj_.original_tagname_ = 'ImageDatum'
# end class ImageDatumPropertyType


class VerticalDatumType(AbstractDatumType):
    subclass = None
    superclass = AbstractDatumType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, anchorDefinition=None, realizationEpoch=None):
        self.original_tagname_ = None
        super(VerticalDatumType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, anchorDefinition, realizationEpoch, )
    def factory(*args_, **kwargs_):
        if VerticalDatumType.subclass:
            return VerticalDatumType.subclass(*args_, **kwargs_)
        else:
            return VerticalDatumType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(VerticalDatumType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VerticalDatumType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalDatumType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VerticalDatumType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VerticalDatumType'):
        super(VerticalDatumType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalDatumType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VerticalDatumType', fromsubclass_=False, pretty_print=True):
        super(VerticalDatumType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='VerticalDatumType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(VerticalDatumType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(VerticalDatumType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(VerticalDatumType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(VerticalDatumType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class VerticalDatumType


class VerticalDatumPropertyType(GeneratedsSuper):
    """gml:VerticalDatumPropertyType is property type for association roles
    to a vertical datum, either referencing or containing the
    definition of that datum."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, VerticalDatum=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.VerticalDatum = VerticalDatum
    def factory(*args_, **kwargs_):
        if VerticalDatumPropertyType.subclass:
            return VerticalDatumPropertyType.subclass(*args_, **kwargs_)
        else:
            return VerticalDatumPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_VerticalDatum(self): return self.VerticalDatum
    def set_VerticalDatum(self, VerticalDatum): self.VerticalDatum = VerticalDatum
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.VerticalDatum is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VerticalDatumPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalDatumPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VerticalDatumPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VerticalDatumPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VerticalDatumPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.VerticalDatum is not None:
            self.VerticalDatum.export(outfile, level, namespace_='gml:', name_='VerticalDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='VerticalDatumPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.VerticalDatum is not None:
            showIndent(outfile, level)
            outfile.write('VerticalDatum=model_.VerticalDatumType(\n')
            self.VerticalDatum.exportLiteral(outfile, level, name_='VerticalDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'VerticalDatum':
            obj_ = VerticalDatumType.factory()
            obj_.build(child_)
            self.VerticalDatum = obj_
            obj_.original_tagname_ = 'VerticalDatum'
# end class VerticalDatumPropertyType


class TemporalDatumBaseType(GeneratedsSuper):
    """The TemporalDatumBaseType partially defines the origin of a temporal
    coordinate reference system. This type restricts the
    AbstractDatumType to remove the "anchorDefinition" and
    "realizationEpoch" elements."""
    subclass = None
    superclass = None
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        if metaDataProperty is None:
            self.metaDataProperty = []
        else:
            self.metaDataProperty = metaDataProperty
        self.description = description
        self.descriptionReference = descriptionReference
        self.identifier = identifier
        if name is None:
            self.name = []
        else:
            self.name = name
        self.remarks = remarks
        self.domainOfValidity = domainOfValidity
        if scope is None:
            self.scope = []
        else:
            self.scope = scope
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if TemporalDatumBaseType.subclass:
            return TemporalDatumBaseType.subclass(*args_, **kwargs_)
        else:
            return TemporalDatumBaseType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metaDataProperty(self): return self.metaDataProperty
    def set_metaDataProperty(self, metaDataProperty): self.metaDataProperty = metaDataProperty
    def add_metaDataProperty(self, value): self.metaDataProperty.append(value)
    def insert_metaDataProperty_at(self, index, value): self.metaDataProperty.insert(index, value)
    def replace_metaDataProperty_at(self, index, value): self.metaDataProperty[index] = value
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_descriptionReference(self): return self.descriptionReference
    def set_descriptionReference(self, descriptionReference): self.descriptionReference = descriptionReference
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def add_name(self, value): self.name.append(value)
    def insert_name_at(self, index, value): self.name.insert(index, value)
    def replace_name_at(self, index, value): self.name[index] = value
    def get_remarks(self): return self.remarks
    def set_remarks(self, remarks): self.remarks = remarks
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def add_scope(self, value): self.scope.append(value)
    def insert_scope_at(self, index, value): self.scope.insert(index, value)
    def replace_scope_at(self, index, value): self.scope[index] = value
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.metaDataProperty or
            self.description is not None or
            self.descriptionReference is not None or
            self.identifier is not None or
            self.name or
            self.remarks is not None or
            self.domainOfValidity is not None or
            self.scope
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalDatumBaseType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalDatumBaseType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalDatumBaseType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalDatumBaseType'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalDatumBaseType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for metaDataProperty_ in self.metaDataProperty:
            metaDataProperty_.export(outfile, level, namespace_='gml:', name_='metaDataProperty', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_='gml:', name_='description', pretty_print=pretty_print)
        if self.descriptionReference is not None:
            self.descriptionReference.export(outfile, level, namespace_='gml:', name_='descriptionReference', pretty_print=pretty_print)
        if self.identifier is not None:
            self.identifier.export(outfile, level, namespace_='gml:', name_='identifier', pretty_print=pretty_print)
        for name_ in self.name:
            name_.export(outfile, level, namespace_='gml:', name_='name', pretty_print=pretty_print)
        if self.remarks is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sremarks>%s</%sremarks>%s' % (namespace_, self.gds_format_string(quote_xml(self.remarks).encode(ExternalEncoding), input_name='remarks'), namespace_, eol_))
        if self.domainOfValidity is not None:
            self.domainOfValidity.export(outfile, level, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
        for scope_ in self.scope:
            scope_.export(outfile, level, namespace_='gml:', name_='scope', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalDatumBaseType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id="%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('metaDataProperty=[\n')
        level += 1
        for metaDataProperty_ in self.metaDataProperty:
            showIndent(outfile, level)
            outfile.write('model_.metaDataProperty(\n')
            metaDataProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptionReference is not None:
            showIndent(outfile, level)
            outfile.write('descriptionReference=model_.ReferenceType(\n')
            self.descriptionReference.exportLiteral(outfile, level, name_='descriptionReference')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.identifier is not None:
            showIndent(outfile, level)
            outfile.write('identifier=model_.MD_Identifier_PropertyType(\n')
            self.identifier.exportLiteral(outfile, level, name_='identifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('name=[\n')
        level += 1
        for name_ in self.name:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            name_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.remarks is not None:
            showIndent(outfile, level)
            outfile.write('remarks=%s,\n' % quote_python(self.remarks).encode(ExternalEncoding))
        if self.domainOfValidity is not None:
            showIndent(outfile, level)
            outfile.write('domainOfValidity=model_.EX_Extent_PropertyType(\n')
            self.domainOfValidity.exportLiteral(outfile, level, name_='domainOfValidity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('scope=[\n')
        level += 1
        for scope_ in self.scope:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Scope_PropertyType(\n')
            scope_.exportLiteral(outfile, level, name_='DQ_Scope_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metaDataProperty':
            obj_ = MetaDataPropertyType.factory()
            obj_.build(child_)
            self.metaDataProperty.append(obj_)
            obj_.original_tagname_ = 'metaDataProperty'
        elif nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'descriptionReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.descriptionReference = obj_
            obj_.original_tagname_ = 'descriptionReference'
        elif nodeName_ == 'identifier':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.identifier = obj_
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name.append(obj_)
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'remarks':
            remarks_ = child_.text
            remarks_ = self.gds_validate_string(remarks_, node, 'remarks')
            self.remarks = remarks_
        elif nodeName_ == 'domainOfValidity':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.domainOfValidity = obj_
            obj_.original_tagname_ = 'domainOfValidity'
        elif nodeName_ == 'scope':
            obj_ = DQ_Scope_PropertyType.factory()
            obj_.build(child_)
            self.scope.append(obj_)
            obj_.original_tagname_ = 'scope'
# end class TemporalDatumBaseType


class TemporalDatumPropertyType(GeneratedsSuper):
    """gml:TemporalDatumPropertyType is a property type for association
    roles to a temporal datum, either referencing or containing the
    definition of that datum."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TemporalDatum=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TemporalDatum = TemporalDatum
    def factory(*args_, **kwargs_):
        if TemporalDatumPropertyType.subclass:
            return TemporalDatumPropertyType.subclass(*args_, **kwargs_)
        else:
            return TemporalDatumPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TemporalDatum(self): return self.TemporalDatum
    def set_TemporalDatum(self, TemporalDatum): self.TemporalDatum = TemporalDatum
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TemporalDatum is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalDatumPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalDatumPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalDatumPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalDatumPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalDatumPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TemporalDatum is not None:
            self.TemporalDatum.export(outfile, level, namespace_='gml:', name_='TemporalDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalDatumPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TemporalDatum is not None:
            showIndent(outfile, level)
            outfile.write('TemporalDatum=model_.TemporalDatumType(\n')
            self.TemporalDatum.exportLiteral(outfile, level, name_='TemporalDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TemporalDatum':
            obj_ = TemporalDatumType.factory()
            obj_.build(child_)
            self.TemporalDatum = obj_
            obj_.original_tagname_ = 'TemporalDatum'
# end class TemporalDatumPropertyType


class AbstractCoordinateOperationType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, operationVersion=None, coordinateOperationAccuracy=None, sourceCRS=None, targetCRS=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractCoordinateOperationType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.domainOfValidity = domainOfValidity
        if scope is None:
            self.scope = []
        else:
            self.scope = scope
        self.operationVersion = operationVersion
        if coordinateOperationAccuracy is None:
            self.coordinateOperationAccuracy = []
        else:
            self.coordinateOperationAccuracy = coordinateOperationAccuracy
        self.sourceCRS = sourceCRS
        self.targetCRS = targetCRS
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractCoordinateOperationType.subclass:
            return AbstractCoordinateOperationType.subclass(*args_, **kwargs_)
        else:
            return AbstractCoordinateOperationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def add_scope(self, value): self.scope.append(value)
    def insert_scope_at(self, index, value): self.scope.insert(index, value)
    def replace_scope_at(self, index, value): self.scope[index] = value
    def get_operationVersion(self): return self.operationVersion
    def set_operationVersion(self, operationVersion): self.operationVersion = operationVersion
    def get_coordinateOperationAccuracy(self): return self.coordinateOperationAccuracy
    def set_coordinateOperationAccuracy(self, coordinateOperationAccuracy): self.coordinateOperationAccuracy = coordinateOperationAccuracy
    def add_coordinateOperationAccuracy(self, value): self.coordinateOperationAccuracy.append(value)
    def insert_coordinateOperationAccuracy_at(self, index, value): self.coordinateOperationAccuracy.insert(index, value)
    def replace_coordinateOperationAccuracy_at(self, index, value): self.coordinateOperationAccuracy[index] = value
    def get_sourceCRS(self): return self.sourceCRS
    def set_sourceCRS(self, sourceCRS): self.sourceCRS = sourceCRS
    def get_targetCRS(self): return self.targetCRS
    def set_targetCRS(self, targetCRS): self.targetCRS = targetCRS
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.domainOfValidity is not None or
            self.scope or
            self.operationVersion is not None or
            self.coordinateOperationAccuracy or
            self.sourceCRS is not None or
            self.targetCRS is not None or
            super(AbstractCoordinateOperationType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractCoordinateOperationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCoordinateOperationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractCoordinateOperationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractCoordinateOperationType'):
        super(AbstractCoordinateOperationType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCoordinateOperationType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractCoordinateOperationType', fromsubclass_=False, pretty_print=True):
        super(AbstractCoordinateOperationType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.domainOfValidity is not None:
            self.domainOfValidity.export(outfile, level, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
        for scope_ in self.scope:
            scope_.export(outfile, level, namespace_='gml:', name_='scope', pretty_print=pretty_print)
        if self.operationVersion is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%soperationVersion>%s</%soperationVersion>%s' % (namespace_, self.gds_format_string(quote_xml(self.operationVersion).encode(ExternalEncoding), input_name='operationVersion'), namespace_, eol_))
        for coordinateOperationAccuracy_ in self.coordinateOperationAccuracy:
            coordinateOperationAccuracy_.export(outfile, level, namespace_='gml:', name_='coordinateOperationAccuracy', pretty_print=pretty_print)
        if self.sourceCRS is not None:
            self.sourceCRS.export(outfile, level, namespace_='gml:', name_='sourceCRS', pretty_print=pretty_print)
        if self.targetCRS is not None:
            self.targetCRS.export(outfile, level, namespace_='gml:', name_='targetCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractCoordinateOperationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractCoordinateOperationType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractCoordinateOperationType, self).exportLiteralChildren(outfile, level, name_)
        if self.domainOfValidity is not None:
            showIndent(outfile, level)
            outfile.write('domainOfValidity=model_.EX_Extent_PropertyType(\n')
            self.domainOfValidity.exportLiteral(outfile, level, name_='domainOfValidity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('scope=[\n')
        level += 1
        for scope_ in self.scope:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Scope_PropertyType(\n')
            scope_.exportLiteral(outfile, level, name_='DQ_Scope_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.operationVersion is not None:
            showIndent(outfile, level)
            outfile.write('operationVersion=%s,\n' % quote_python(self.operationVersion).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('coordinateOperationAccuracy=[\n')
        level += 1
        for coordinateOperationAccuracy_ in self.coordinateOperationAccuracy:
            showIndent(outfile, level)
            outfile.write('model_.coordinateOperationAccuracy(\n')
            coordinateOperationAccuracy_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.sourceCRS is not None:
            showIndent(outfile, level)
            outfile.write('sourceCRS=model_.sourceCRS(\n')
            self.sourceCRS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.targetCRS is not None:
            showIndent(outfile, level)
            outfile.write('targetCRS=model_.targetCRS(\n')
            self.targetCRS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractCoordinateOperationType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'domainOfValidity':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.domainOfValidity = obj_
            obj_.original_tagname_ = 'domainOfValidity'
        elif nodeName_ == 'scope':
            obj_ = DQ_Scope_PropertyType.factory()
            obj_.build(child_)
            self.scope.append(obj_)
            obj_.original_tagname_ = 'scope'
        elif nodeName_ == 'operationVersion':
            operationVersion_ = child_.text
            operationVersion_ = self.gds_validate_string(operationVersion_, node, 'operationVersion')
            self.operationVersion = operationVersion_
        elif nodeName_ == 'coordinateOperationAccuracy':
            obj_ = coordinateOperationAccuracy.factory()
            obj_.build(child_)
            self.coordinateOperationAccuracy.append(obj_)
            obj_.original_tagname_ = 'coordinateOperationAccuracy'
        elif nodeName_ == 'sourceCRS':
            obj_ = CRSPropertyType.factory()
            obj_.build(child_)
            self.sourceCRS = obj_
            obj_.original_tagname_ = 'sourceCRS'
        elif nodeName_ == 'targetCRS':
            obj_ = CRSPropertyType.factory()
            obj_.build(child_)
            self.targetCRS = obj_
            obj_.original_tagname_ = 'targetCRS'
        super(AbstractCoordinateOperationType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractCoordinateOperationType


class coordinateOperationAccuracy(GeneratedsSuper):
    """gml:coordinateOperationAccuracy is an association role to a
    DQ_PositionalAccuracy object as encoded in ISO/TS 19139, either
    referencing or containing the definition of that positional
    accuracy. That object contains an estimate of the impact of this
    coordinate operation on point accuracy. That is, it gives
    position error estimates for the target coordinates of this
    coordinate operation, assuming no errors in the source
    coordinates."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractDQ_PositionalAccuracy=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractDQ_PositionalAccuracy = AbstractDQ_PositionalAccuracy
    def factory(*args_, **kwargs_):
        if coordinateOperationAccuracy.subclass:
            return coordinateOperationAccuracy.subclass(*args_, **kwargs_)
        else:
            return coordinateOperationAccuracy(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractDQ_PositionalAccuracy(self): return self.AbstractDQ_PositionalAccuracy
    def set_AbstractDQ_PositionalAccuracy(self, AbstractDQ_PositionalAccuracy): self.AbstractDQ_PositionalAccuracy = AbstractDQ_PositionalAccuracy
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractDQ_PositionalAccuracy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='coordinateOperationAccuracy', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='coordinateOperationAccuracy')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='coordinateOperationAccuracy', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='coordinateOperationAccuracy'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='coordinateOperationAccuracy', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractDQ_PositionalAccuracy is not None:
            self.AbstractDQ_PositionalAccuracy.export(outfile, level, namespace_, name_='AbstractDQ_PositionalAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='coordinateOperationAccuracy'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractDQ_PositionalAccuracy is not None:
            showIndent(outfile, level)
            outfile.write('AbstractDQ_PositionalAccuracy=model_.AbstractDQ_PositionalAccuracy(\n')
            self.AbstractDQ_PositionalAccuracy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractDQ_PositionalAccuracy':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDQ_PositionalAccuracy> element')
            self.AbstractDQ_PositionalAccuracy = obj_
            obj_.original_tagname_ = 'AbstractDQ_PositionalAccuracy'
        elif nodeName_ == 'DQ_RelativeInternalPositionalAccuracy':
            obj_ = DQ_RelativeInternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_RelativeInternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_RelativeInternalPositionalAccuracy'
        elif nodeName_ == 'DQ_GriddedDataPositionalAccuracy':
            obj_ = DQ_GriddedDataPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_GriddedDataPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_GriddedDataPositionalAccuracy'
        elif nodeName_ == 'DQ_AbsoluteExternalPositionalAccuracy':
            obj_ = DQ_AbsoluteExternalPositionalAccuracy_Type.factory()
            obj_.build(child_)
            self.DQ_AbsoluteExternalPositionalAccuracy = obj_
            obj_.original_tagname_ = 'DQ_AbsoluteExternalPositionalAccuracy'
# end class coordinateOperationAccuracy


class CoordinateOperationPropertyType(GeneratedsSuper):
    """gml:CoordinateOperationPropertyType is a property type for
    association roles to a coordinate operation, either referencing
    or containing the definition of that coordinate operation."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractCoordinateOperation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractCoordinateOperation = AbstractCoordinateOperation
    def factory(*args_, **kwargs_):
        if CoordinateOperationPropertyType.subclass:
            return CoordinateOperationPropertyType.subclass(*args_, **kwargs_)
        else:
            return CoordinateOperationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractCoordinateOperation(self): return self.AbstractCoordinateOperation
    def set_AbstractCoordinateOperation(self, AbstractCoordinateOperation): self.AbstractCoordinateOperation = AbstractCoordinateOperation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractCoordinateOperation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CoordinateOperationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CoordinateOperationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CoordinateOperationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CoordinateOperationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CoordinateOperationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractCoordinateOperation is not None:
            self.AbstractCoordinateOperation.export(outfile, level, namespace_, name_='AbstractCoordinateOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CoordinateOperationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCoordinateOperationType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCoordinateOperationType=model_.AbstractCoordinateOperationType(\n')
            self.AbstractCoordinateOperationType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractCoordinateOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoordinateOperation> element')
            self.AbstractCoordinateOperation = obj_
            obj_.original_tagname_ = 'AbstractCoordinateOperation'
        elif nodeName_ == 'AbstractSingleOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleOperation> element')
            self.AbstractSingleOperation = obj_
            obj_.original_tagname_ = 'AbstractSingleOperation'
        elif nodeName_ == 'ConcatenatedOperation':
            obj_ = ConcatenatedOperationType.factory()
            obj_.build(child_)
            self.ConcatenatedOperation = obj_
            obj_.original_tagname_ = 'ConcatenatedOperation'
        elif nodeName_ == 'PassThroughOperation':
            obj_ = PassThroughOperationType.factory()
            obj_.build(child_)
            self.PassThroughOperation = obj_
            obj_.original_tagname_ = 'PassThroughOperation'
        elif nodeName_ == 'AbstractOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractOperation> element')
            self.AbstractOperation = obj_
            obj_.original_tagname_ = 'AbstractOperation'
        elif nodeName_ == 'AbstractGeneralConversion':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralConversion> element')
            self.AbstractGeneralConversion = obj_
            obj_.original_tagname_ = 'AbstractGeneralConversion'
        elif nodeName_ == 'AbstractGeneralTransformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralTransformation> element')
            self.AbstractGeneralTransformation = obj_
            obj_.original_tagname_ = 'AbstractGeneralTransformation'
        elif nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.Conversion = obj_
            obj_.original_tagname_ = 'Conversion'
        elif nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.Transformation = obj_
            obj_.original_tagname_ = 'Transformation'
# end class CoordinateOperationPropertyType


class SingleOperationPropertyType(GeneratedsSuper):
    """gml:SingleOperationPropertyType is a property type for association
    roles to a single operation, either referencing or containing
    the definition of that single operation."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractSingleOperation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractSingleOperation = AbstractSingleOperation
    def factory(*args_, **kwargs_):
        if SingleOperationPropertyType.subclass:
            return SingleOperationPropertyType.subclass(*args_, **kwargs_)
        else:
            return SingleOperationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractSingleOperation(self): return self.AbstractSingleOperation
    def set_AbstractSingleOperation(self, AbstractSingleOperation): self.AbstractSingleOperation = AbstractSingleOperation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractSingleOperation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SingleOperationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SingleOperationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SingleOperationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SingleOperationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SingleOperationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractSingleOperation is not None:
            self.AbstractSingleOperation.export(outfile, level, namespace_, name_='AbstractSingleOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SingleOperationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCoordinateOperationType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCoordinateOperationType=model_.AbstractCoordinateOperationType(\n')
            self.AbstractCoordinateOperationType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractSingleOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleOperation> element')
            self.AbstractSingleOperation = obj_
            obj_.original_tagname_ = 'AbstractSingleOperation'
        elif nodeName_ == 'PassThroughOperation':
            obj_ = PassThroughOperationType.factory()
            obj_.build(child_)
            self.PassThroughOperation = obj_
            obj_.original_tagname_ = 'PassThroughOperation'
        elif nodeName_ == 'AbstractOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractOperation> element')
            self.AbstractOperation = obj_
            obj_.original_tagname_ = 'AbstractOperation'
        elif nodeName_ == 'AbstractGeneralConversion':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralConversion> element')
            self.AbstractGeneralConversion = obj_
            obj_.original_tagname_ = 'AbstractGeneralConversion'
        elif nodeName_ == 'AbstractGeneralTransformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralTransformation> element')
            self.AbstractGeneralTransformation = obj_
            obj_.original_tagname_ = 'AbstractGeneralTransformation'
        elif nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.Conversion = obj_
            obj_.original_tagname_ = 'Conversion'
        elif nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.Transformation = obj_
            obj_.original_tagname_ = 'Transformation'
# end class SingleOperationPropertyType


class AbstractGeneralConversionType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, coordinateOperationAccuracy=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        if metaDataProperty is None:
            self.metaDataProperty = []
        else:
            self.metaDataProperty = metaDataProperty
        self.description = description
        self.descriptionReference = descriptionReference
        self.identifier = identifier
        if name is None:
            self.name = []
        else:
            self.name = name
        self.remarks = remarks
        self.domainOfValidity = domainOfValidity
        if scope is None:
            self.scope = []
        else:
            self.scope = scope
        if coordinateOperationAccuracy is None:
            self.coordinateOperationAccuracy = []
        else:
            self.coordinateOperationAccuracy = coordinateOperationAccuracy
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeneralConversionType.subclass:
            return AbstractGeneralConversionType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralConversionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metaDataProperty(self): return self.metaDataProperty
    def set_metaDataProperty(self, metaDataProperty): self.metaDataProperty = metaDataProperty
    def add_metaDataProperty(self, value): self.metaDataProperty.append(value)
    def insert_metaDataProperty_at(self, index, value): self.metaDataProperty.insert(index, value)
    def replace_metaDataProperty_at(self, index, value): self.metaDataProperty[index] = value
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_descriptionReference(self): return self.descriptionReference
    def set_descriptionReference(self, descriptionReference): self.descriptionReference = descriptionReference
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def add_name(self, value): self.name.append(value)
    def insert_name_at(self, index, value): self.name.insert(index, value)
    def replace_name_at(self, index, value): self.name[index] = value
    def get_remarks(self): return self.remarks
    def set_remarks(self, remarks): self.remarks = remarks
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def add_scope(self, value): self.scope.append(value)
    def insert_scope_at(self, index, value): self.scope.insert(index, value)
    def replace_scope_at(self, index, value): self.scope[index] = value
    def get_coordinateOperationAccuracy(self): return self.coordinateOperationAccuracy
    def set_coordinateOperationAccuracy(self, coordinateOperationAccuracy): self.coordinateOperationAccuracy = coordinateOperationAccuracy
    def add_coordinateOperationAccuracy(self, value): self.coordinateOperationAccuracy.append(value)
    def insert_coordinateOperationAccuracy_at(self, index, value): self.coordinateOperationAccuracy.insert(index, value)
    def replace_coordinateOperationAccuracy_at(self, index, value): self.coordinateOperationAccuracy[index] = value
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.metaDataProperty or
            self.description is not None or
            self.descriptionReference is not None or
            self.identifier is not None or
            self.name or
            self.remarks is not None or
            self.domainOfValidity is not None or
            self.scope or
            self.coordinateOperationAccuracy
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralConversionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralConversionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralConversionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralConversionType'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralConversionType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for metaDataProperty_ in self.metaDataProperty:
            metaDataProperty_.export(outfile, level, namespace_='gml:', name_='metaDataProperty', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_='gml:', name_='description', pretty_print=pretty_print)
        if self.descriptionReference is not None:
            self.descriptionReference.export(outfile, level, namespace_='gml:', name_='descriptionReference', pretty_print=pretty_print)
        if self.identifier is not None:
            self.identifier.export(outfile, level, namespace_='gml:', name_='identifier', pretty_print=pretty_print)
        for name_ in self.name:
            name_.export(outfile, level, namespace_='gml:', name_='name', pretty_print=pretty_print)
        if self.remarks is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sremarks>%s</%sremarks>%s' % (namespace_, self.gds_format_string(quote_xml(self.remarks).encode(ExternalEncoding), input_name='remarks'), namespace_, eol_))
        if self.domainOfValidity is not None:
            self.domainOfValidity.export(outfile, level, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
        for scope_ in self.scope:
            scope_.export(outfile, level, namespace_='gml:', name_='scope', pretty_print=pretty_print)
        for coordinateOperationAccuracy_ in self.coordinateOperationAccuracy:
            coordinateOperationAccuracy_.export(outfile, level, namespace_='gml:', name_='coordinateOperationAccuracy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeneralConversionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id="%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('metaDataProperty=[\n')
        level += 1
        for metaDataProperty_ in self.metaDataProperty:
            showIndent(outfile, level)
            outfile.write('model_.metaDataProperty(\n')
            metaDataProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptionReference is not None:
            showIndent(outfile, level)
            outfile.write('descriptionReference=model_.ReferenceType(\n')
            self.descriptionReference.exportLiteral(outfile, level, name_='descriptionReference')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.identifier is not None:
            showIndent(outfile, level)
            outfile.write('identifier=model_.MD_Identifier_PropertyType(\n')
            self.identifier.exportLiteral(outfile, level, name_='identifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('name=[\n')
        level += 1
        for name_ in self.name:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            name_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.remarks is not None:
            showIndent(outfile, level)
            outfile.write('remarks=%s,\n' % quote_python(self.remarks).encode(ExternalEncoding))
        if self.domainOfValidity is not None:
            showIndent(outfile, level)
            outfile.write('domainOfValidity=model_.EX_Extent_PropertyType(\n')
            self.domainOfValidity.exportLiteral(outfile, level, name_='domainOfValidity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('scope=[\n')
        level += 1
        for scope_ in self.scope:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Scope_PropertyType(\n')
            scope_.exportLiteral(outfile, level, name_='DQ_Scope_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('coordinateOperationAccuracy=[\n')
        level += 1
        for coordinateOperationAccuracy_ in self.coordinateOperationAccuracy:
            showIndent(outfile, level)
            outfile.write('model_.coordinateOperationAccuracy(\n')
            coordinateOperationAccuracy_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metaDataProperty':
            obj_ = MetaDataPropertyType.factory()
            obj_.build(child_)
            self.metaDataProperty.append(obj_)
            obj_.original_tagname_ = 'metaDataProperty'
        elif nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'descriptionReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.descriptionReference = obj_
            obj_.original_tagname_ = 'descriptionReference'
        elif nodeName_ == 'identifier':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.identifier = obj_
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name.append(obj_)
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'remarks':
            remarks_ = child_.text
            remarks_ = self.gds_validate_string(remarks_, node, 'remarks')
            self.remarks = remarks_
        elif nodeName_ == 'domainOfValidity':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.domainOfValidity = obj_
            obj_.original_tagname_ = 'domainOfValidity'
        elif nodeName_ == 'scope':
            obj_ = DQ_Scope_PropertyType.factory()
            obj_.build(child_)
            self.scope.append(obj_)
            obj_.original_tagname_ = 'scope'
        elif nodeName_ == 'coordinateOperationAccuracy':
            obj_ = coordinateOperationAccuracy.factory()
            obj_.build(child_)
            self.coordinateOperationAccuracy.append(obj_)
            obj_.original_tagname_ = 'coordinateOperationAccuracy'
# end class AbstractGeneralConversionType


class GeneralConversionPropertyType(GeneratedsSuper):
    """gml:GeneralConversionPropertyType is a property type for association
    roles to a general conversion, either referencing or containing
    the definition of that conversion."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeneralConversion=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractGeneralConversion = AbstractGeneralConversion
    def factory(*args_, **kwargs_):
        if GeneralConversionPropertyType.subclass:
            return GeneralConversionPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeneralConversionPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeneralConversion(self): return self.AbstractGeneralConversion
    def set_AbstractGeneralConversion(self, AbstractGeneralConversion): self.AbstractGeneralConversion = AbstractGeneralConversion
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeneralConversion is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeneralConversionPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeneralConversionPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeneralConversionPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeneralConversionPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeneralConversionPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeneralConversion is not None:
            self.AbstractGeneralConversion.export(outfile, level, namespace_, name_='AbstractGeneralConversion', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeneralConversionPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeneralConversionType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeneralConversionType=model_.AbstractGeneralConversionType(\n')
            self.AbstractGeneralConversionType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeneralConversion':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralConversion> element')
            self.AbstractGeneralConversion = obj_
            obj_.original_tagname_ = 'AbstractGeneralConversion'
        elif nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.Conversion = obj_
            obj_.original_tagname_ = 'Conversion'
# end class GeneralConversionPropertyType


class AbstractGeneralTransformationType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, operationVersion=None, coordinateOperationAccuracy=None, sourceCRS=None, targetCRS=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        if metaDataProperty is None:
            self.metaDataProperty = []
        else:
            self.metaDataProperty = metaDataProperty
        self.description = description
        self.descriptionReference = descriptionReference
        self.identifier = identifier
        if name is None:
            self.name = []
        else:
            self.name = name
        self.remarks = remarks
        self.domainOfValidity = domainOfValidity
        if scope is None:
            self.scope = []
        else:
            self.scope = scope
        self.operationVersion = operationVersion
        if coordinateOperationAccuracy is None:
            self.coordinateOperationAccuracy = []
        else:
            self.coordinateOperationAccuracy = coordinateOperationAccuracy
        self.sourceCRS = sourceCRS
        self.targetCRS = targetCRS
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeneralTransformationType.subclass:
            return AbstractGeneralTransformationType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralTransformationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metaDataProperty(self): return self.metaDataProperty
    def set_metaDataProperty(self, metaDataProperty): self.metaDataProperty = metaDataProperty
    def add_metaDataProperty(self, value): self.metaDataProperty.append(value)
    def insert_metaDataProperty_at(self, index, value): self.metaDataProperty.insert(index, value)
    def replace_metaDataProperty_at(self, index, value): self.metaDataProperty[index] = value
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_descriptionReference(self): return self.descriptionReference
    def set_descriptionReference(self, descriptionReference): self.descriptionReference = descriptionReference
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def add_name(self, value): self.name.append(value)
    def insert_name_at(self, index, value): self.name.insert(index, value)
    def replace_name_at(self, index, value): self.name[index] = value
    def get_remarks(self): return self.remarks
    def set_remarks(self, remarks): self.remarks = remarks
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def get_scope(self): return self.scope
    def set_scope(self, scope): self.scope = scope
    def add_scope(self, value): self.scope.append(value)
    def insert_scope_at(self, index, value): self.scope.insert(index, value)
    def replace_scope_at(self, index, value): self.scope[index] = value
    def get_operationVersion(self): return self.operationVersion
    def set_operationVersion(self, operationVersion): self.operationVersion = operationVersion
    def get_coordinateOperationAccuracy(self): return self.coordinateOperationAccuracy
    def set_coordinateOperationAccuracy(self, coordinateOperationAccuracy): self.coordinateOperationAccuracy = coordinateOperationAccuracy
    def add_coordinateOperationAccuracy(self, value): self.coordinateOperationAccuracy.append(value)
    def insert_coordinateOperationAccuracy_at(self, index, value): self.coordinateOperationAccuracy.insert(index, value)
    def replace_coordinateOperationAccuracy_at(self, index, value): self.coordinateOperationAccuracy[index] = value
    def get_sourceCRS(self): return self.sourceCRS
    def set_sourceCRS(self, sourceCRS): self.sourceCRS = sourceCRS
    def get_targetCRS(self): return self.targetCRS
    def set_targetCRS(self, targetCRS): self.targetCRS = targetCRS
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.metaDataProperty or
            self.description is not None or
            self.descriptionReference is not None or
            self.identifier is not None or
            self.name or
            self.remarks is not None or
            self.domainOfValidity is not None or
            self.scope or
            self.operationVersion is not None or
            self.coordinateOperationAccuracy or
            self.sourceCRS is not None or
            self.targetCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralTransformationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralTransformationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralTransformationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralTransformationType'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralTransformationType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for metaDataProperty_ in self.metaDataProperty:
            metaDataProperty_.export(outfile, level, namespace_='gml:', name_='metaDataProperty', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_='gml:', name_='description', pretty_print=pretty_print)
        if self.descriptionReference is not None:
            self.descriptionReference.export(outfile, level, namespace_='gml:', name_='descriptionReference', pretty_print=pretty_print)
        if self.identifier is not None:
            self.identifier.export(outfile, level, namespace_='gml:', name_='identifier', pretty_print=pretty_print)
        for name_ in self.name:
            name_.export(outfile, level, namespace_='gml:', name_='name', pretty_print=pretty_print)
        if self.remarks is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sremarks>%s</%sremarks>%s' % (namespace_, self.gds_format_string(quote_xml(self.remarks).encode(ExternalEncoding), input_name='remarks'), namespace_, eol_))
        if self.domainOfValidity is not None:
            self.domainOfValidity.export(outfile, level, namespace_='gml:', name_='domainOfValidity', pretty_print=pretty_print)
        for scope_ in self.scope:
            scope_.export(outfile, level, namespace_='gml:', name_='scope', pretty_print=pretty_print)
        if self.operationVersion is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%soperationVersion>%s</%soperationVersion>%s' % ('gml:', self.gds_format_string(quote_xml(self.operationVersion).encode(ExternalEncoding), input_name='operationVersion'), 'gml:', eol_))
        for coordinateOperationAccuracy_ in self.coordinateOperationAccuracy:
            coordinateOperationAccuracy_.export(outfile, level, namespace_='gml:', name_='coordinateOperationAccuracy', pretty_print=pretty_print)
        if self.sourceCRS is not None:
            self.sourceCRS.export(outfile, level, namespace_='gml:', name_='sourceCRS', pretty_print=pretty_print)
        if self.targetCRS is not None:
            self.targetCRS.export(outfile, level, namespace_='gml:', name_='targetCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeneralTransformationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id="%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('metaDataProperty=[\n')
        level += 1
        for metaDataProperty_ in self.metaDataProperty:
            showIndent(outfile, level)
            outfile.write('model_.metaDataProperty(\n')
            metaDataProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptionReference is not None:
            showIndent(outfile, level)
            outfile.write('descriptionReference=model_.ReferenceType(\n')
            self.descriptionReference.exportLiteral(outfile, level, name_='descriptionReference')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.identifier is not None:
            showIndent(outfile, level)
            outfile.write('identifier=model_.MD_Identifier_PropertyType(\n')
            self.identifier.exportLiteral(outfile, level, name_='identifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('name=[\n')
        level += 1
        for name_ in self.name:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            name_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.remarks is not None:
            showIndent(outfile, level)
            outfile.write('remarks=%s,\n' % quote_python(self.remarks).encode(ExternalEncoding))
        if self.domainOfValidity is not None:
            showIndent(outfile, level)
            outfile.write('domainOfValidity=model_.EX_Extent_PropertyType(\n')
            self.domainOfValidity.exportLiteral(outfile, level, name_='domainOfValidity')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('scope=[\n')
        level += 1
        for scope_ in self.scope:
            showIndent(outfile, level)
            outfile.write('model_.DQ_Scope_PropertyType(\n')
            scope_.exportLiteral(outfile, level, name_='DQ_Scope_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.operationVersion is not None:
            showIndent(outfile, level)
            outfile.write('operationVersion=%s,\n' % quote_python(self.operationVersion).encode(ExternalEncoding))
        showIndent(outfile, level)
        outfile.write('coordinateOperationAccuracy=[\n')
        level += 1
        for coordinateOperationAccuracy_ in self.coordinateOperationAccuracy:
            showIndent(outfile, level)
            outfile.write('model_.coordinateOperationAccuracy(\n')
            coordinateOperationAccuracy_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.sourceCRS is not None:
            showIndent(outfile, level)
            outfile.write('sourceCRS=model_.CRSPropertyType(\n')
            self.sourceCRS.exportLiteral(outfile, level, name_='sourceCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.targetCRS is not None:
            showIndent(outfile, level)
            outfile.write('targetCRS=model_.CRSPropertyType(\n')
            self.targetCRS.exportLiteral(outfile, level, name_='targetCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metaDataProperty':
            obj_ = MetaDataPropertyType.factory()
            obj_.build(child_)
            self.metaDataProperty.append(obj_)
            obj_.original_tagname_ = 'metaDataProperty'
        elif nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'descriptionReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.descriptionReference = obj_
            obj_.original_tagname_ = 'descriptionReference'
        elif nodeName_ == 'identifier':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.identifier = obj_
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name.append(obj_)
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'remarks':
            remarks_ = child_.text
            remarks_ = self.gds_validate_string(remarks_, node, 'remarks')
            self.remarks = remarks_
        elif nodeName_ == 'domainOfValidity':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.domainOfValidity = obj_
            obj_.original_tagname_ = 'domainOfValidity'
        elif nodeName_ == 'scope':
            obj_ = DQ_Scope_PropertyType.factory()
            obj_.build(child_)
            self.scope.append(obj_)
            obj_.original_tagname_ = 'scope'
        elif nodeName_ == 'operationVersion':
            operationVersion_ = child_.text
            operationVersion_ = self.gds_validate_string(operationVersion_, node, 'operationVersion')
            self.operationVersion = operationVersion_
        elif nodeName_ == 'coordinateOperationAccuracy':
            obj_ = coordinateOperationAccuracy.factory()
            obj_.build(child_)
            self.coordinateOperationAccuracy.append(obj_)
            obj_.original_tagname_ = 'coordinateOperationAccuracy'
        elif nodeName_ == 'sourceCRS':
            obj_ = CRSPropertyType.factory()
            obj_.build(child_)
            self.sourceCRS = obj_
            obj_.original_tagname_ = 'sourceCRS'
        elif nodeName_ == 'targetCRS':
            obj_ = CRSPropertyType.factory()
            obj_.build(child_)
            self.targetCRS = obj_
            obj_.original_tagname_ = 'targetCRS'
# end class AbstractGeneralTransformationType


class GeneralTransformationPropertyType(GeneratedsSuper):
    """gml:GeneralTransformationPropertyType is a property type for
    association roles to a general transformation, either
    referencing or containing the definition of that transformation."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeneralTransformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractGeneralTransformation = AbstractGeneralTransformation
    def factory(*args_, **kwargs_):
        if GeneralTransformationPropertyType.subclass:
            return GeneralTransformationPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeneralTransformationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeneralTransformation(self): return self.AbstractGeneralTransformation
    def set_AbstractGeneralTransformation(self, AbstractGeneralTransformation): self.AbstractGeneralTransformation = AbstractGeneralTransformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeneralTransformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeneralTransformationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeneralTransformationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeneralTransformationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeneralTransformationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeneralTransformationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeneralTransformation is not None:
            self.AbstractGeneralTransformation.export(outfile, level, namespace_, name_='AbstractGeneralTransformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeneralTransformationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeneralTransformationType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeneralTransformationType=model_.AbstractGeneralTransformationType(\n')
            self.AbstractGeneralTransformationType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeneralTransformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralTransformation> element')
            self.AbstractGeneralTransformation = obj_
            obj_.original_tagname_ = 'AbstractGeneralTransformation'
        elif nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.Transformation = obj_
            obj_.original_tagname_ = 'Transformation'
# end class GeneralTransformationPropertyType


class ConcatenatedOperationType(AbstractCoordinateOperationType):
    """gml:ConcatenatedOperation is an ordered sequence of two or more
    coordinate operations. This sequence of operations is
    constrained by the requirement that the source coordinate
    reference system of step (n+1) must be the same as the target
    coordinate reference system of step (n). The source coordinate
    reference system of the first step and the target coordinate
    reference system of the last step are the source and target
    coordinate reference system associated with the concatenated
    operation. Instead of a forward operation, an inverse operation
    may be used for one or more of the operation steps mentioned
    above, if the inverse operation is uniquely defined by the
    forward operation. The gml:coordOperation property elements are
    an ordered sequence of associations to the two or more
    operations used by this concatenated operation. The
    AggregationAttributeGroup should be used to specify that the
    coordOperation associations are ordered."""
    subclass = None
    superclass = AbstractCoordinateOperationType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, operationVersion=None, coordinateOperationAccuracy=None, sourceCRS=None, targetCRS=None, aggregationType=None, coordOperation=None):
        self.original_tagname_ = None
        super(ConcatenatedOperationType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, operationVersion, coordinateOperationAccuracy, sourceCRS, targetCRS, )
        self.aggregationType = _cast(None, aggregationType)
        if coordOperation is None:
            self.coordOperation = []
        else:
            self.coordOperation = coordOperation
    def factory(*args_, **kwargs_):
        if ConcatenatedOperationType.subclass:
            return ConcatenatedOperationType.subclass(*args_, **kwargs_)
        else:
            return ConcatenatedOperationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_coordOperation(self): return self.coordOperation
    def set_coordOperation(self, coordOperation): self.coordOperation = coordOperation
    def add_coordOperation(self, value): self.coordOperation.append(value)
    def insert_coordOperation_at(self, index, value): self.coordOperation.insert(index, value)
    def replace_coordOperation_at(self, index, value): self.coordOperation[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.coordOperation or
            super(ConcatenatedOperationType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConcatenatedOperationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConcatenatedOperationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConcatenatedOperationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConcatenatedOperationType'):
        super(ConcatenatedOperationType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ConcatenatedOperationType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConcatenatedOperationType', fromsubclass_=False, pretty_print=True):
        super(ConcatenatedOperationType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for coordOperation_ in self.coordOperation:
            coordOperation_.export(outfile, level, namespace_='gml:', name_='coordOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConcatenatedOperationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(ConcatenatedOperationType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ConcatenatedOperationType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('coordOperation=[\n')
        level += 1
        for coordOperation_ in self.coordOperation:
            showIndent(outfile, level)
            outfile.write('model_.coordOperation(\n')
            coordOperation_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(ConcatenatedOperationType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'coordOperation':
            obj_ = CoordinateOperationPropertyType.factory()
            obj_.build(child_)
            self.coordOperation.append(obj_)
            obj_.original_tagname_ = 'coordOperation'
        elif nodeName_ == 'usesSingleOperation':
            obj_ = CoordinateOperationPropertyType.factory()
            obj_.build(child_)
            self.coordOperation.append(obj_)
            obj_.original_tagname_ = 'usesSingleOperation'
        elif nodeName_ == 'usesOperation':
            obj_ = CoordinateOperationPropertyType.factory()
            obj_.build(child_)
            self.coordOperation.append(obj_)
            obj_.original_tagname_ = 'usesOperation'
        super(ConcatenatedOperationType, self).buildChildren(child_, node, nodeName_, True)
# end class ConcatenatedOperationType


class ConcatenatedOperationPropertyType(GeneratedsSuper):
    """gml:ConcatenatedOperationPropertyType is a property type for
    association roles to a concatenated operation, either
    referencing or containing the definition of that concatenated
    operation."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, ConcatenatedOperation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.ConcatenatedOperation = ConcatenatedOperation
    def factory(*args_, **kwargs_):
        if ConcatenatedOperationPropertyType.subclass:
            return ConcatenatedOperationPropertyType.subclass(*args_, **kwargs_)
        else:
            return ConcatenatedOperationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ConcatenatedOperation(self): return self.ConcatenatedOperation
    def set_ConcatenatedOperation(self, ConcatenatedOperation): self.ConcatenatedOperation = ConcatenatedOperation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.ConcatenatedOperation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConcatenatedOperationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConcatenatedOperationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConcatenatedOperationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConcatenatedOperationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConcatenatedOperationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ConcatenatedOperation is not None:
            self.ConcatenatedOperation.export(outfile, level, namespace_='gml:', name_='ConcatenatedOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConcatenatedOperationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ConcatenatedOperation is not None:
            showIndent(outfile, level)
            outfile.write('ConcatenatedOperation=model_.ConcatenatedOperationType(\n')
            self.ConcatenatedOperation.exportLiteral(outfile, level, name_='ConcatenatedOperation')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ConcatenatedOperation':
            obj_ = ConcatenatedOperationType.factory()
            obj_.build(child_)
            self.ConcatenatedOperation = obj_
            obj_.original_tagname_ = 'ConcatenatedOperation'
# end class ConcatenatedOperationPropertyType


class PassThroughOperationType(AbstractCoordinateOperationType):
    subclass = None
    superclass = AbstractCoordinateOperationType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, operationVersion=None, coordinateOperationAccuracy=None, sourceCRS=None, targetCRS=None, aggregationType=None, modifiedCoordinate=None, coordOperation=None):
        self.original_tagname_ = None
        super(PassThroughOperationType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, operationVersion, coordinateOperationAccuracy, sourceCRS, targetCRS, )
        self.aggregationType = _cast(None, aggregationType)
        if modifiedCoordinate is None:
            self.modifiedCoordinate = []
        else:
            self.modifiedCoordinate = modifiedCoordinate
        self.coordOperation = coordOperation
    def factory(*args_, **kwargs_):
        if PassThroughOperationType.subclass:
            return PassThroughOperationType.subclass(*args_, **kwargs_)
        else:
            return PassThroughOperationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_modifiedCoordinate(self): return self.modifiedCoordinate
    def set_modifiedCoordinate(self, modifiedCoordinate): self.modifiedCoordinate = modifiedCoordinate
    def add_modifiedCoordinate(self, value): self.modifiedCoordinate.append(value)
    def insert_modifiedCoordinate_at(self, index, value): self.modifiedCoordinate.insert(index, value)
    def replace_modifiedCoordinate_at(self, index, value): self.modifiedCoordinate[index] = value
    def get_coordOperation(self): return self.coordOperation
    def set_coordOperation(self, coordOperation): self.coordOperation = coordOperation
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.modifiedCoordinate or
            self.coordOperation is not None or
            super(PassThroughOperationType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PassThroughOperationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PassThroughOperationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PassThroughOperationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PassThroughOperationType'):
        super(PassThroughOperationType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PassThroughOperationType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PassThroughOperationType', fromsubclass_=False, pretty_print=True):
        super(PassThroughOperationType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for modifiedCoordinate_ in self.modifiedCoordinate:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smodifiedCoordinate>%s</%smodifiedCoordinate>%s' % (namespace_, self.gds_format_integer(modifiedCoordinate_, input_name='modifiedCoordinate'), namespace_, eol_))
        if self.coordOperation is not None:
            self.coordOperation.export(outfile, level, namespace_='gml:', name_='coordOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PassThroughOperationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(PassThroughOperationType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PassThroughOperationType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('modifiedCoordinate=[\n')
        level += 1
        for modifiedCoordinate_ in self.modifiedCoordinate:
            showIndent(outfile, level)
            outfile.write('%d,\n' % modifiedCoordinate_)
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.coordOperation is not None:
            showIndent(outfile, level)
            outfile.write('coordOperation=model_.CoordinateOperationPropertyType(\n')
            self.coordOperation.exportLiteral(outfile, level, name_='coordOperation')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(PassThroughOperationType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'modifiedCoordinate':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'modifiedCoordinate')
            self.modifiedCoordinate.append(ival_)
        elif nodeName_ == 'coordOperation':
            obj_ = CoordinateOperationPropertyType.factory()
            obj_.build(child_)
            self.coordOperation = obj_
            obj_.original_tagname_ = 'coordOperation'
        elif nodeName_ == 'usesSingleOperation':
            obj_ = CoordinateOperationPropertyType.factory()
            obj_.build(child_)
            self.usesSingleOperation = obj_
            obj_.original_tagname_ = 'usesSingleOperation'
        elif nodeName_ == 'usesOperation':
            obj_ = CoordinateOperationPropertyType.factory()
            obj_.build(child_)
            self.usesOperation = obj_
            obj_.original_tagname_ = 'usesOperation'
        super(PassThroughOperationType, self).buildChildren(child_, node, nodeName_, True)
# end class PassThroughOperationType


class PassThroughOperationPropertyType(GeneratedsSuper):
    """gml:PassThroughOperationPropertyType is a property type for
    association roles to a pass through operation, either
    referencing or containing the definition of that pass through
    operation."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, PassThroughOperation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.PassThroughOperation = PassThroughOperation
    def factory(*args_, **kwargs_):
        if PassThroughOperationPropertyType.subclass:
            return PassThroughOperationPropertyType.subclass(*args_, **kwargs_)
        else:
            return PassThroughOperationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_PassThroughOperation(self): return self.PassThroughOperation
    def set_PassThroughOperation(self, PassThroughOperation): self.PassThroughOperation = PassThroughOperation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.PassThroughOperation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PassThroughOperationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PassThroughOperationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PassThroughOperationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PassThroughOperationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PassThroughOperationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.PassThroughOperation is not None:
            self.PassThroughOperation.export(outfile, level, namespace_='gml:', name_='PassThroughOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PassThroughOperationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.PassThroughOperation is not None:
            showIndent(outfile, level)
            outfile.write('PassThroughOperation=model_.PassThroughOperationType(\n')
            self.PassThroughOperation.exportLiteral(outfile, level, name_='PassThroughOperation')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'PassThroughOperation':
            obj_ = PassThroughOperationType.factory()
            obj_.build(child_)
            self.PassThroughOperation = obj_
            obj_.original_tagname_ = 'PassThroughOperation'
# end class PassThroughOperationPropertyType


class ConversionType(AbstractGeneralConversionType):
    subclass = None
    superclass = AbstractGeneralConversionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, coordinateOperationAccuracy=None, method=None, parameterValue=None):
        self.original_tagname_ = None
        super(ConversionType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, coordinateOperationAccuracy, )
        self.method = method
        if parameterValue is None:
            self.parameterValue = []
        else:
            self.parameterValue = parameterValue
    def factory(*args_, **kwargs_):
        if ConversionType.subclass:
            return ConversionType.subclass(*args_, **kwargs_)
        else:
            return ConversionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_method(self): return self.method
    def set_method(self, method): self.method = method
    def get_parameterValue(self): return self.parameterValue
    def set_parameterValue(self, parameterValue): self.parameterValue = parameterValue
    def add_parameterValue(self, value): self.parameterValue.append(value)
    def insert_parameterValue_at(self, index, value): self.parameterValue.insert(index, value)
    def replace_parameterValue_at(self, index, value): self.parameterValue[index] = value
    def hasContent_(self):
        if (
            self.method is not None or
            self.parameterValue or
            super(ConversionType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConversionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConversionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConversionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConversionType'):
        super(ConversionType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ConversionType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConversionType', fromsubclass_=False, pretty_print=True):
        super(ConversionType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.method is not None:
            self.method.export(outfile, level, namespace_='gml:', name_='method', pretty_print=pretty_print)
        for parameterValue_ in self.parameterValue:
            parameterValue_.export(outfile, level, namespace_='gml:', name_='parameterValue', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConversionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ConversionType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ConversionType, self).exportLiteralChildren(outfile, level, name_)
        if self.method is not None:
            showIndent(outfile, level)
            outfile.write('method=model_.method(\n')
            self.method.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('parameterValue=[\n')
        level += 1
        for parameterValue_ in self.parameterValue:
            showIndent(outfile, level)
            outfile.write('model_.parameterValue(\n')
            parameterValue_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ConversionType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'method':
            obj_ = OperationMethodPropertyType.factory()
            obj_.build(child_)
            self.method = obj_
            obj_.original_tagname_ = 'method'
        elif nodeName_ == 'usesMethod':
            obj_ = OperationMethodPropertyType.factory()
            obj_.build(child_)
            self.usesMethod = obj_
            obj_.original_tagname_ = 'usesMethod'
        elif nodeName_ == 'parameterValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'parameterValue'
        elif nodeName_ == 'usesValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'usesValue'
        elif nodeName_ == 'includesValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'includesValue'
        super(ConversionType, self).buildChildren(child_, node, nodeName_, True)
# end class ConversionType


class ConversionPropertyType(GeneratedsSuper):
    """gml:ConversionPropertyType is a property type for association roles
    to a concrete general-purpose conversion, either referencing or
    containing the definition of that conversion."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Conversion=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Conversion = Conversion
    def factory(*args_, **kwargs_):
        if ConversionPropertyType.subclass:
            return ConversionPropertyType.subclass(*args_, **kwargs_)
        else:
            return ConversionPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Conversion(self): return self.Conversion
    def set_Conversion(self, Conversion): self.Conversion = Conversion
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Conversion is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConversionPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConversionPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConversionPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConversionPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConversionPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Conversion is not None:
            self.Conversion.export(outfile, level, namespace_='gml:', name_='Conversion', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConversionPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Conversion is not None:
            showIndent(outfile, level)
            outfile.write('Conversion=model_.ConversionType(\n')
            self.Conversion.exportLiteral(outfile, level, name_='Conversion')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.Conversion = obj_
            obj_.original_tagname_ = 'Conversion'
# end class ConversionPropertyType


class TransformationType(AbstractGeneralTransformationType):
    subclass = None
    superclass = AbstractGeneralTransformationType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, operationVersion=None, coordinateOperationAccuracy=None, sourceCRS=None, targetCRS=None, method=None, parameterValue=None):
        self.original_tagname_ = None
        super(TransformationType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, operationVersion, coordinateOperationAccuracy, sourceCRS, targetCRS, )
        self.method = method
        if parameterValue is None:
            self.parameterValue = []
        else:
            self.parameterValue = parameterValue
    def factory(*args_, **kwargs_):
        if TransformationType.subclass:
            return TransformationType.subclass(*args_, **kwargs_)
        else:
            return TransformationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_method(self): return self.method
    def set_method(self, method): self.method = method
    def get_parameterValue(self): return self.parameterValue
    def set_parameterValue(self, parameterValue): self.parameterValue = parameterValue
    def add_parameterValue(self, value): self.parameterValue.append(value)
    def insert_parameterValue_at(self, index, value): self.parameterValue.insert(index, value)
    def replace_parameterValue_at(self, index, value): self.parameterValue[index] = value
    def hasContent_(self):
        if (
            self.method is not None or
            self.parameterValue or
            super(TransformationType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TransformationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TransformationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TransformationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TransformationType'):
        super(TransformationType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TransformationType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TransformationType', fromsubclass_=False, pretty_print=True):
        super(TransformationType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.method is not None:
            self.method.export(outfile, level, namespace_='gml:', name_='method', pretty_print=pretty_print)
        for parameterValue_ in self.parameterValue:
            parameterValue_.export(outfile, level, namespace_='gml:', name_='parameterValue', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TransformationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TransformationType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TransformationType, self).exportLiteralChildren(outfile, level, name_)
        if self.method is not None:
            showIndent(outfile, level)
            outfile.write('method=model_.OperationMethodPropertyType(\n')
            self.method.exportLiteral(outfile, level, name_='method')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('parameterValue=[\n')
        level += 1
        for parameterValue_ in self.parameterValue:
            showIndent(outfile, level)
            outfile.write('model_.AbstractGeneralParameterValuePropertyType(\n')
            parameterValue_.exportLiteral(outfile, level, name_='AbstractGeneralParameterValuePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TransformationType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'method':
            obj_ = OperationMethodPropertyType.factory()
            obj_.build(child_)
            self.method = obj_
            obj_.original_tagname_ = 'method'
        elif nodeName_ == 'usesMethod':
            obj_ = OperationMethodPropertyType.factory()
            obj_.build(child_)
            self.usesMethod = obj_
            obj_.original_tagname_ = 'usesMethod'
        elif nodeName_ == 'parameterValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'parameterValue'
        elif nodeName_ == 'usesValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'usesValue'
        elif nodeName_ == 'includesValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'includesValue'
        super(TransformationType, self).buildChildren(child_, node, nodeName_, True)
# end class TransformationType


class TransformationPropertyType(GeneratedsSuper):
    """gml:TransformationPropertyType is a property type for association
    roles to a transformation, either referencing or containing the
    definition of that transformation."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Transformation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Transformation = Transformation
    def factory(*args_, **kwargs_):
        if TransformationPropertyType.subclass:
            return TransformationPropertyType.subclass(*args_, **kwargs_)
        else:
            return TransformationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Transformation(self): return self.Transformation
    def set_Transformation(self, Transformation): self.Transformation = Transformation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Transformation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TransformationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TransformationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TransformationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TransformationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TransformationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Transformation is not None:
            self.Transformation.export(outfile, level, namespace_='gml:', name_='Transformation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TransformationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.Transformation is not None:
            showIndent(outfile, level)
            outfile.write('Transformation=model_.TransformationType(\n')
            self.Transformation.exportLiteral(outfile, level, name_='Transformation')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.Transformation = obj_
            obj_.original_tagname_ = 'Transformation'
# end class TransformationPropertyType


class AbstractGeneralParameterValueType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, extensiontype_=None):
        self.original_tagname_ = None
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeneralParameterValueType.subclass:
            return AbstractGeneralParameterValueType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralParameterValueType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralParameterValueType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralParameterValueType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralParameterValueType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralParameterValueType'):
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralParameterValueType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractGeneralParameterValueType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AbstractGeneralParameterValueType


class AbstractGeneralParameterValuePropertyType(GeneratedsSuper):
    """gml:AbstractGeneralParameterValuePropertyType is a property type for
    inline association roles to a parameter value or group of
    parameter values, always containing the values."""
    subclass = None
    superclass = None
    def __init__(self, AbstractGeneralParameterValue=None):
        self.original_tagname_ = None
        self.AbstractGeneralParameterValue = AbstractGeneralParameterValue
    def factory(*args_, **kwargs_):
        if AbstractGeneralParameterValuePropertyType.subclass:
            return AbstractGeneralParameterValuePropertyType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralParameterValuePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeneralParameterValue(self): return self.AbstractGeneralParameterValue
    def set_AbstractGeneralParameterValue(self, AbstractGeneralParameterValue): self.AbstractGeneralParameterValue = AbstractGeneralParameterValue
    def hasContent_(self):
        if (
            self.AbstractGeneralParameterValue is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralParameterValuePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralParameterValuePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralParameterValuePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralParameterValuePropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralParameterValuePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeneralParameterValue is not None:
            self.AbstractGeneralParameterValue.export(outfile, level, namespace_, name_='AbstractGeneralParameterValue', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeneralParameterValuePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeneralParameterValueType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeneralParameterValueType=model_.AbstractGeneralParameterValueType(\n')
            self.AbstractGeneralParameterValueType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeneralParameterValue':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralParameterValue> element')
            self.AbstractGeneralParameterValue = obj_
            obj_.original_tagname_ = 'AbstractGeneralParameterValue'
        elif nodeName_ == 'ParameterValue':
            obj_ = ParameterValueType.factory()
            obj_.build(child_)
            self.ParameterValue = obj_
            obj_.original_tagname_ = 'ParameterValue'
        elif nodeName_ == 'ParameterValueGroup':
            obj_ = ParameterValueGroupType.factory()
            obj_.build(child_)
            self.ParameterValueGroup = obj_
            obj_.original_tagname_ = 'ParameterValueGroup'
# end class AbstractGeneralParameterValuePropertyType


class ParameterValueType(AbstractGeneralParameterValueType):
    subclass = None
    superclass = AbstractGeneralParameterValueType
    def __init__(self, value=None, dmsAngleValue=None, stringValue=None, integerValue=None, booleanValue=None, valueList=None, integerValueList=None, valueFile=None, operationParameter=None):
        self.original_tagname_ = None
        super(ParameterValueType, self).__init__()
        self.value = value
        self.dmsAngleValue = dmsAngleValue
        self.stringValue = stringValue
        self.integerValue = integerValue
        self.booleanValue = booleanValue
        self.valueList = valueList
        self.integerValueList = integerValueList
        self.valueFile = valueFile
        self.operationParameter = operationParameter
    def factory(*args_, **kwargs_):
        if ParameterValueType.subclass:
            return ParameterValueType.subclass(*args_, **kwargs_)
        else:
            return ParameterValueType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_value(self): return self.value
    def set_value(self, value): self.value = value
    def get_dmsAngleValue(self): return self.dmsAngleValue
    def set_dmsAngleValue(self, dmsAngleValue): self.dmsAngleValue = dmsAngleValue
    def get_stringValue(self): return self.stringValue
    def set_stringValue(self, stringValue): self.stringValue = stringValue
    def get_integerValue(self): return self.integerValue
    def set_integerValue(self, integerValue): self.integerValue = integerValue
    def get_booleanValue(self): return self.booleanValue
    def set_booleanValue(self, booleanValue): self.booleanValue = booleanValue
    def get_valueList(self): return self.valueList
    def set_valueList(self, valueList): self.valueList = valueList
    def get_integerValueList(self): return self.integerValueList
    def set_integerValueList(self, integerValueList): self.integerValueList = integerValueList
    def get_valueFile(self): return self.valueFile
    def set_valueFile(self, valueFile): self.valueFile = valueFile
    def get_operationParameter(self): return self.operationParameter
    def set_operationParameter(self, operationParameter): self.operationParameter = operationParameter
    def hasContent_(self):
        if (
            self.value is not None or
            self.dmsAngleValue is not None or
            self.stringValue is not None or
            self.integerValue is not None or
            self.booleanValue is not None or
            self.valueList is not None or
            self.integerValueList is not None or
            self.valueFile is not None or
            self.operationParameter is not None or
            super(ParameterValueType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ParameterValueType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ParameterValueType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ParameterValueType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ParameterValueType'):
        super(ParameterValueType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ParameterValueType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ParameterValueType', fromsubclass_=False, pretty_print=True):
        super(ParameterValueType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.value is not None:
            self.value.export(outfile, level, namespace_='gml:', name_='value', pretty_print=pretty_print)
        if self.dmsAngleValue is not None:
            self.dmsAngleValue.export(outfile, level, namespace_='gml:', name_='dmsAngleValue', pretty_print=pretty_print)
        if self.stringValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sstringValue>%s</%sstringValue>%s' % ('gml:', self.gds_format_string(quote_xml(self.stringValue).encode(ExternalEncoding), input_name='stringValue'), 'gml:', eol_))
        if self.integerValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sintegerValue>%s</%sintegerValue>%s' % (namespace_, self.gds_format_integer(self.integerValue, input_name='integerValue'), namespace_, eol_))
        if self.booleanValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sbooleanValue>%s</%sbooleanValue>%s' % (namespace_, self.gds_format_boolean(self.booleanValue, input_name='booleanValue'), namespace_, eol_))
        if self.valueList is not None:
            self.valueList.export(outfile, level, namespace_='gml:', name_='valueList', pretty_print=pretty_print)
        if self.integerValueList is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sintegerValueList>%s</%sintegerValueList>%s' % (namespace_, self.gds_format_integer(self.integerValueList, input_name='integerValueList'), namespace_, eol_))
        if self.valueFile is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%svalueFile>%s</%svalueFile>%s' % ('gml:', self.gds_format_string(quote_xml(self.valueFile).encode(ExternalEncoding), input_name='valueFile'), 'gml:', eol_))
        if self.operationParameter is not None:
            self.operationParameter.export(outfile, level, namespace_='gml:', name_='operationParameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ParameterValueType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ParameterValueType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ParameterValueType, self).exportLiteralChildren(outfile, level, name_)
        if self.value is not None:
            showIndent(outfile, level)
            outfile.write('value=model_.Record_PropertyType(\n')
            self.value.exportLiteral(outfile, level, name_='value')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dmsAngleValue is not None:
            showIndent(outfile, level)
            outfile.write('dmsAngleValue=model_.dmsAngleValue(\n')
            self.dmsAngleValue.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.stringValue is not None:
            showIndent(outfile, level)
            outfile.write('stringValue=%s,\n' % quote_python(self.stringValue).encode(ExternalEncoding))
        if self.integerValue is not None:
            showIndent(outfile, level)
            outfile.write('integerValue=%d,\n' % self.integerValue)
        if self.booleanValue is not None:
            showIndent(outfile, level)
            outfile.write('booleanValue=%s,\n' % self.booleanValue)
        if self.valueList is not None:
            showIndent(outfile, level)
            outfile.write('valueList=model_.valueList(\n')
            self.valueList.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.integerValueList is not None:
            showIndent(outfile, level)
            outfile.write('integerValueList=%d,\n' % self.integerValueList)
        if self.valueFile is not None:
            showIndent(outfile, level)
            outfile.write('valueFile=%s,\n' % quote_python(self.valueFile).encode(ExternalEncoding))
        if self.operationParameter is not None:
            showIndent(outfile, level)
            outfile.write('operationParameter=model_.operationParameter(\n')
            self.operationParameter.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ParameterValueType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'value':
            obj_ = Record_PropertyType.factory()
            obj_.build(child_)
            self.value = obj_
            obj_.original_tagname_ = 'value'
        elif nodeName_ == 'dmsAngleValue':
            obj_ = DMSAngleType.factory()
            obj_.build(child_)
            self.dmsAngleValue = obj_
            obj_.original_tagname_ = 'dmsAngleValue'
        elif nodeName_ == 'stringValue':
            stringValue_ = child_.text
            stringValue_ = self.gds_validate_string(stringValue_, node, 'stringValue')
            self.stringValue = stringValue_
        elif nodeName_ == 'integerValue':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'integerValue')
            self.integerValue = ival_
        elif nodeName_ == 'booleanValue':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'booleanValue')
            self.booleanValue = ival_
        elif nodeName_ == 'valueList':
            obj_ = MeasureListType.factory()
            obj_.build(child_)
            self.valueList = obj_
            obj_.original_tagname_ = 'valueList'
        elif nodeName_ == 'integerValueList':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'integerValueList')
            self.integerValueList = ival_
        elif nodeName_ == 'valueFile':
            valueFile_ = child_.text
            valueFile_ = self.gds_validate_string(valueFile_, node, 'valueFile')
            self.valueFile = valueFile_
        elif nodeName_ == 'operationParameter':
            obj_ = OperationParameterPropertyType.factory()
            obj_.build(child_)
            self.operationParameter = obj_
            obj_.original_tagname_ = 'operationParameter'
        elif nodeName_ == 'valueOfParameter':
            obj_ = OperationParameterPropertyType.factory()
            obj_.build(child_)
            self.valueOfParameter = obj_
            obj_.original_tagname_ = 'valueOfParameter'
        super(ParameterValueType, self).buildChildren(child_, node, nodeName_, True)
# end class ParameterValueType


class ParameterValueGroupType(AbstractGeneralParameterValueType):
    subclass = None
    superclass = AbstractGeneralParameterValueType
    def __init__(self, parameterValue=None, group=None):
        self.original_tagname_ = None
        super(ParameterValueGroupType, self).__init__()
        if parameterValue is None:
            self.parameterValue = []
        else:
            self.parameterValue = parameterValue
        self.group = group
    def factory(*args_, **kwargs_):
        if ParameterValueGroupType.subclass:
            return ParameterValueGroupType.subclass(*args_, **kwargs_)
        else:
            return ParameterValueGroupType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_parameterValue(self): return self.parameterValue
    def set_parameterValue(self, parameterValue): self.parameterValue = parameterValue
    def add_parameterValue(self, value): self.parameterValue.append(value)
    def insert_parameterValue_at(self, index, value): self.parameterValue.insert(index, value)
    def replace_parameterValue_at(self, index, value): self.parameterValue[index] = value
    def get_group(self): return self.group
    def set_group(self, group): self.group = group
    def hasContent_(self):
        if (
            self.parameterValue or
            self.group is not None or
            super(ParameterValueGroupType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ParameterValueGroupType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ParameterValueGroupType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ParameterValueGroupType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ParameterValueGroupType'):
        super(ParameterValueGroupType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ParameterValueGroupType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ParameterValueGroupType', fromsubclass_=False, pretty_print=True):
        super(ParameterValueGroupType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for parameterValue_ in self.parameterValue:
            parameterValue_.export(outfile, level, namespace_='gml:', name_='parameterValue', pretty_print=pretty_print)
        if self.group is not None:
            self.group.export(outfile, level, namespace_='gml:', name_='group', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ParameterValueGroupType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ParameterValueGroupType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ParameterValueGroupType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('parameterValue=[\n')
        level += 1
        for parameterValue_ in self.parameterValue:
            showIndent(outfile, level)
            outfile.write('model_.AbstractGeneralParameterValuePropertyType(\n')
            parameterValue_.exportLiteral(outfile, level, name_='AbstractGeneralParameterValuePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.group is not None:
            showIndent(outfile, level)
            outfile.write('group=model_.group(\n')
            self.group.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ParameterValueGroupType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'parameterValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'parameterValue'
        elif nodeName_ == 'usesValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'usesValue'
        elif nodeName_ == 'includesValue':
            obj_ = AbstractGeneralParameterValuePropertyType.factory()
            obj_.build(child_)
            self.parameterValue.append(obj_)
            obj_.original_tagname_ = 'includesValue'
        elif nodeName_ == 'group':
            obj_ = OperationParameterGroupPropertyType.factory()
            obj_.build(child_)
            self.group = obj_
            obj_.original_tagname_ = 'group'
        elif nodeName_ == 'valuesOfGroup':
            obj_ = OperationParameterGroupPropertyType.factory()
            obj_.build(child_)
            self.valuesOfGroup = obj_
            obj_.original_tagname_ = 'valuesOfGroup'
        super(ParameterValueGroupType, self).buildChildren(child_, node, nodeName_, True)
# end class ParameterValueGroupType


class OperationMethodType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, formulaCitation=None, formula=None, sourceDimensions=None, targetDimensions=None, parameter=None):
        self.original_tagname_ = None
        super(OperationMethodType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.formulaCitation = formulaCitation
        self.formula = formula
        self.sourceDimensions = sourceDimensions
        self.targetDimensions = targetDimensions
        if parameter is None:
            self.parameter = []
        else:
            self.parameter = parameter
    def factory(*args_, **kwargs_):
        if OperationMethodType.subclass:
            return OperationMethodType.subclass(*args_, **kwargs_)
        else:
            return OperationMethodType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_formulaCitation(self): return self.formulaCitation
    def set_formulaCitation(self, formulaCitation): self.formulaCitation = formulaCitation
    def get_formula(self): return self.formula
    def set_formula(self, formula): self.formula = formula
    def get_sourceDimensions(self): return self.sourceDimensions
    def set_sourceDimensions(self, sourceDimensions): self.sourceDimensions = sourceDimensions
    def get_targetDimensions(self): return self.targetDimensions
    def set_targetDimensions(self, targetDimensions): self.targetDimensions = targetDimensions
    def get_parameter(self): return self.parameter
    def set_parameter(self, parameter): self.parameter = parameter
    def add_parameter(self, value): self.parameter.append(value)
    def insert_parameter_at(self, index, value): self.parameter.insert(index, value)
    def replace_parameter_at(self, index, value): self.parameter[index] = value
    def hasContent_(self):
        if (
            self.formulaCitation is not None or
            self.formula is not None or
            self.sourceDimensions is not None or
            self.targetDimensions is not None or
            self.parameter or
            super(OperationMethodType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationMethodType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationMethodType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationMethodType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationMethodType'):
        super(OperationMethodType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='OperationMethodType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationMethodType', fromsubclass_=False, pretty_print=True):
        super(OperationMethodType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.formulaCitation is not None:
            self.formulaCitation.export(outfile, level, namespace_='gml:', name_='formulaCitation', pretty_print=pretty_print)
        if self.formula is not None:
            self.formula.export(outfile, level, namespace_='gml:', name_='formula', pretty_print=pretty_print)
        if self.sourceDimensions is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%ssourceDimensions>%s</%ssourceDimensions>%s' % (namespace_, self.gds_format_integer(self.sourceDimensions, input_name='sourceDimensions'), namespace_, eol_))
        if self.targetDimensions is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%stargetDimensions>%s</%stargetDimensions>%s' % (namespace_, self.gds_format_integer(self.targetDimensions, input_name='targetDimensions'), namespace_, eol_))
        for parameter_ in self.parameter:
            parameter_.export(outfile, level, namespace_='gml:', name_='parameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationMethodType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(OperationMethodType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(OperationMethodType, self).exportLiteralChildren(outfile, level, name_)
        if self.formulaCitation is not None:
            showIndent(outfile, level)
            outfile.write('formulaCitation=model_.formulaCitation(\n')
            self.formulaCitation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.formula is not None:
            showIndent(outfile, level)
            outfile.write('formula=model_.FormulaType(\n')
            self.formula.exportLiteral(outfile, level, name_='formula')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.sourceDimensions is not None:
            showIndent(outfile, level)
            outfile.write('sourceDimensions=%d,\n' % self.sourceDimensions)
        if self.targetDimensions is not None:
            showIndent(outfile, level)
            outfile.write('targetDimensions=%d,\n' % self.targetDimensions)
        showIndent(outfile, level)
        outfile.write('parameter=[\n')
        level += 1
        for parameter_ in self.parameter:
            showIndent(outfile, level)
            outfile.write('model_.parameter(\n')
            parameter_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(OperationMethodType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'formulaCitation':
            obj_ = formulaCitation.factory()
            obj_.build(child_)
            self.formulaCitation = obj_
            obj_.original_tagname_ = 'formulaCitation'
        elif nodeName_ == 'formula':
            obj_ = FormulaType.factory()
            obj_.build(child_)
            self.formula = obj_
            obj_.original_tagname_ = 'formula'
        elif nodeName_ == 'methodFormula':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.methodFormula = obj_
            obj_.original_tagname_ = 'methodFormula'
        elif nodeName_ == 'sourceDimensions':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'sourceDimensions')
            self.sourceDimensions = ival_
        elif nodeName_ == 'targetDimensions':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'targetDimensions')
            self.targetDimensions = ival_
        elif nodeName_ == 'parameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.parameter.append(obj_)
            obj_.original_tagname_ = 'parameter'
        elif nodeName_ == 'includesParameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.parameter.append(obj_)
            obj_.original_tagname_ = 'includesParameter'
        elif nodeName_ == 'generalOperationParameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.parameter.append(obj_)
            obj_.original_tagname_ = 'generalOperationParameter'
        elif nodeName_ == 'usesParameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.generalOperationParameter.append(obj_)
            obj_.original_tagname_ = 'usesParameter'
        super(OperationMethodType, self).buildChildren(child_, node, nodeName_, True)
# end class OperationMethodType


class formulaCitation(GeneratedsSuper):
    """gml:formulaCitation provides a reference to a publication giving the
    formula(s) or procedure used by an coordinate operation method."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, CI_Citation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.CI_Citation = CI_Citation
    def factory(*args_, **kwargs_):
        if formulaCitation.subclass:
            return formulaCitation.subclass(*args_, **kwargs_)
        else:
            return formulaCitation(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_CI_Citation(self): return self.CI_Citation
    def set_CI_Citation(self, CI_Citation): self.CI_Citation = CI_Citation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.CI_Citation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='formulaCitation', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='formulaCitation')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='formulaCitation', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='formulaCitation'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='formulaCitation', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.CI_Citation is not None:
            self.CI_Citation.export(outfile, level, namespace_='gmd:', name_='CI_Citation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='formulaCitation'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.CI_Citation is not None:
            showIndent(outfile, level)
            outfile.write('CI_Citation=model_.CI_Citation(\n')
            self.CI_Citation.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'CI_Citation':
            obj_ = CI_Citation_Type.factory()
            obj_.build(child_)
            self.CI_Citation = obj_
            obj_.original_tagname_ = 'CI_Citation'
# end class formulaCitation


class OperationMethodPropertyType(GeneratedsSuper):
    """gml:OperationMethodPropertyType is a property type for association
    roles to a concrete general-purpose operation method, either
    referencing or containing the definition of that method."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, OperationMethod=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.OperationMethod = OperationMethod
    def factory(*args_, **kwargs_):
        if OperationMethodPropertyType.subclass:
            return OperationMethodPropertyType.subclass(*args_, **kwargs_)
        else:
            return OperationMethodPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_OperationMethod(self): return self.OperationMethod
    def set_OperationMethod(self, OperationMethod): self.OperationMethod = OperationMethod
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.OperationMethod is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationMethodPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationMethodPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationMethodPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationMethodPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationMethodPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.OperationMethod is not None:
            self.OperationMethod.export(outfile, level, namespace_='gml:', name_='OperationMethod', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationMethodPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.OperationMethod is not None:
            showIndent(outfile, level)
            outfile.write('OperationMethod=model_.OperationMethodType(\n')
            self.OperationMethod.exportLiteral(outfile, level, name_='OperationMethod')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'OperationMethod':
            obj_ = OperationMethodType.factory()
            obj_.build(child_)
            self.OperationMethod = obj_
            obj_.original_tagname_ = 'OperationMethod'
# end class OperationMethodPropertyType


class AbstractGeneralOperationParameterType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, minimumOccurs=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractGeneralOperationParameterType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.minimumOccurs = minimumOccurs
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeneralOperationParameterType.subclass:
            return AbstractGeneralOperationParameterType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralOperationParameterType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_minimumOccurs(self): return self.minimumOccurs
    def set_minimumOccurs(self, minimumOccurs): self.minimumOccurs = minimumOccurs
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.minimumOccurs is not None or
            super(AbstractGeneralOperationParameterType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralOperationParameterType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralOperationParameterType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralOperationParameterType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralOperationParameterType'):
        super(AbstractGeneralOperationParameterType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralOperationParameterType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralOperationParameterType', fromsubclass_=False, pretty_print=True):
        super(AbstractGeneralOperationParameterType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.minimumOccurs is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sminimumOccurs>%s</%sminimumOccurs>%s' % (namespace_, self.gds_format_integer(self.minimumOccurs, input_name='minimumOccurs'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='AbstractGeneralOperationParameterType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractGeneralOperationParameterType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractGeneralOperationParameterType, self).exportLiteralChildren(outfile, level, name_)
        if self.minimumOccurs is not None:
            showIndent(outfile, level)
            outfile.write('minimumOccurs=%d,\n' % self.minimumOccurs)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractGeneralOperationParameterType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'minimumOccurs':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ < 0:
                raise_parse_error(child_, 'requires nonNegativeInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'minimumOccurs')
            self.minimumOccurs = ival_
        super(AbstractGeneralOperationParameterType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractGeneralOperationParameterType


class AbstractGeneralOperationParameterPropertyType(GeneratedsSuper):
    """gml:AbstractGeneralOperationParameterPropertyType is a property type
    for association roles to an operation parameter or group, either
    referencing or containing the definition of that parameter or
    group."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeneralOperationParameter=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractGeneralOperationParameter = AbstractGeneralOperationParameter
    def factory(*args_, **kwargs_):
        if AbstractGeneralOperationParameterPropertyType.subclass:
            return AbstractGeneralOperationParameterPropertyType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralOperationParameterPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeneralOperationParameter(self): return self.AbstractGeneralOperationParameter
    def set_AbstractGeneralOperationParameter(self, AbstractGeneralOperationParameter): self.AbstractGeneralOperationParameter = AbstractGeneralOperationParameter
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractGeneralOperationParameter is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralOperationParameterPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralOperationParameterPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralOperationParameterPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralOperationParameterPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralOperationParameterPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeneralOperationParameter is not None:
            self.AbstractGeneralOperationParameter.export(outfile, level, namespace_, name_='AbstractGeneralOperationParameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeneralOperationParameterPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeneralOperationParameterType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeneralOperationParameterType=model_.AbstractGeneralOperationParameterType(\n')
            self.AbstractGeneralOperationParameterType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeneralOperationParameter':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralOperationParameter> element')
            self.AbstractGeneralOperationParameter = obj_
            obj_.original_tagname_ = 'AbstractGeneralOperationParameter'
        elif nodeName_ == 'OperationParameter':
            obj_ = OperationParameterType.factory()
            obj_.build(child_)
            self.OperationParameter = obj_
            obj_.original_tagname_ = 'OperationParameter'
        elif nodeName_ == 'OperationParameterGroup':
            obj_ = OperationParameterGroupType.factory()
            obj_.build(child_)
            self.OperationParameterGroup = obj_
            obj_.original_tagname_ = 'OperationParameterGroup'
# end class AbstractGeneralOperationParameterPropertyType


class OperationParameterType(AbstractGeneralOperationParameterType):
    subclass = None
    superclass = AbstractGeneralOperationParameterType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, minimumOccurs=None):
        self.original_tagname_ = None
        super(OperationParameterType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, minimumOccurs, )
    def factory(*args_, **kwargs_):
        if OperationParameterType.subclass:
            return OperationParameterType.subclass(*args_, **kwargs_)
        else:
            return OperationParameterType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(OperationParameterType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationParameterType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationParameterType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationParameterType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationParameterType'):
        super(OperationParameterType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='OperationParameterType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationParameterType', fromsubclass_=False, pretty_print=True):
        super(OperationParameterType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationParameterType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(OperationParameterType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(OperationParameterType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(OperationParameterType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(OperationParameterType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class OperationParameterType


class OperationParameterPropertyType(GeneratedsSuper):
    """gml:OperationParameterPropertyType is a property type for
    association roles to an operation parameter, either referencing
    or containing the definition of that parameter."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, OperationParameter=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.OperationParameter = OperationParameter
    def factory(*args_, **kwargs_):
        if OperationParameterPropertyType.subclass:
            return OperationParameterPropertyType.subclass(*args_, **kwargs_)
        else:
            return OperationParameterPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_OperationParameter(self): return self.OperationParameter
    def set_OperationParameter(self, OperationParameter): self.OperationParameter = OperationParameter
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.OperationParameter is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationParameterPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationParameterPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationParameterPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationParameterPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationParameterPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.OperationParameter is not None:
            self.OperationParameter.export(outfile, level, namespace_='gml:', name_='OperationParameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationParameterPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.OperationParameter is not None:
            showIndent(outfile, level)
            outfile.write('OperationParameter=model_.OperationParameterType(\n')
            self.OperationParameter.exportLiteral(outfile, level, name_='OperationParameter')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'OperationParameter':
            obj_ = OperationParameterType.factory()
            obj_.build(child_)
            self.OperationParameter = obj_
            obj_.original_tagname_ = 'OperationParameter'
# end class OperationParameterPropertyType


class OperationParameterGroupType(AbstractGeneralOperationParameterType):
    subclass = None
    superclass = AbstractGeneralOperationParameterType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, minimumOccurs=None, maximumOccurs=None, parameter=None):
        self.original_tagname_ = None
        super(OperationParameterGroupType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, minimumOccurs, )
        self.maximumOccurs = maximumOccurs
        if parameter is None:
            self.parameter = []
        else:
            self.parameter = parameter
    def factory(*args_, **kwargs_):
        if OperationParameterGroupType.subclass:
            return OperationParameterGroupType.subclass(*args_, **kwargs_)
        else:
            return OperationParameterGroupType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_maximumOccurs(self): return self.maximumOccurs
    def set_maximumOccurs(self, maximumOccurs): self.maximumOccurs = maximumOccurs
    def get_parameter(self): return self.parameter
    def set_parameter(self, parameter): self.parameter = parameter
    def add_parameter(self, value): self.parameter.append(value)
    def insert_parameter_at(self, index, value): self.parameter.insert(index, value)
    def replace_parameter_at(self, index, value): self.parameter[index] = value
    def hasContent_(self):
        if (
            self.maximumOccurs is not None or
            self.parameter or
            super(OperationParameterGroupType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationParameterGroupType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationParameterGroupType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationParameterGroupType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationParameterGroupType'):
        super(OperationParameterGroupType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='OperationParameterGroupType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationParameterGroupType', fromsubclass_=False, pretty_print=True):
        super(OperationParameterGroupType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.maximumOccurs is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smaximumOccurs>%s</%smaximumOccurs>%s' % (namespace_, self.gds_format_integer(self.maximumOccurs, input_name='maximumOccurs'), namespace_, eol_))
        for parameter_ in self.parameter:
            parameter_.export(outfile, level, namespace_='gml:', name_='parameter', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationParameterGroupType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(OperationParameterGroupType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(OperationParameterGroupType, self).exportLiteralChildren(outfile, level, name_)
        if self.maximumOccurs is not None:
            showIndent(outfile, level)
            outfile.write('maximumOccurs=%d,\n' % self.maximumOccurs)
        showIndent(outfile, level)
        outfile.write('parameter=[\n')
        level += 1
        for parameter_ in self.parameter:
            showIndent(outfile, level)
            outfile.write('model_.AbstractGeneralOperationParameterPropertyType(\n')
            parameter_.exportLiteral(outfile, level, name_='AbstractGeneralOperationParameterPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(OperationParameterGroupType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'maximumOccurs':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ <= 0:
                raise_parse_error(child_, 'requires positiveInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'maximumOccurs')
            self.maximumOccurs = ival_
        elif nodeName_ == 'parameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.parameter.append(obj_)
            obj_.original_tagname_ = 'parameter'
        elif nodeName_ == 'includesParameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.parameter.append(obj_)
            obj_.original_tagname_ = 'includesParameter'
        elif nodeName_ == 'generalOperationParameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.parameter.append(obj_)
            obj_.original_tagname_ = 'generalOperationParameter'
        elif nodeName_ == 'usesParameter':
            obj_ = AbstractGeneralOperationParameterPropertyType.factory()
            obj_.build(child_)
            self.generalOperationParameter.append(obj_)
            obj_.original_tagname_ = 'usesParameter'
        super(OperationParameterGroupType, self).buildChildren(child_, node, nodeName_, True)
# end class OperationParameterGroupType


class OperationParameterGroupPropertyType(GeneratedsSuper):
    """gml:OperationParameterPropertyType is a property type for
    association roles to an operation parameter group, either
    referencing or containing the definition of that parameter
    group."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, OperationParameterGroup=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.OperationParameterGroup = OperationParameterGroup
    def factory(*args_, **kwargs_):
        if OperationParameterGroupPropertyType.subclass:
            return OperationParameterGroupPropertyType.subclass(*args_, **kwargs_)
        else:
            return OperationParameterGroupPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_OperationParameterGroup(self): return self.OperationParameterGroup
    def set_OperationParameterGroup(self, OperationParameterGroup): self.OperationParameterGroup = OperationParameterGroup
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.OperationParameterGroup is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationParameterGroupPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationParameterGroupPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationParameterGroupPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationParameterGroupPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationParameterGroupPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.OperationParameterGroup is not None:
            self.OperationParameterGroup.export(outfile, level, namespace_='gml:', name_='OperationParameterGroup', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationParameterGroupPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.OperationParameterGroup is not None:
            showIndent(outfile, level)
            outfile.write('OperationParameterGroup=model_.OperationParameterGroupType(\n')
            self.OperationParameterGroup.exportLiteral(outfile, level, name_='OperationParameterGroup')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'OperationParameterGroup':
            obj_ = OperationParameterGroupType.factory()
            obj_.build(child_)
            self.OperationParameterGroup = obj_
            obj_.original_tagname_ = 'OperationParameterGroup'
# end class OperationParameterGroupPropertyType


class ObservationType(AbstractFeatureType):
    subclass = None
    superclass = AbstractFeatureType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, validTime=None, using=None, target=None, resultOf=None, extensiontype_=None):
        self.original_tagname_ = None
        super(ObservationType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, extensiontype_, )
        self.validTime = validTime
        self.using = using
        self.target = target
        self.resultOf = resultOf
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if ObservationType.subclass:
            return ObservationType.subclass(*args_, **kwargs_)
        else:
            return ObservationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_validTime(self): return self.validTime
    def set_validTime(self, validTime): self.validTime = validTime
    def get_using(self): return self.using
    def set_using(self, using): self.using = using
    def get_target(self): return self.target
    def set_target(self, target): self.target = target
    def get_resultOf(self): return self.resultOf
    def set_resultOf(self, resultOf): self.resultOf = resultOf
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.validTime is not None or
            self.using is not None or
            self.target is not None or
            self.resultOf is not None or
            super(ObservationType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ObservationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ObservationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ObservationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ObservationType'):
        super(ObservationType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ObservationType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ObservationType', fromsubclass_=False, pretty_print=True):
        super(ObservationType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.validTime is not None:
            self.validTime.export(outfile, level, namespace_='gml:', name_='validTime', pretty_print=pretty_print)
        if self.using is not None:
            self.using.export(outfile, level, namespace_='gml:', name_='using', pretty_print=pretty_print)
        if self.target is not None:
            self.target.export(outfile, level, namespace_='gml:', name_='target', pretty_print=pretty_print)
        if self.resultOf is not None:
            self.resultOf.export(outfile, level, namespace_='gml:', name_='resultOf', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ObservationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ObservationType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ObservationType, self).exportLiteralChildren(outfile, level, name_)
        if self.validTime is not None:
            showIndent(outfile, level)
            outfile.write('validTime=model_.TimePrimitivePropertyType(\n')
            self.validTime.exportLiteral(outfile, level, name_='validTime')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.using is not None:
            showIndent(outfile, level)
            outfile.write('using=model_.using(\n')
            self.using.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.target is not None:
            showIndent(outfile, level)
            outfile.write('target=model_.target(\n')
            self.target.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.resultOf is not None:
            showIndent(outfile, level)
            outfile.write('resultOf=model_.resultOf(\n')
            self.resultOf.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(ObservationType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'validTime':
            class_obj_ = self.get_class_obj_(child_, TimePrimitivePropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.validTime = obj_
            obj_.original_tagname_ = 'validTime'
        elif nodeName_ == 'using':
            obj_ = ProcedurePropertyType.factory()
            obj_.build(child_)
            self.using = obj_
            obj_.original_tagname_ = 'using'
        elif nodeName_ == 'target':
            obj_ = TargetPropertyType.factory()
            obj_.build(child_)
            self.target = obj_
            obj_.original_tagname_ = 'target'
        elif nodeName_ == 'subject':
            obj_ = TargetPropertyType.factory()
            obj_.build(child_)
            self.subject = obj_
            obj_.original_tagname_ = 'subject'
        elif nodeName_ == 'resultOf':
            obj_ = ResultType.factory()
            obj_.build(child_)
            self.resultOf = obj_
            obj_.original_tagname_ = 'resultOf'
        super(ObservationType, self).buildChildren(child_, node, nodeName_, True)
# end class ObservationType


class ProcedurePropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, AbstractFeature=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.AbstractFeature = AbstractFeature
    def factory(*args_, **kwargs_):
        if ProcedurePropertyType.subclass:
            return ProcedurePropertyType.subclass(*args_, **kwargs_)
        else:
            return ProcedurePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractFeature(self): return self.AbstractFeature
    def set_AbstractFeature(self, AbstractFeature): self.AbstractFeature = AbstractFeature
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractFeature is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ProcedurePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ProcedurePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ProcedurePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ProcedurePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ProcedurePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractFeature is not None:
            self.AbstractFeature.export(outfile, level, namespace_, name_='AbstractFeature', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ProcedurePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractFeatureType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractFeatureType=model_.AbstractFeatureType(\n')
            self.AbstractFeatureType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractFeature':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeature> element')
            self.AbstractFeature = obj_
            obj_.original_tagname_ = 'AbstractFeature'
        elif nodeName_ == 'DynamicFeature':
            class_obj_ = self.get_class_obj_(child_, DynamicFeatureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DynamicFeature = obj_
            obj_.original_tagname_ = 'DynamicFeature'
        elif nodeName_ == 'AbstractCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoverage> element')
            self.AbstractCoverage = obj_
            obj_.original_tagname_ = 'AbstractCoverage'
        elif nodeName_ == 'AbstractContinuousCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractContinuousCoverage> element')
            self.AbstractContinuousCoverage = obj_
            obj_.original_tagname_ = 'AbstractContinuousCoverage'
        elif nodeName_ == 'Observation':
            class_obj_ = self.get_class_obj_(child_, ObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Observation = obj_
            obj_.original_tagname_ = 'Observation'
        elif nodeName_ == 'AbstractFeatureCollection':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeatureCollection> element')
            self.AbstractFeatureCollection = obj_
            obj_.original_tagname_ = 'AbstractFeatureCollection'
        elif nodeName_ == 'FeatureCollection':
            obj_ = FeatureCollectionType.factory()
            obj_.build(child_)
            self.FeatureCollection = obj_
            obj_.original_tagname_ = 'FeatureCollection'
        elif nodeName_ == 'DynamicFeatureCollection':
            obj_ = DynamicFeatureCollectionType.factory()
            obj_.build(child_)
            self.DynamicFeatureCollection = obj_
            obj_.original_tagname_ = 'DynamicFeatureCollection'
        elif nodeName_ == 'AbstractDiscreteCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage = obj_
            obj_.original_tagname_ = 'AbstractDiscreteCoverage'
        elif nodeName_ == 'MultiPointCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiPointCoverage = obj_
            obj_.original_tagname_ = 'MultiPointCoverage'
        elif nodeName_ == 'MultiCurveCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiCurveCoverage = obj_
            obj_.original_tagname_ = 'MultiCurveCoverage'
        elif nodeName_ == 'MultiSurfaceCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiSurfaceCoverage = obj_
            obj_.original_tagname_ = 'MultiSurfaceCoverage'
        elif nodeName_ == 'MultiSolidCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiSolidCoverage = obj_
            obj_.original_tagname_ = 'MultiSolidCoverage'
        elif nodeName_ == 'GridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.GridCoverage = obj_
            obj_.original_tagname_ = 'GridCoverage'
        elif nodeName_ == 'RectifiedGridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.RectifiedGridCoverage = obj_
            obj_.original_tagname_ = 'RectifiedGridCoverage'
        elif nodeName_ == 'DirectedObservation':
            class_obj_ = self.get_class_obj_(child_, DirectedObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DirectedObservation = obj_
            obj_.original_tagname_ = 'DirectedObservation'
        elif nodeName_ == 'DirectedObservationAtDistance':
            obj_ = DirectedObservationAtDistanceType.factory()
            obj_.build(child_)
            self.DirectedObservationAtDistance = obj_
            obj_.original_tagname_ = 'DirectedObservationAtDistance'
# end class ProcedurePropertyType


class TargetPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, AbstractFeature=None, AbstractGeometry=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.AbstractFeature = AbstractFeature
        self.AbstractGeometry = AbstractGeometry
    def factory(*args_, **kwargs_):
        if TargetPropertyType.subclass:
            return TargetPropertyType.subclass(*args_, **kwargs_)
        else:
            return TargetPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractFeature(self): return self.AbstractFeature
    def set_AbstractFeature(self, AbstractFeature): self.AbstractFeature = AbstractFeature
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractFeature is not None or
            self.AbstractGeometry is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TargetPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TargetPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TargetPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TargetPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TargetPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractFeature is not None:
            self.AbstractFeature.export(outfile, level, namespace_, name_='AbstractFeature', pretty_print=pretty_print)
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TargetPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractFeatureType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractFeatureType=model_.AbstractFeatureType(\n')
            self.AbstractFeatureType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractFeature':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeature> element')
            self.AbstractFeature = obj_
            obj_.original_tagname_ = 'AbstractFeature'
        elif nodeName_ == 'DynamicFeature':
            class_obj_ = self.get_class_obj_(child_, DynamicFeatureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DynamicFeature = obj_
            obj_.original_tagname_ = 'DynamicFeature'
        elif nodeName_ == 'AbstractCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoverage> element')
            self.AbstractCoverage = obj_
            obj_.original_tagname_ = 'AbstractCoverage'
        elif nodeName_ == 'AbstractContinuousCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractContinuousCoverage> element')
            self.AbstractContinuousCoverage = obj_
            obj_.original_tagname_ = 'AbstractContinuousCoverage'
        elif nodeName_ == 'Observation':
            class_obj_ = self.get_class_obj_(child_, ObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Observation = obj_
            obj_.original_tagname_ = 'Observation'
        elif nodeName_ == 'AbstractFeatureCollection':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeatureCollection> element')
            self.AbstractFeatureCollection = obj_
            obj_.original_tagname_ = 'AbstractFeatureCollection'
        elif nodeName_ == 'FeatureCollection':
            obj_ = FeatureCollectionType.factory()
            obj_.build(child_)
            self.FeatureCollection = obj_
            obj_.original_tagname_ = 'FeatureCollection'
        elif nodeName_ == 'DynamicFeatureCollection':
            obj_ = DynamicFeatureCollectionType.factory()
            obj_.build(child_)
            self.DynamicFeatureCollection = obj_
            obj_.original_tagname_ = 'DynamicFeatureCollection'
        elif nodeName_ == 'AbstractDiscreteCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage = obj_
            obj_.original_tagname_ = 'AbstractDiscreteCoverage'
        elif nodeName_ == 'MultiPointCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiPointCoverage = obj_
            obj_.original_tagname_ = 'MultiPointCoverage'
        elif nodeName_ == 'MultiCurveCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiCurveCoverage = obj_
            obj_.original_tagname_ = 'MultiCurveCoverage'
        elif nodeName_ == 'MultiSurfaceCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiSurfaceCoverage = obj_
            obj_.original_tagname_ = 'MultiSurfaceCoverage'
        elif nodeName_ == 'MultiSolidCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.MultiSolidCoverage = obj_
            obj_.original_tagname_ = 'MultiSolidCoverage'
        elif nodeName_ == 'GridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.GridCoverage = obj_
            obj_.original_tagname_ = 'GridCoverage'
        elif nodeName_ == 'RectifiedGridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.RectifiedGridCoverage = obj_
            obj_.original_tagname_ = 'RectifiedGridCoverage'
        elif nodeName_ == 'DirectedObservation':
            class_obj_ = self.get_class_obj_(child_, DirectedObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DirectedObservation = obj_
            obj_.original_tagname_ = 'DirectedObservation'
        elif nodeName_ == 'DirectedObservationAtDistance':
            obj_ = DirectedObservationAtDistanceType.factory()
            obj_.build(child_)
            self.DirectedObservationAtDistance = obj_
            obj_.original_tagname_ = 'DirectedObservationAtDistance'
        elif nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
# end class TargetPropertyType


class ResultType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, anytypeobjs_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.anytypeobjs_ = anytypeobjs_
    def factory(*args_, **kwargs_):
        if ResultType.subclass:
            return ResultType.subclass(*args_, **kwargs_)
        else:
            return ResultType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.anytypeobjs_ is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ResultType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ResultType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ResultType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ResultType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ResultType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.anytypeobjs_ is not None:
            self.anytypeobjs_.export(outfile, level, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ResultType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.anytypeobjs_ is not None:
            showIndent(outfile, level)
            outfile.write('anytypeobjs_=model_.anytypeobjs_(\n')
            self.anytypeobjs_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        obj_ = self.gds_build_any(child_, 'ResultType')
        if obj_ is not None:
            self.set_anytypeobjs_(obj_)
# end class ResultType


class DirectedObservationType(ObservationType):
    subclass = None
    superclass = ObservationType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, validTime=None, using=None, target=None, resultOf=None, direction=None, extensiontype_=None):
        self.original_tagname_ = None
        super(DirectedObservationType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, validTime, using, target, resultOf, extensiontype_, )
        self.direction = direction
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DirectedObservationType.subclass:
            return DirectedObservationType.subclass(*args_, **kwargs_)
        else:
            return DirectedObservationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_direction(self): return self.direction
    def set_direction(self, direction): self.direction = direction
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.direction is not None or
            super(DirectedObservationType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectedObservationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedObservationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectedObservationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectedObservationType'):
        super(DirectedObservationType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedObservationType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectedObservationType', fromsubclass_=False, pretty_print=True):
        super(DirectedObservationType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.direction is not None:
            self.direction.export(outfile, level, namespace_='gml:', name_='direction', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectedObservationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DirectedObservationType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DirectedObservationType, self).exportLiteralChildren(outfile, level, name_)
        if self.direction is not None:
            showIndent(outfile, level)
            outfile.write('direction=model_.direction(\n')
            self.direction.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(DirectedObservationType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'direction':
            obj_ = DirectionPropertyType.factory()
            obj_.build(child_)
            self.direction = obj_
            obj_.original_tagname_ = 'direction'
        super(DirectedObservationType, self).buildChildren(child_, node, nodeName_, True)
# end class DirectedObservationType


class DirectedObservationAtDistanceType(DirectedObservationType):
    subclass = None
    superclass = DirectedObservationType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, validTime=None, using=None, target=None, resultOf=None, direction=None, distance=None):
        self.original_tagname_ = None
        super(DirectedObservationAtDistanceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, validTime, using, target, resultOf, direction, )
        self.distance = distance
    def factory(*args_, **kwargs_):
        if DirectedObservationAtDistanceType.subclass:
            return DirectedObservationAtDistanceType.subclass(*args_, **kwargs_)
        else:
            return DirectedObservationAtDistanceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_distance(self): return self.distance
    def set_distance(self, distance): self.distance = distance
    def hasContent_(self):
        if (
            self.distance is not None or
            super(DirectedObservationAtDistanceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectedObservationAtDistanceType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedObservationAtDistanceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectedObservationAtDistanceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectedObservationAtDistanceType'):
        super(DirectedObservationAtDistanceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DirectedObservationAtDistanceType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectedObservationAtDistanceType', fromsubclass_=False, pretty_print=True):
        super(DirectedObservationAtDistanceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.distance is not None:
            self.distance.export(outfile, level, namespace_, name_='distance', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectedObservationAtDistanceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DirectedObservationAtDistanceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DirectedObservationAtDistanceType, self).exportLiteralChildren(outfile, level, name_)
        if self.distance is not None:
            showIndent(outfile, level)
            outfile.write('distance=model_.MeasureType(\n')
            self.distance.exportLiteral(outfile, level, name_='distance')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DirectedObservationAtDistanceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'distance':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.distance = obj_
            obj_.original_tagname_ = 'distance'
        super(DirectedObservationAtDistanceType, self).buildChildren(child_, node, nodeName_, True)
# end class DirectedObservationAtDistanceType


class DirectionPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, DirectionVector=None, DirectionDescription=None, CompassPoint=None, DirectionKeyword=None, DirectionString=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.DirectionVector = DirectionVector
        self.DirectionDescription = DirectionDescription
        self.CompassPoint = CompassPoint
        self.DirectionKeyword = DirectionKeyword
        self.DirectionString = DirectionString
    def factory(*args_, **kwargs_):
        if DirectionPropertyType.subclass:
            return DirectionPropertyType.subclass(*args_, **kwargs_)
        else:
            return DirectionPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DirectionVector(self): return self.DirectionVector
    def set_DirectionVector(self, DirectionVector): self.DirectionVector = DirectionVector
    def get_DirectionDescription(self): return self.DirectionDescription
    def set_DirectionDescription(self, DirectionDescription): self.DirectionDescription = DirectionDescription
    def get_CompassPoint(self): return self.CompassPoint
    def set_CompassPoint(self, CompassPoint): self.CompassPoint = CompassPoint
    def get_DirectionKeyword(self): return self.DirectionKeyword
    def set_DirectionKeyword(self, DirectionKeyword): self.DirectionKeyword = DirectionKeyword
    def get_DirectionString(self): return self.DirectionString
    def set_DirectionString(self, DirectionString): self.DirectionString = DirectionString
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def validate_CompassPointEnumeration(self, value):
        # Validate type CompassPointEnumeration, a restriction on string.
        pass
    def hasContent_(self):
        if (
            self.DirectionVector is not None or
            self.DirectionDescription is not None or
            self.CompassPoint is not None or
            self.DirectionKeyword is not None or
            self.DirectionString is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectionPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectionPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectionPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectionPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectionPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DirectionVector is not None:
            self.DirectionVector.export(outfile, level, namespace_, name_='DirectionVector', pretty_print=pretty_print)
        if self.DirectionDescription is not None:
            self.DirectionDescription.export(outfile, level, namespace_, name_='DirectionDescription', pretty_print=pretty_print)
        if self.CompassPoint is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sCompassPoint>%s</%sCompassPoint>%s' % (namespace_, self.gds_format_string(quote_xml(self.CompassPoint).encode(ExternalEncoding), input_name='CompassPoint'), namespace_, eol_))
        if self.DirectionKeyword is not None:
            self.DirectionKeyword.export(outfile, level, namespace_, name_='DirectionKeyword', pretty_print=pretty_print)
        if self.DirectionString is not None:
            self.DirectionString.export(outfile, level, namespace_, name_='DirectionString', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectionPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DirectionVector is not None:
            showIndent(outfile, level)
            outfile.write('DirectionVector=model_.DirectionVectorType(\n')
            self.DirectionVector.exportLiteral(outfile, level, name_='DirectionVector')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DirectionDescription is not None:
            showIndent(outfile, level)
            outfile.write('DirectionDescription=model_.DirectionDescriptionType(\n')
            self.DirectionDescription.exportLiteral(outfile, level, name_='DirectionDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.CompassPoint is not None:
            showIndent(outfile, level)
            outfile.write('CompassPoint=%s,\n' % quote_python(self.CompassPoint).encode(ExternalEncoding))
        if self.DirectionKeyword is not None:
            showIndent(outfile, level)
            outfile.write('DirectionKeyword=model_.CodeType(\n')
            self.DirectionKeyword.exportLiteral(outfile, level, name_='DirectionKeyword')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.DirectionString is not None:
            showIndent(outfile, level)
            outfile.write('DirectionString=model_.StringOrRefType(\n')
            self.DirectionString.exportLiteral(outfile, level, name_='DirectionString')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DirectionVector':
            obj_ = DirectionVectorType.factory()
            obj_.build(child_)
            self.DirectionVector = obj_
            obj_.original_tagname_ = 'DirectionVector'
        elif nodeName_ == 'DirectionDescription':
            obj_ = DirectionDescriptionType.factory()
            obj_.build(child_)
            self.DirectionDescription = obj_
            obj_.original_tagname_ = 'DirectionDescription'
        elif nodeName_ == 'CompassPoint':
            CompassPoint_ = child_.text
            CompassPoint_ = self.gds_validate_string(CompassPoint_, node, 'CompassPoint')
            self.CompassPoint = CompassPoint_
            self.validate_CompassPointEnumeration(self.CompassPoint)    # validate type CompassPointEnumeration
        elif nodeName_ == 'DirectionKeyword':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DirectionKeyword = obj_
            obj_.original_tagname_ = 'DirectionKeyword'
        elif nodeName_ == 'DirectionString':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.DirectionString = obj_
            obj_.original_tagname_ = 'DirectionString'
# end class DirectionPropertyType


class DirectionVectorType(GeneratedsSuper):
    """Direction vectors are specified by providing components of a vector."""
    subclass = None
    superclass = None
    def __init__(self, vector=None, horizontalAngle=None, verticalAngle=None):
        self.original_tagname_ = None
        self.vector = vector
        self.horizontalAngle = horizontalAngle
        self.verticalAngle = verticalAngle
    def factory(*args_, **kwargs_):
        if DirectionVectorType.subclass:
            return DirectionVectorType.subclass(*args_, **kwargs_)
        else:
            return DirectionVectorType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_vector(self): return self.vector
    def set_vector(self, vector): self.vector = vector
    def get_horizontalAngle(self): return self.horizontalAngle
    def set_horizontalAngle(self, horizontalAngle): self.horizontalAngle = horizontalAngle
    def get_verticalAngle(self): return self.verticalAngle
    def set_verticalAngle(self, verticalAngle): self.verticalAngle = verticalAngle
    def hasContent_(self):
        if (
            self.vector is not None or
            self.horizontalAngle is not None or
            self.verticalAngle is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectionVectorType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectionVectorType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectionVectorType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectionVectorType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectionVectorType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.vector is not None:
            self.vector.export(outfile, level, namespace_='gml:', name_='vector', pretty_print=pretty_print)
        if self.horizontalAngle is not None:
            self.horizontalAngle.export(outfile, level, namespace_, name_='horizontalAngle', pretty_print=pretty_print)
        if self.verticalAngle is not None:
            self.verticalAngle.export(outfile, level, namespace_, name_='verticalAngle', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectionVectorType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.vector is not None:
            showIndent(outfile, level)
            outfile.write('vector=model_.VectorType(\n')
            self.vector.exportLiteral(outfile, level, name_='vector')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.horizontalAngle is not None:
            showIndent(outfile, level)
            outfile.write('horizontalAngle=model_.AngleType(\n')
            self.horizontalAngle.exportLiteral(outfile, level, name_='horizontalAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.verticalAngle is not None:
            showIndent(outfile, level)
            outfile.write('verticalAngle=model_.AngleType(\n')
            self.verticalAngle.exportLiteral(outfile, level, name_='verticalAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'vector':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.vector = obj_
            obj_.original_tagname_ = 'vector'
        elif nodeName_ == 'horizontalAngle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.horizontalAngle = obj_
            obj_.original_tagname_ = 'horizontalAngle'
        elif nodeName_ == 'verticalAngle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.verticalAngle = obj_
            obj_.original_tagname_ = 'verticalAngle'
# end class DirectionVectorType


class DirectionDescriptionType(GeneratedsSuper):
    """direction descriptions are specified by a compass point code, a
    keyword, a textual description or a reference to a description.
    A gml:compassPoint is specified by a simple enumeration. In
    addition, thre elements to contain text-based descriptions of
    direction are provided. If the direction is specified using a
    term from a list, gml:keyword should be used, and the list
    indicated using the value of the codeSpace attribute. if the
    direction is decribed in prose, gml:direction or gml:reference
    should be used, allowing the value to be included inline or by
    reference."""
    subclass = None
    superclass = None
    def __init__(self, compassPoint=None, keyword=None, description=None, reference=None):
        self.original_tagname_ = None
        self.compassPoint = compassPoint
        self.keyword = keyword
        self.description = description
        self.reference = reference
    def factory(*args_, **kwargs_):
        if DirectionDescriptionType.subclass:
            return DirectionDescriptionType.subclass(*args_, **kwargs_)
        else:
            return DirectionDescriptionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_compassPoint(self): return self.compassPoint
    def set_compassPoint(self, compassPoint): self.compassPoint = compassPoint
    def get_keyword(self): return self.keyword
    def set_keyword(self, keyword): self.keyword = keyword
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_reference(self): return self.reference
    def set_reference(self, reference): self.reference = reference
    def validate_CompassPointEnumeration(self, value):
        # Validate type CompassPointEnumeration, a restriction on string.
        pass
    def hasContent_(self):
        if (
            self.compassPoint is not None or
            self.keyword is not None or
            self.description is not None or
            self.reference is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DirectionDescriptionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DirectionDescriptionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DirectionDescriptionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DirectionDescriptionType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DirectionDescriptionType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.compassPoint is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%scompassPoint>%s</%scompassPoint>%s' % (namespace_, self.gds_format_string(quote_xml(self.compassPoint).encode(ExternalEncoding), input_name='compassPoint'), namespace_, eol_))
        if self.keyword is not None:
            self.keyword.export(outfile, level, namespace_, name_='keyword', pretty_print=pretty_print)
        if self.description is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdescription>%s</%sdescription>%s' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_, eol_))
        if self.reference is not None:
            self.reference.export(outfile, level, namespace_, name_='reference', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DirectionDescriptionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.compassPoint is not None:
            showIndent(outfile, level)
            outfile.write('compassPoint=%s,\n' % quote_python(self.compassPoint).encode(ExternalEncoding))
        if self.keyword is not None:
            showIndent(outfile, level)
            outfile.write('keyword=model_.CodeType(\n')
            self.keyword.exportLiteral(outfile, level, name_='keyword')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))
        if self.reference is not None:
            showIndent(outfile, level)
            outfile.write('reference=model_.ReferenceType(\n')
            self.reference.exportLiteral(outfile, level, name_='reference')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'compassPoint':
            compassPoint_ = child_.text
            compassPoint_ = self.gds_validate_string(compassPoint_, node, 'compassPoint')
            self.compassPoint = compassPoint_
            self.validate_CompassPointEnumeration(self.compassPoint)    # validate type CompassPointEnumeration
        elif nodeName_ == 'keyword':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.keyword = obj_
            obj_.original_tagname_ = 'keyword'
        elif nodeName_ == 'description':
            description_ = child_.text
            description_ = self.gds_validate_string(description_, node, 'description')
            self.description = description_
        elif nodeName_ == 'reference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.reference = obj_
            obj_.original_tagname_ = 'reference'
# end class DirectionDescriptionType


class TimeReferenceSystemType(DefinitionType):
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, extensiontype_=None):
        self.original_tagname_ = None
        super(TimeReferenceSystemType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.domainOfValidity = domainOfValidity
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if TimeReferenceSystemType.subclass:
            return TimeReferenceSystemType.subclass(*args_, **kwargs_)
        else:
            return TimeReferenceSystemType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.domainOfValidity is not None or
            super(TimeReferenceSystemType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeReferenceSystemType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeReferenceSystemType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeReferenceSystemType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeReferenceSystemType'):
        super(TimeReferenceSystemType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeReferenceSystemType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeReferenceSystemType', fromsubclass_=False, pretty_print=True):
        super(TimeReferenceSystemType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.domainOfValidity is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdomainOfValidity>%s</%sdomainOfValidity>%s' % (namespace_, self.gds_format_string(quote_xml(self.domainOfValidity).encode(ExternalEncoding), input_name='domainOfValidity'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='TimeReferenceSystemType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeReferenceSystemType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeReferenceSystemType, self).exportLiteralChildren(outfile, level, name_)
        if self.domainOfValidity is not None:
            showIndent(outfile, level)
            outfile.write('domainOfValidity=%s,\n' % quote_python(self.domainOfValidity).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(TimeReferenceSystemType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'domainOfValidity':
            domainOfValidity_ = child_.text
            domainOfValidity_ = self.gds_validate_string(domainOfValidity_, node, 'domainOfValidity')
            self.domainOfValidity = domainOfValidity_
        super(TimeReferenceSystemType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeReferenceSystemType


class TimeCoordinateSystemType(TimeReferenceSystemType):
    subclass = None
    superclass = TimeReferenceSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, originPosition=None, origin=None, interval=None):
        self.original_tagname_ = None
        super(TimeCoordinateSystemType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, )
        self.originPosition = originPosition
        self.origin = origin
        self.interval = interval
    def factory(*args_, **kwargs_):
        if TimeCoordinateSystemType.subclass:
            return TimeCoordinateSystemType.subclass(*args_, **kwargs_)
        else:
            return TimeCoordinateSystemType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_originPosition(self): return self.originPosition
    def set_originPosition(self, originPosition): self.originPosition = originPosition
    def get_origin(self): return self.origin
    def set_origin(self, origin): self.origin = origin
    def get_interval(self): return self.interval
    def set_interval(self, interval): self.interval = interval
    def hasContent_(self):
        if (
            self.originPosition is not None or
            self.origin is not None or
            self.interval is not None or
            super(TimeCoordinateSystemType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCoordinateSystemType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCoordinateSystemType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCoordinateSystemType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCoordinateSystemType'):
        super(TimeCoordinateSystemType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCoordinateSystemType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCoordinateSystemType', fromsubclass_=False, pretty_print=True):
        super(TimeCoordinateSystemType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.originPosition is not None:
            self.originPosition.export(outfile, level, namespace_, name_='originPosition', pretty_print=pretty_print)
        if self.origin is not None:
            self.origin.export(outfile, level, namespace_, name_='origin', pretty_print=pretty_print)
        if self.interval is not None:
            self.interval.export(outfile, level, namespace_, name_='interval', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCoordinateSystemType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeCoordinateSystemType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeCoordinateSystemType, self).exportLiteralChildren(outfile, level, name_)
        if self.originPosition is not None:
            showIndent(outfile, level)
            outfile.write('originPosition=model_.TimePositionType(\n')
            self.originPosition.exportLiteral(outfile, level, name_='originPosition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.origin is not None:
            showIndent(outfile, level)
            outfile.write('origin=model_.TimeInstantPropertyType(\n')
            self.origin.exportLiteral(outfile, level, name_='origin')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.interval is not None:
            showIndent(outfile, level)
            outfile.write('interval=model_.TimeIntervalLengthType(\n')
            self.interval.exportLiteral(outfile, level, name_='interval')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeCoordinateSystemType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'originPosition':
            obj_ = TimePositionType.factory()
            obj_.build(child_)
            self.originPosition = obj_
            obj_.original_tagname_ = 'originPosition'
        elif nodeName_ == 'origin':
            obj_ = TimeInstantPropertyType.factory()
            obj_.build(child_)
            self.origin = obj_
            obj_.original_tagname_ = 'origin'
        elif nodeName_ == 'interval':
            obj_ = TimeIntervalLengthType.factory()
            obj_.build(child_)
            self.interval = obj_
            obj_.original_tagname_ = 'interval'
        super(TimeCoordinateSystemType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeCoordinateSystemType


class TimeCalendarType(TimeReferenceSystemType):
    subclass = None
    superclass = TimeReferenceSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, referenceFrame=None):
        self.original_tagname_ = None
        super(TimeCalendarType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, )
        if referenceFrame is None:
            self.referenceFrame = []
        else:
            self.referenceFrame = referenceFrame
    def factory(*args_, **kwargs_):
        if TimeCalendarType.subclass:
            return TimeCalendarType.subclass(*args_, **kwargs_)
        else:
            return TimeCalendarType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_referenceFrame(self): return self.referenceFrame
    def set_referenceFrame(self, referenceFrame): self.referenceFrame = referenceFrame
    def add_referenceFrame(self, value): self.referenceFrame.append(value)
    def insert_referenceFrame_at(self, index, value): self.referenceFrame.insert(index, value)
    def replace_referenceFrame_at(self, index, value): self.referenceFrame[index] = value
    def hasContent_(self):
        if (
            self.referenceFrame or
            super(TimeCalendarType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCalendarType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCalendarType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCalendarType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCalendarType'):
        super(TimeCalendarType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCalendarType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCalendarType', fromsubclass_=False, pretty_print=True):
        super(TimeCalendarType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for referenceFrame_ in self.referenceFrame:
            referenceFrame_.export(outfile, level, namespace_, name_='referenceFrame', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCalendarType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeCalendarType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeCalendarType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('referenceFrame=[\n')
        level += 1
        for referenceFrame_ in self.referenceFrame:
            showIndent(outfile, level)
            outfile.write('model_.TimeCalendarEraPropertyType(\n')
            referenceFrame_.exportLiteral(outfile, level, name_='TimeCalendarEraPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeCalendarType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'referenceFrame':
            obj_ = TimeCalendarEraPropertyType.factory()
            obj_.build(child_)
            self.referenceFrame.append(obj_)
            obj_.original_tagname_ = 'referenceFrame'
        super(TimeCalendarType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeCalendarType


class TimeCalendarEraType(DefinitionType):
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, referenceEvent=None, referenceDate=None, julianReference=None, epochOfUse=None):
        self.original_tagname_ = None
        super(TimeCalendarEraType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.referenceEvent = referenceEvent
        self.referenceDate = referenceDate
        self.julianReference = julianReference
        self.epochOfUse = epochOfUse
    def factory(*args_, **kwargs_):
        if TimeCalendarEraType.subclass:
            return TimeCalendarEraType.subclass(*args_, **kwargs_)
        else:
            return TimeCalendarEraType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_referenceEvent(self): return self.referenceEvent
    def set_referenceEvent(self, referenceEvent): self.referenceEvent = referenceEvent
    def get_referenceDate(self): return self.referenceDate
    def set_referenceDate(self, referenceDate): self.referenceDate = referenceDate
    def get_julianReference(self): return self.julianReference
    def set_julianReference(self, julianReference): self.julianReference = julianReference
    def get_epochOfUse(self): return self.epochOfUse
    def set_epochOfUse(self, epochOfUse): self.epochOfUse = epochOfUse
    def validate_CalDate(self, value):
        # Validate type CalDate, a restriction on None.
        pass
    def hasContent_(self):
        if (
            self.referenceEvent is not None or
            self.referenceDate is not None or
            self.julianReference is not None or
            self.epochOfUse is not None or
            super(TimeCalendarEraType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCalendarEraType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCalendarEraType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCalendarEraType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCalendarEraType'):
        super(TimeCalendarEraType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCalendarEraType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCalendarEraType', fromsubclass_=False, pretty_print=True):
        super(TimeCalendarEraType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.referenceEvent is not None:
            self.referenceEvent.export(outfile, level, namespace_, name_='referenceEvent', pretty_print=pretty_print)
        if self.referenceDate is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sreferenceDate>%s</%sreferenceDate>%s' % (namespace_, self.gds_format_string(quote_xml(self.referenceDate).encode(ExternalEncoding), input_name='referenceDate'), namespace_, eol_))
        if self.julianReference is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sjulianReference>%s</%sjulianReference>%s' % (namespace_, self.gds_format_float(self.julianReference, input_name='julianReference'), namespace_, eol_))
        if self.epochOfUse is not None:
            self.epochOfUse.export(outfile, level, namespace_, name_='epochOfUse', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCalendarEraType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeCalendarEraType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeCalendarEraType, self).exportLiteralChildren(outfile, level, name_)
        if self.referenceEvent is not None:
            showIndent(outfile, level)
            outfile.write('referenceEvent=model_.StringOrRefType(\n')
            self.referenceEvent.exportLiteral(outfile, level, name_='referenceEvent')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.referenceDate is not None:
            showIndent(outfile, level)
            outfile.write('referenceDate=%s,\n' % quote_python(self.referenceDate).encode(ExternalEncoding))
        if self.julianReference is not None:
            showIndent(outfile, level)
            outfile.write('julianReference=%f,\n' % self.julianReference)
        if self.epochOfUse is not None:
            showIndent(outfile, level)
            outfile.write('epochOfUse=model_.TimePeriodPropertyType(\n')
            self.epochOfUse.exportLiteral(outfile, level, name_='epochOfUse')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeCalendarEraType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'referenceEvent':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.referenceEvent = obj_
            obj_.original_tagname_ = 'referenceEvent'
        elif nodeName_ == 'referenceDate':
            referenceDate_ = child_.text
            referenceDate_ = self.gds_validate_string(referenceDate_, node, 'referenceDate')
            self.referenceDate = referenceDate_
            self.validate_CalDate(self.referenceDate)    # validate type CalDate
        elif nodeName_ == 'julianReference':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'julianReference')
            self.julianReference = fval_
        elif nodeName_ == 'epochOfUse':
            obj_ = TimePeriodPropertyType.factory()
            obj_.build(child_)
            self.epochOfUse = obj_
            obj_.original_tagname_ = 'epochOfUse'
        super(TimeCalendarEraType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeCalendarEraType


class TimeCalendarPropertyType(GeneratedsSuper):
    """gml:TimeCalendarPropertyType provides for associating a
    gml:TimeCalendar with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, TimeCalendar=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.TimeCalendar = TimeCalendar
    def factory(*args_, **kwargs_):
        if TimeCalendarPropertyType.subclass:
            return TimeCalendarPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeCalendarPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeCalendar(self): return self.TimeCalendar
    def set_TimeCalendar(self, TimeCalendar): self.TimeCalendar = TimeCalendar
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeCalendar is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCalendarPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCalendarPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCalendarPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCalendarPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCalendarPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeCalendar is not None:
            self.TimeCalendar.export(outfile, level, namespace_='gml:', name_='TimeCalendar', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCalendarPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeCalendar is not None:
            showIndent(outfile, level)
            outfile.write('TimeCalendar=model_.TimeCalendarType(\n')
            self.TimeCalendar.exportLiteral(outfile, level, name_='TimeCalendar')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeCalendar':
            obj_ = TimeCalendarType.factory()
            obj_.build(child_)
            self.TimeCalendar = obj_
            obj_.original_tagname_ = 'TimeCalendar'
# end class TimeCalendarPropertyType


class TimeCalendarEraPropertyType(GeneratedsSuper):
    """gml:TimeCalendarEraPropertyType provides for associating a
    gml:TimeCalendarEra with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, TimeCalendarEra=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.TimeCalendarEra = TimeCalendarEra
    def factory(*args_, **kwargs_):
        if TimeCalendarEraPropertyType.subclass:
            return TimeCalendarEraPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeCalendarEraPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeCalendarEra(self): return self.TimeCalendarEra
    def set_TimeCalendarEra(self, TimeCalendarEra): self.TimeCalendarEra = TimeCalendarEra
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeCalendarEra is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCalendarEraPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCalendarEraPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCalendarEraPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCalendarEraPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCalendarEraPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeCalendarEra is not None:
            self.TimeCalendarEra.export(outfile, level, namespace_='gml:', name_='TimeCalendarEra', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCalendarEraPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeCalendarEra is not None:
            showIndent(outfile, level)
            outfile.write('TimeCalendarEra=model_.TimeCalendarEraType(\n')
            self.TimeCalendarEra.exportLiteral(outfile, level, name_='TimeCalendarEra')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeCalendarEra':
            obj_ = TimeCalendarEraType.factory()
            obj_.build(child_)
            self.TimeCalendarEra = obj_
            obj_.original_tagname_ = 'TimeCalendarEra'
# end class TimeCalendarEraPropertyType


class TimeClockType(TimeReferenceSystemType):
    subclass = None
    superclass = TimeReferenceSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, referenceEvent=None, referenceTime=None, utcReference=None, dateBasis=None):
        self.original_tagname_ = None
        super(TimeClockType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, )
        self.referenceEvent = referenceEvent
        if isinstance(referenceTime, string_types):
            initvalue_ = datetime_.datetime.strptime(referenceTime, '%H:%M:%S').time()
        else:
            initvalue_ = referenceTime
        self.referenceTime = initvalue_
        if isinstance(utcReference, string_types):
            initvalue_ = datetime_.datetime.strptime(utcReference, '%H:%M:%S').time()
        else:
            initvalue_ = utcReference
        self.utcReference = initvalue_
        if dateBasis is None:
            self.dateBasis = []
        else:
            self.dateBasis = dateBasis
    def factory(*args_, **kwargs_):
        if TimeClockType.subclass:
            return TimeClockType.subclass(*args_, **kwargs_)
        else:
            return TimeClockType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_referenceEvent(self): return self.referenceEvent
    def set_referenceEvent(self, referenceEvent): self.referenceEvent = referenceEvent
    def get_referenceTime(self): return self.referenceTime
    def set_referenceTime(self, referenceTime): self.referenceTime = referenceTime
    def get_utcReference(self): return self.utcReference
    def set_utcReference(self, utcReference): self.utcReference = utcReference
    def get_dateBasis(self): return self.dateBasis
    def set_dateBasis(self, dateBasis): self.dateBasis = dateBasis
    def add_dateBasis(self, value): self.dateBasis.append(value)
    def insert_dateBasis_at(self, index, value): self.dateBasis.insert(index, value)
    def replace_dateBasis_at(self, index, value): self.dateBasis[index] = value
    def hasContent_(self):
        if (
            self.referenceEvent is not None or
            self.referenceTime is not None or
            self.utcReference is not None or
            self.dateBasis or
            super(TimeClockType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeClockType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeClockType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeClockType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeClockType'):
        super(TimeClockType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeClockType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeClockType', fromsubclass_=False, pretty_print=True):
        super(TimeClockType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.referenceEvent is not None:
            self.referenceEvent.export(outfile, level, namespace_, name_='referenceEvent', pretty_print=pretty_print)
        if self.referenceTime is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sreferenceTime>%s</%sreferenceTime>%s' % (namespace_, self.gds_format_time(self.referenceTime, input_name='referenceTime'), namespace_, eol_))
        if self.utcReference is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sutcReference>%s</%sutcReference>%s' % (namespace_, self.gds_format_time(self.utcReference, input_name='utcReference'), namespace_, eol_))
        for dateBasis_ in self.dateBasis:
            dateBasis_.export(outfile, level, namespace_, name_='dateBasis', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeClockType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeClockType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeClockType, self).exportLiteralChildren(outfile, level, name_)
        if self.referenceEvent is not None:
            showIndent(outfile, level)
            outfile.write('referenceEvent=model_.StringOrRefType(\n')
            self.referenceEvent.exportLiteral(outfile, level, name_='referenceEvent')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.referenceTime is not None:
            showIndent(outfile, level)
            outfile.write('referenceTime=model_.GeneratedsSuper.gds_parse_time("%s"),\n' % self.gds_format_time(self.referenceTime, input_name='referenceTime'))
        if self.utcReference is not None:
            showIndent(outfile, level)
            outfile.write('utcReference=model_.GeneratedsSuper.gds_parse_time("%s"),\n' % self.gds_format_time(self.utcReference, input_name='utcReference'))
        showIndent(outfile, level)
        outfile.write('dateBasis=[\n')
        level += 1
        for dateBasis_ in self.dateBasis:
            showIndent(outfile, level)
            outfile.write('model_.TimeCalendarPropertyType(\n')
            dateBasis_.exportLiteral(outfile, level, name_='TimeCalendarPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeClockType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'referenceEvent':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.referenceEvent = obj_
            obj_.original_tagname_ = 'referenceEvent'
        elif nodeName_ == 'referenceTime':
            sval_ = child_.text
            dval_ = self.gds_parse_time(sval_)
            self.referenceTime = dval_
        elif nodeName_ == 'utcReference':
            sval_ = child_.text
            dval_ = self.gds_parse_time(sval_)
            self.utcReference = dval_
        elif nodeName_ == 'dateBasis':
            obj_ = TimeCalendarPropertyType.factory()
            obj_.build(child_)
            self.dateBasis.append(obj_)
            obj_.original_tagname_ = 'dateBasis'
        super(TimeClockType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeClockType


class TimeClockPropertyType(GeneratedsSuper):
    """gml:TimeClockPropertyType provides for associating a gml:TimeClock
    with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, TimeClock=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.TimeClock = TimeClock
    def factory(*args_, **kwargs_):
        if TimeClockPropertyType.subclass:
            return TimeClockPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeClockPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeClock(self): return self.TimeClock
    def set_TimeClock(self, TimeClock): self.TimeClock = TimeClock
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeClock is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeClockPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeClockPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeClockPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeClockPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeClockPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeClock is not None:
            self.TimeClock.export(outfile, level, namespace_='gml:', name_='TimeClock', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeClockPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeClock is not None:
            showIndent(outfile, level)
            outfile.write('TimeClock=model_.TimeClockType(\n')
            self.TimeClock.exportLiteral(outfile, level, name_='TimeClock')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeClock':
            obj_ = TimeClockType.factory()
            obj_.build(child_)
            self.TimeClock = obj_
            obj_.original_tagname_ = 'TimeClock'
# end class TimeClockPropertyType


class TimeOrdinalReferenceSystemType(TimeReferenceSystemType):
    subclass = None
    superclass = TimeReferenceSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, component=None):
        self.original_tagname_ = None
        super(TimeOrdinalReferenceSystemType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, )
        if component is None:
            self.component = []
        else:
            self.component = component
    def factory(*args_, **kwargs_):
        if TimeOrdinalReferenceSystemType.subclass:
            return TimeOrdinalReferenceSystemType.subclass(*args_, **kwargs_)
        else:
            return TimeOrdinalReferenceSystemType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_component(self): return self.component
    def set_component(self, component): self.component = component
    def add_component(self, value): self.component.append(value)
    def insert_component_at(self, index, value): self.component.insert(index, value)
    def replace_component_at(self, index, value): self.component[index] = value
    def hasContent_(self):
        if (
            self.component or
            super(TimeOrdinalReferenceSystemType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeOrdinalReferenceSystemType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeOrdinalReferenceSystemType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeOrdinalReferenceSystemType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeOrdinalReferenceSystemType'):
        super(TimeOrdinalReferenceSystemType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeOrdinalReferenceSystemType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeOrdinalReferenceSystemType', fromsubclass_=False, pretty_print=True):
        super(TimeOrdinalReferenceSystemType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for component_ in self.component:
            component_.export(outfile, level, namespace_, name_='component', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeOrdinalReferenceSystemType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeOrdinalReferenceSystemType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeOrdinalReferenceSystemType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('component=[\n')
        level += 1
        for component_ in self.component:
            showIndent(outfile, level)
            outfile.write('model_.TimeOrdinalEraPropertyType(\n')
            component_.exportLiteral(outfile, level, name_='TimeOrdinalEraPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeOrdinalReferenceSystemType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'component':
            obj_ = TimeOrdinalEraPropertyType.factory()
            obj_.build(child_)
            self.component.append(obj_)
            obj_.original_tagname_ = 'component'
        super(TimeOrdinalReferenceSystemType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeOrdinalReferenceSystemType


class TimeOrdinalEraType(DefinitionType):
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, relatedTime=None, start=None, end=None, extent=None, member=None, group=None):
        self.original_tagname_ = None
        super(TimeOrdinalEraType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        if relatedTime is None:
            self.relatedTime = []
        else:
            self.relatedTime = relatedTime
        self.start = start
        self.end = end
        self.extent = extent
        if member is None:
            self.member = []
        else:
            self.member = member
        self.group = group
    def factory(*args_, **kwargs_):
        if TimeOrdinalEraType.subclass:
            return TimeOrdinalEraType.subclass(*args_, **kwargs_)
        else:
            return TimeOrdinalEraType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_relatedTime(self): return self.relatedTime
    def set_relatedTime(self, relatedTime): self.relatedTime = relatedTime
    def add_relatedTime(self, value): self.relatedTime.append(value)
    def insert_relatedTime_at(self, index, value): self.relatedTime.insert(index, value)
    def replace_relatedTime_at(self, index, value): self.relatedTime[index] = value
    def get_start(self): return self.start
    def set_start(self, start): self.start = start
    def get_end(self): return self.end
    def set_end(self, end): self.end = end
    def get_extent(self): return self.extent
    def set_extent(self, extent): self.extent = extent
    def get_member(self): return self.member
    def set_member(self, member): self.member = member
    def add_member(self, value): self.member.append(value)
    def insert_member_at(self, index, value): self.member.insert(index, value)
    def replace_member_at(self, index, value): self.member[index] = value
    def get_group(self): return self.group
    def set_group(self, group): self.group = group
    def hasContent_(self):
        if (
            self.relatedTime or
            self.start is not None or
            self.end is not None or
            self.extent is not None or
            self.member or
            self.group is not None or
            super(TimeOrdinalEraType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeOrdinalEraType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeOrdinalEraType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeOrdinalEraType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeOrdinalEraType'):
        super(TimeOrdinalEraType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeOrdinalEraType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeOrdinalEraType', fromsubclass_=False, pretty_print=True):
        super(TimeOrdinalEraType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for relatedTime_ in self.relatedTime:
            relatedTime_.export(outfile, level, namespace_, name_='relatedTime', pretty_print=pretty_print)
        if self.start is not None:
            self.start.export(outfile, level, namespace_, name_='start', pretty_print=pretty_print)
        if self.end is not None:
            self.end.export(outfile, level, namespace_, name_='end', pretty_print=pretty_print)
        if self.extent is not None:
            self.extent.export(outfile, level, namespace_, name_='extent', pretty_print=pretty_print)
        for member_ in self.member:
            member_.export(outfile, level, namespace_, name_='member', pretty_print=pretty_print)
        if self.group is not None:
            self.group.export(outfile, level, namespace_, name_='group', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeOrdinalEraType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeOrdinalEraType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeOrdinalEraType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('relatedTime=[\n')
        level += 1
        for relatedTime_ in self.relatedTime:
            showIndent(outfile, level)
            outfile.write('model_.RelatedTimeType(\n')
            relatedTime_.exportLiteral(outfile, level, name_='RelatedTimeType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.start is not None:
            showIndent(outfile, level)
            outfile.write('start=model_.TimeNodePropertyType(\n')
            self.start.exportLiteral(outfile, level, name_='start')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.end is not None:
            showIndent(outfile, level)
            outfile.write('end=model_.TimeNodePropertyType(\n')
            self.end.exportLiteral(outfile, level, name_='end')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.extent is not None:
            showIndent(outfile, level)
            outfile.write('extent=model_.TimePeriodPropertyType(\n')
            self.extent.exportLiteral(outfile, level, name_='extent')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('member=[\n')
        level += 1
        for member_ in self.member:
            showIndent(outfile, level)
            outfile.write('model_.TimeOrdinalEraPropertyType(\n')
            member_.exportLiteral(outfile, level, name_='TimeOrdinalEraPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.group is not None:
            showIndent(outfile, level)
            outfile.write('group=model_.ReferenceType(\n')
            self.group.exportLiteral(outfile, level, name_='group')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeOrdinalEraType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'relatedTime':
            obj_ = RelatedTimeType.factory()
            obj_.build(child_)
            self.relatedTime.append(obj_)
            obj_.original_tagname_ = 'relatedTime'
        elif nodeName_ == 'start':
            obj_ = TimeNodePropertyType.factory()
            obj_.build(child_)
            self.start = obj_
            obj_.original_tagname_ = 'start'
        elif nodeName_ == 'end':
            obj_ = TimeNodePropertyType.factory()
            obj_.build(child_)
            self.end = obj_
            obj_.original_tagname_ = 'end'
        elif nodeName_ == 'extent':
            obj_ = TimePeriodPropertyType.factory()
            obj_.build(child_)
            self.extent = obj_
            obj_.original_tagname_ = 'extent'
        elif nodeName_ == 'member':
            obj_ = TimeOrdinalEraPropertyType.factory()
            obj_.build(child_)
            self.member.append(obj_)
            obj_.original_tagname_ = 'member'
        elif nodeName_ == 'group':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.group = obj_
            obj_.original_tagname_ = 'group'
        elif nodeName_ == 'valuesOfGroup':
            obj_ = OperationParameterGroupPropertyType.factory()
            obj_.build(child_)
            self.valuesOfGroup = obj_
            obj_.original_tagname_ = 'valuesOfGroup'
        super(TimeOrdinalEraType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeOrdinalEraType


class TimeOrdinalEraPropertyType(GeneratedsSuper):
    """gml:TimeOrdinalEraPropertyType provides for associating a
    gml:TimeOrdinalEra with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, remoteSchema=None, href=None, role=None, arcrole=None, owns=False, type_=None, TimeOrdinalEra=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.remoteSchema = _cast(None, remoteSchema)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.owns = _cast(bool, owns)
        self.type_ = _cast(None, type_)
        self.TimeOrdinalEra = TimeOrdinalEra
    def factory(*args_, **kwargs_):
        if TimeOrdinalEraPropertyType.subclass:
            return TimeOrdinalEraPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeOrdinalEraPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeOrdinalEra(self): return self.TimeOrdinalEra
    def set_TimeOrdinalEra(self, TimeOrdinalEra): self.TimeOrdinalEra = TimeOrdinalEra
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeOrdinalEra is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeOrdinalEraPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeOrdinalEraPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeOrdinalEraPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeOrdinalEraPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeOrdinalEraPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeOrdinalEra is not None:
            self.TimeOrdinalEra.export(outfile, level, namespace_='gml:', name_='TimeOrdinalEra', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeOrdinalEraPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeOrdinalEra is not None:
            showIndent(outfile, level)
            outfile.write('TimeOrdinalEra=model_.TimeOrdinalEraType(\n')
            self.TimeOrdinalEra.exportLiteral(outfile, level, name_='TimeOrdinalEra')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeOrdinalEra':
            obj_ = TimeOrdinalEraType.factory()
            obj_.build(child_)
            self.TimeOrdinalEra = obj_
            obj_.original_tagname_ = 'TimeOrdinalEra'
# end class TimeOrdinalEraPropertyType


class AbstractTimeTopologyPrimitiveType(AbstractTimePrimitiveType):
    subclass = None
    superclass = AbstractTimePrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, complex=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTimeTopologyPrimitiveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, relatedTime, extensiontype_, )
        self.complex = complex
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTimeTopologyPrimitiveType.subclass:
            return AbstractTimeTopologyPrimitiveType.subclass(*args_, **kwargs_)
        else:
            return AbstractTimeTopologyPrimitiveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_complex(self): return self.complex
    def set_complex(self, complex): self.complex = complex
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.complex is not None or
            super(AbstractTimeTopologyPrimitiveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTimeTopologyPrimitiveType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeTopologyPrimitiveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTimeTopologyPrimitiveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTimeTopologyPrimitiveType'):
        super(AbstractTimeTopologyPrimitiveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeTopologyPrimitiveType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTimeTopologyPrimitiveType', fromsubclass_=False, pretty_print=True):
        super(AbstractTimeTopologyPrimitiveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.complex is not None:
            self.complex.export(outfile, level, namespace_, name_='complex', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTimeTopologyPrimitiveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTimeTopologyPrimitiveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTimeTopologyPrimitiveType, self).exportLiteralChildren(outfile, level, name_)
        if self.complex is not None:
            showIndent(outfile, level)
            outfile.write('complex=model_.ReferenceType(\n')
            self.complex.exportLiteral(outfile, level, name_='complex')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTimeTopologyPrimitiveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'complex':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.complex = obj_
            obj_.original_tagname_ = 'complex'
        super(AbstractTimeTopologyPrimitiveType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractTimeTopologyPrimitiveType


class TimeTopologyPrimitivePropertyType(GeneratedsSuper):
    """gml:TimeTopologyPrimitivePropertyType provides for associating a
    gml:AbstractTimeTopologyPrimitive with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractTimeTopologyPrimitive=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractTimeTopologyPrimitive = AbstractTimeTopologyPrimitive
    def factory(*args_, **kwargs_):
        if TimeTopologyPrimitivePropertyType.subclass:
            return TimeTopologyPrimitivePropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeTopologyPrimitivePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractTimeTopologyPrimitive(self): return self.AbstractTimeTopologyPrimitive
    def set_AbstractTimeTopologyPrimitive(self, AbstractTimeTopologyPrimitive): self.AbstractTimeTopologyPrimitive = AbstractTimeTopologyPrimitive
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractTimeTopologyPrimitive is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeTopologyPrimitivePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeTopologyPrimitivePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeTopologyPrimitivePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeTopologyPrimitivePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeTopologyPrimitivePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractTimeTopologyPrimitive is not None:
            self.AbstractTimeTopologyPrimitive.export(outfile, level, namespace_, name_='AbstractTimeTopologyPrimitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeTopologyPrimitivePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractTimeTopologyPrimitiveType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractTimeTopologyPrimitiveType=model_.AbstractTimeTopologyPrimitiveType(\n')
            self.AbstractTimeTopologyPrimitiveType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimeTopologyPrimitive = obj_
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
# end class TimeTopologyPrimitivePropertyType


class TimeTopologyComplexType(AbstractTimeComplexType):
    subclass = None
    superclass = AbstractTimeComplexType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, primitive=None):
        self.original_tagname_ = None
        super(TimeTopologyComplexType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        if primitive is None:
            self.primitive = []
        else:
            self.primitive = primitive
    def factory(*args_, **kwargs_):
        if TimeTopologyComplexType.subclass:
            return TimeTopologyComplexType.subclass(*args_, **kwargs_)
        else:
            return TimeTopologyComplexType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_primitive(self): return self.primitive
    def set_primitive(self, primitive): self.primitive = primitive
    def add_primitive(self, value): self.primitive.append(value)
    def insert_primitive_at(self, index, value): self.primitive.insert(index, value)
    def replace_primitive_at(self, index, value): self.primitive[index] = value
    def hasContent_(self):
        if (
            self.primitive or
            super(TimeTopologyComplexType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeTopologyComplexType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeTopologyComplexType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeTopologyComplexType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeTopologyComplexType'):
        super(TimeTopologyComplexType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeTopologyComplexType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeTopologyComplexType', fromsubclass_=False, pretty_print=True):
        super(TimeTopologyComplexType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for primitive_ in self.primitive:
            primitive_.export(outfile, level, namespace_, name_='primitive', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeTopologyComplexType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeTopologyComplexType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeTopologyComplexType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('primitive=[\n')
        level += 1
        for primitive_ in self.primitive:
            showIndent(outfile, level)
            outfile.write('model_.TimeTopologyPrimitivePropertyType(\n')
            primitive_.exportLiteral(outfile, level, name_='TimeTopologyPrimitivePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeTopologyComplexType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'primitive':
            obj_ = TimeTopologyPrimitivePropertyType.factory()
            obj_.build(child_)
            self.primitive.append(obj_)
            obj_.original_tagname_ = 'primitive'
        super(TimeTopologyComplexType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeTopologyComplexType


class TimeTopologyComplexPropertyType(GeneratedsSuper):
    """gml:TimeTopologyComplexPropertyType provides for associating a
    gml:TimeTopologyComplex with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TimeTopologyComplex=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TimeTopologyComplex = TimeTopologyComplex
    def factory(*args_, **kwargs_):
        if TimeTopologyComplexPropertyType.subclass:
            return TimeTopologyComplexPropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeTopologyComplexPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeTopologyComplex(self): return self.TimeTopologyComplex
    def set_TimeTopologyComplex(self, TimeTopologyComplex): self.TimeTopologyComplex = TimeTopologyComplex
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeTopologyComplex is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeTopologyComplexPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeTopologyComplexPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeTopologyComplexPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeTopologyComplexPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeTopologyComplexPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeTopologyComplex is not None:
            self.TimeTopologyComplex.export(outfile, level, namespace_, name_='TimeTopologyComplex', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeTopologyComplexPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeTopologyComplexType is not None:
            showIndent(outfile, level)
            outfile.write('TimeTopologyComplexType=model_.TimeTopologyComplexType(\n')
            self.TimeTopologyComplexType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeTopologyComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <TimeTopologyComplex> element')
            self.TimeTopologyComplex = obj_
            obj_.original_tagname_ = 'TimeTopologyComplex'
# end class TimeTopologyComplexPropertyType


class TimeNodeType(AbstractTimeTopologyPrimitiveType):
    subclass = None
    superclass = AbstractTimeTopologyPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, complex=None, previousEdge=None, nextEdge=None, position=None):
        self.original_tagname_ = None
        super(TimeNodeType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, relatedTime, complex, )
        if previousEdge is None:
            self.previousEdge = []
        else:
            self.previousEdge = previousEdge
        if nextEdge is None:
            self.nextEdge = []
        else:
            self.nextEdge = nextEdge
        self.position = position
    def factory(*args_, **kwargs_):
        if TimeNodeType.subclass:
            return TimeNodeType.subclass(*args_, **kwargs_)
        else:
            return TimeNodeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_previousEdge(self): return self.previousEdge
    def set_previousEdge(self, previousEdge): self.previousEdge = previousEdge
    def add_previousEdge(self, value): self.previousEdge.append(value)
    def insert_previousEdge_at(self, index, value): self.previousEdge.insert(index, value)
    def replace_previousEdge_at(self, index, value): self.previousEdge[index] = value
    def get_nextEdge(self): return self.nextEdge
    def set_nextEdge(self, nextEdge): self.nextEdge = nextEdge
    def add_nextEdge(self, value): self.nextEdge.append(value)
    def insert_nextEdge_at(self, index, value): self.nextEdge.insert(index, value)
    def replace_nextEdge_at(self, index, value): self.nextEdge[index] = value
    def get_position(self): return self.position
    def set_position(self, position): self.position = position
    def hasContent_(self):
        if (
            self.previousEdge or
            self.nextEdge or
            self.position is not None or
            super(TimeNodeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeNodeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeNodeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeNodeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeNodeType'):
        super(TimeNodeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeNodeType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeNodeType', fromsubclass_=False, pretty_print=True):
        super(TimeNodeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for previousEdge_ in self.previousEdge:
            previousEdge_.export(outfile, level, namespace_, name_='previousEdge', pretty_print=pretty_print)
        for nextEdge_ in self.nextEdge:
            nextEdge_.export(outfile, level, namespace_, name_='nextEdge', pretty_print=pretty_print)
        if self.position is not None:
            self.position.export(outfile, level, namespace_, name_='position', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeNodeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeNodeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeNodeType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('previousEdge=[\n')
        level += 1
        for previousEdge_ in self.previousEdge:
            showIndent(outfile, level)
            outfile.write('model_.TimeEdgePropertyType(\n')
            previousEdge_.exportLiteral(outfile, level, name_='TimeEdgePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('nextEdge=[\n')
        level += 1
        for nextEdge_ in self.nextEdge:
            showIndent(outfile, level)
            outfile.write('model_.TimeEdgePropertyType(\n')
            nextEdge_.exportLiteral(outfile, level, name_='TimeEdgePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.position is not None:
            showIndent(outfile, level)
            outfile.write('position=model_.TimeInstantPropertyType(\n')
            self.position.exportLiteral(outfile, level, name_='position')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeNodeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'previousEdge':
            obj_ = TimeEdgePropertyType.factory()
            obj_.build(child_)
            self.previousEdge.append(obj_)
            obj_.original_tagname_ = 'previousEdge'
        elif nodeName_ == 'nextEdge':
            obj_ = TimeEdgePropertyType.factory()
            obj_.build(child_)
            self.nextEdge.append(obj_)
            obj_.original_tagname_ = 'nextEdge'
        elif nodeName_ == 'position':
            obj_ = TimeInstantPropertyType.factory()
            obj_.build(child_)
            self.position = obj_
            obj_.original_tagname_ = 'position'
        super(TimeNodeType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeNodeType


class TimeNodePropertyType(GeneratedsSuper):
    """gml:TimeNodePropertyType provides for associating a gml:TimeNode
    with an object"""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TimeNode=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TimeNode = TimeNode
    def factory(*args_, **kwargs_):
        if TimeNodePropertyType.subclass:
            return TimeNodePropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeNodePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeNode(self): return self.TimeNode
    def set_TimeNode(self, TimeNode): self.TimeNode = TimeNode
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeNode is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeNodePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeNodePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeNodePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeNodePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeNodePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeNode is not None:
            self.TimeNode.export(outfile, level, namespace_='gml:', name_='TimeNode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeNodePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeNode is not None:
            showIndent(outfile, level)
            outfile.write('TimeNode=model_.TimeNodeType(\n')
            self.TimeNode.exportLiteral(outfile, level, name_='TimeNode')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.TimeNode = obj_
            obj_.original_tagname_ = 'TimeNode'
# end class TimeNodePropertyType


class TimeEdgeType(AbstractTimeTopologyPrimitiveType):
    subclass = None
    superclass = AbstractTimeTopologyPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, relatedTime=None, complex=None, start=None, end=None, extent=None):
        self.original_tagname_ = None
        super(TimeEdgeType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, relatedTime, complex, )
        self.start = start
        self.end = end
        self.extent = extent
    def factory(*args_, **kwargs_):
        if TimeEdgeType.subclass:
            return TimeEdgeType.subclass(*args_, **kwargs_)
        else:
            return TimeEdgeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_start(self): return self.start
    def set_start(self, start): self.start = start
    def get_end(self): return self.end
    def set_end(self, end): self.end = end
    def get_extent(self): return self.extent
    def set_extent(self, extent): self.extent = extent
    def hasContent_(self):
        if (
            self.start is not None or
            self.end is not None or
            self.extent is not None or
            super(TimeEdgeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeEdgeType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeEdgeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeEdgeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeEdgeType'):
        super(TimeEdgeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeEdgeType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeEdgeType', fromsubclass_=False, pretty_print=True):
        super(TimeEdgeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.start is not None:
            self.start.export(outfile, level, namespace_, name_='start', pretty_print=pretty_print)
        if self.end is not None:
            self.end.export(outfile, level, namespace_, name_='end', pretty_print=pretty_print)
        if self.extent is not None:
            self.extent.export(outfile, level, namespace_, name_='extent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeEdgeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeEdgeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeEdgeType, self).exportLiteralChildren(outfile, level, name_)
        if self.start is not None:
            showIndent(outfile, level)
            outfile.write('start=model_.TimeNodePropertyType(\n')
            self.start.exportLiteral(outfile, level, name_='start')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.end is not None:
            showIndent(outfile, level)
            outfile.write('end=model_.TimeNodePropertyType(\n')
            self.end.exportLiteral(outfile, level, name_='end')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.extent is not None:
            showIndent(outfile, level)
            outfile.write('extent=model_.TimePeriodPropertyType(\n')
            self.extent.exportLiteral(outfile, level, name_='extent')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeEdgeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'start':
            obj_ = TimeNodePropertyType.factory()
            obj_.build(child_)
            self.start = obj_
            obj_.original_tagname_ = 'start'
        elif nodeName_ == 'end':
            obj_ = TimeNodePropertyType.factory()
            obj_.build(child_)
            self.end = obj_
            obj_.original_tagname_ = 'end'
        elif nodeName_ == 'extent':
            obj_ = TimePeriodPropertyType.factory()
            obj_.build(child_)
            self.extent = obj_
            obj_.original_tagname_ = 'extent'
        super(TimeEdgeType, self).buildChildren(child_, node, nodeName_, True)
# end class TimeEdgeType


class TimeEdgePropertyType(GeneratedsSuper):
    """gml:TimeEdgePropertyType provides for associating a gml:TimeEdge
    with an object."""
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, owns=False, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TimeEdge=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.owns = _cast(bool, owns)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TimeEdge = TimeEdge
    def factory(*args_, **kwargs_):
        if TimeEdgePropertyType.subclass:
            return TimeEdgePropertyType.subclass(*args_, **kwargs_)
        else:
            return TimeEdgePropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TimeEdge(self): return self.TimeEdge
    def set_TimeEdge(self, TimeEdge): self.TimeEdge = TimeEdge
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TimeEdge is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeEdgePropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeEdgePropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeEdgePropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeEdgePropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeEdgePropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TimeEdge is not None:
            self.TimeEdge.export(outfile, level, namespace_='gml:', name_='TimeEdge', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeEdgePropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TimeEdge is not None:
            showIndent(outfile, level)
            outfile.write('TimeEdge=model_.TimeEdgeType(\n')
            self.TimeEdge.exportLiteral(outfile, level, name_='TimeEdge')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.TimeEdge = obj_
            obj_.original_tagname_ = 'TimeEdge'
# end class TimeEdgePropertyType


class OperationPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractOperation=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractOperation = AbstractOperation
    def factory(*args_, **kwargs_):
        if OperationPropertyType.subclass:
            return OperationPropertyType.subclass(*args_, **kwargs_)
        else:
            return OperationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractOperation(self): return self.AbstractOperation
    def set_AbstractOperation(self, AbstractOperation): self.AbstractOperation = AbstractOperation
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractOperation is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OperationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OperationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OperationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OperationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OperationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractOperation is not None:
            self.AbstractOperation.export(outfile, level, namespace_, name_='AbstractOperation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OperationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractCoordinateOperationType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractCoordinateOperationType=model_.AbstractCoordinateOperationType(\n')
            self.AbstractCoordinateOperationType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractOperation> element')
            self.AbstractOperation = obj_
            obj_.original_tagname_ = 'AbstractOperation'
        elif nodeName_ == 'AbstractGeneralConversion':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralConversion> element')
            self.AbstractGeneralConversion = obj_
            obj_.original_tagname_ = 'AbstractGeneralConversion'
        elif nodeName_ == 'AbstractGeneralTransformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralTransformation> element')
            self.AbstractGeneralTransformation = obj_
            obj_.original_tagname_ = 'AbstractGeneralTransformation'
        elif nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.Conversion = obj_
            obj_.original_tagname_ = 'Conversion'
        elif nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.Transformation = obj_
            obj_.original_tagname_ = 'Transformation'
# end class OperationPropertyType


class TemporalCSPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, TemporalCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.TemporalCS = TemporalCS
    def factory(*args_, **kwargs_):
        if TemporalCSPropertyType.subclass:
            return TemporalCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return TemporalCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_TemporalCS(self): return self.TemporalCS
    def set_TemporalCS(self, TemporalCS): self.TemporalCS = TemporalCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.TemporalCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.TemporalCS is not None:
            self.TemporalCS.export(outfile, level, namespace_='gml:', name_='TemporalCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.TemporalCS is not None:
            showIndent(outfile, level)
            outfile.write('TemporalCS=model_.TemporalCSType(\n')
            self.TemporalCS.exportLiteral(outfile, level, name_='TemporalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'TemporalCS':
            obj_ = TemporalCSType.factory()
            obj_.build(child_)
            self.TemporalCS = obj_
            obj_.original_tagname_ = 'TemporalCS'
# end class TemporalCSPropertyType


class ObliqueCartesianCSPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, ObliqueCartesianCS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.ObliqueCartesianCS = ObliqueCartesianCS
    def factory(*args_, **kwargs_):
        if ObliqueCartesianCSPropertyType.subclass:
            return ObliqueCartesianCSPropertyType.subclass(*args_, **kwargs_)
        else:
            return ObliqueCartesianCSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ObliqueCartesianCS(self): return self.ObliqueCartesianCS
    def set_ObliqueCartesianCS(self, ObliqueCartesianCS): self.ObliqueCartesianCS = ObliqueCartesianCS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.ObliqueCartesianCS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ObliqueCartesianCSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ObliqueCartesianCSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ObliqueCartesianCSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ObliqueCartesianCSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ObliqueCartesianCSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ObliqueCartesianCS is not None:
            self.ObliqueCartesianCS.export(outfile, level, namespace_='gml:', name_='ObliqueCartesianCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ObliqueCartesianCSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.ObliqueCartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('ObliqueCartesianCS=model_.ObliqueCartesianCSType(\n')
            self.ObliqueCartesianCS.exportLiteral(outfile, level, name_='ObliqueCartesianCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ObliqueCartesianCS':
            obj_ = ObliqueCartesianCSType.factory()
            obj_.build(child_)
            self.ObliqueCartesianCS = obj_
            obj_.original_tagname_ = 'ObliqueCartesianCS'
# end class ObliqueCartesianCSPropertyType


class GeographicCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, usesEllipsoidalCS=None, usesGeodeticDatum=None):
        self.original_tagname_ = None
        super(GeographicCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.usesEllipsoidalCS = usesEllipsoidalCS
        self.usesGeodeticDatum = usesGeodeticDatum
    def factory(*args_, **kwargs_):
        if GeographicCRSType.subclass:
            return GeographicCRSType.subclass(*args_, **kwargs_)
        else:
            return GeographicCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_usesEllipsoidalCS(self): return self.usesEllipsoidalCS
    def set_usesEllipsoidalCS(self, usesEllipsoidalCS): self.usesEllipsoidalCS = usesEllipsoidalCS
    def get_usesGeodeticDatum(self): return self.usesGeodeticDatum
    def set_usesGeodeticDatum(self, usesGeodeticDatum): self.usesGeodeticDatum = usesGeodeticDatum
    def hasContent_(self):
        if (
            self.usesEllipsoidalCS is not None or
            self.usesGeodeticDatum is not None or
            super(GeographicCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeographicCRSType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeographicCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeographicCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeographicCRSType'):
        super(GeographicCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeographicCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeographicCRSType', fromsubclass_=False, pretty_print=True):
        super(GeographicCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.usesEllipsoidalCS is not None:
            self.usesEllipsoidalCS.export(outfile, level, namespace_='gml:', name_='usesEllipsoidalCS', pretty_print=pretty_print)
        if self.usesGeodeticDatum is not None:
            self.usesGeodeticDatum.export(outfile, level, namespace_='gml:', name_='usesGeodeticDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeographicCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GeographicCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeographicCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.usesEllipsoidalCS is not None:
            showIndent(outfile, level)
            outfile.write('usesEllipsoidalCS=model_.EllipsoidalCSPropertyType(\n')
            self.usesEllipsoidalCS.exportLiteral(outfile, level, name_='usesEllipsoidalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.usesGeodeticDatum is not None:
            showIndent(outfile, level)
            outfile.write('usesGeodeticDatum=model_.GeodeticDatumPropertyType(\n')
            self.usesGeodeticDatum.exportLiteral(outfile, level, name_='usesGeodeticDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GeographicCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'usesEllipsoidalCS':
            obj_ = EllipsoidalCSPropertyType.factory()
            obj_.build(child_)
            self.usesEllipsoidalCS = obj_
            obj_.original_tagname_ = 'usesEllipsoidalCS'
        elif nodeName_ == 'usesGeodeticDatum':
            obj_ = GeodeticDatumPropertyType.factory()
            obj_.build(child_)
            self.usesGeodeticDatum = obj_
            obj_.original_tagname_ = 'usesGeodeticDatum'
        super(GeographicCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class GeographicCRSType


class GeographicCRSPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, GeographicCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.GeographicCRS = GeographicCRS
    def factory(*args_, **kwargs_):
        if GeographicCRSPropertyType.subclass:
            return GeographicCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeographicCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_GeographicCRS(self): return self.GeographicCRS
    def set_GeographicCRS(self, GeographicCRS): self.GeographicCRS = GeographicCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.GeographicCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeographicCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeographicCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeographicCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeographicCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeographicCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.GeographicCRS is not None:
            self.GeographicCRS.export(outfile, level, namespace_='gml:', name_='GeographicCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeographicCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.GeographicCRS is not None:
            showIndent(outfile, level)
            outfile.write('GeographicCRS=model_.GeographicCRSType(\n')
            self.GeographicCRS.exportLiteral(outfile, level, name_='GeographicCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'GeographicCRS':
            obj_ = GeographicCRSType.factory()
            obj_.build(child_)
            self.GeographicCRS = obj_
            obj_.original_tagname_ = 'GeographicCRS'
# end class GeographicCRSPropertyType


class GeocentricCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, usesCartesianCS=None, usesSphericalCS=None, usesGeodeticDatum=None):
        self.original_tagname_ = None
        super(GeocentricCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.usesCartesianCS = usesCartesianCS
        self.usesSphericalCS = usesSphericalCS
        self.usesGeodeticDatum = usesGeodeticDatum
    def factory(*args_, **kwargs_):
        if GeocentricCRSType.subclass:
            return GeocentricCRSType.subclass(*args_, **kwargs_)
        else:
            return GeocentricCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_usesCartesianCS(self): return self.usesCartesianCS
    def set_usesCartesianCS(self, usesCartesianCS): self.usesCartesianCS = usesCartesianCS
    def get_usesSphericalCS(self): return self.usesSphericalCS
    def set_usesSphericalCS(self, usesSphericalCS): self.usesSphericalCS = usesSphericalCS
    def get_usesGeodeticDatum(self): return self.usesGeodeticDatum
    def set_usesGeodeticDatum(self, usesGeodeticDatum): self.usesGeodeticDatum = usesGeodeticDatum
    def hasContent_(self):
        if (
            self.usesCartesianCS is not None or
            self.usesSphericalCS is not None or
            self.usesGeodeticDatum is not None or
            super(GeocentricCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeocentricCRSType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeocentricCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeocentricCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeocentricCRSType'):
        super(GeocentricCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeocentricCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeocentricCRSType', fromsubclass_=False, pretty_print=True):
        super(GeocentricCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.usesCartesianCS is not None:
            self.usesCartesianCS.export(outfile, level, namespace_='gml:', name_='usesCartesianCS', pretty_print=pretty_print)
        if self.usesSphericalCS is not None:
            self.usesSphericalCS.export(outfile, level, namespace_='gml:', name_='usesSphericalCS', pretty_print=pretty_print)
        if self.usesGeodeticDatum is not None:
            self.usesGeodeticDatum.export(outfile, level, namespace_='gml:', name_='usesGeodeticDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeocentricCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GeocentricCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeocentricCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.usesCartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('usesCartesianCS=model_.CartesianCSPropertyType(\n')
            self.usesCartesianCS.exportLiteral(outfile, level, name_='usesCartesianCS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.usesSphericalCS is not None:
            showIndent(outfile, level)
            outfile.write('usesSphericalCS=model_.SphericalCSPropertyType(\n')
            self.usesSphericalCS.exportLiteral(outfile, level, name_='usesSphericalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.usesGeodeticDatum is not None:
            showIndent(outfile, level)
            outfile.write('usesGeodeticDatum=model_.GeodeticDatumPropertyType(\n')
            self.usesGeodeticDatum.exportLiteral(outfile, level, name_='usesGeodeticDatum')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GeocentricCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'usesCartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.usesCartesianCS = obj_
            obj_.original_tagname_ = 'usesCartesianCS'
        elif nodeName_ == 'usesSphericalCS':
            obj_ = SphericalCSPropertyType.factory()
            obj_.build(child_)
            self.usesSphericalCS = obj_
            obj_.original_tagname_ = 'usesSphericalCS'
        elif nodeName_ == 'usesGeodeticDatum':
            obj_ = GeodeticDatumPropertyType.factory()
            obj_.build(child_)
            self.usesGeodeticDatum = obj_
            obj_.original_tagname_ = 'usesGeodeticDatum'
        super(GeocentricCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class GeocentricCRSType


class GeocentricCRSPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, GeocentricCRS=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.GeocentricCRS = GeocentricCRS
    def factory(*args_, **kwargs_):
        if GeocentricCRSPropertyType.subclass:
            return GeocentricCRSPropertyType.subclass(*args_, **kwargs_)
        else:
            return GeocentricCRSPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_GeocentricCRS(self): return self.GeocentricCRS
    def set_GeocentricCRS(self, GeocentricCRS): self.GeocentricCRS = GeocentricCRS
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.GeocentricCRS is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeocentricCRSPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeocentricCRSPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeocentricCRSPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeocentricCRSPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeocentricCRSPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.GeocentricCRS is not None:
            self.GeocentricCRS.export(outfile, level, namespace_='gml:', name_='GeocentricCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeocentricCRSPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.GeocentricCRS is not None:
            showIndent(outfile, level)
            outfile.write('GeocentricCRS=model_.GeocentricCRSType(\n')
            self.GeocentricCRS.exportLiteral(outfile, level, name_='GeocentricCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'GeocentricCRS':
            obj_ = GeocentricCRSType.factory()
            obj_.build(child_)
            self.GeocentricCRS = obj_
            obj_.original_tagname_ = 'GeocentricCRS'
# end class GeocentricCRSPropertyType


class DMSAngleType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, degrees=None, decimalMinutes=None, minutes=None, seconds=None):
        self.original_tagname_ = None
        self.degrees = degrees
        self.decimalMinutes = decimalMinutes
        self.minutes = minutes
        self.seconds = seconds
    def factory(*args_, **kwargs_):
        if DMSAngleType.subclass:
            return DMSAngleType.subclass(*args_, **kwargs_)
        else:
            return DMSAngleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_degrees(self): return self.degrees
    def set_degrees(self, degrees): self.degrees = degrees
    def get_decimalMinutes(self): return self.decimalMinutes
    def set_decimalMinutes(self, decimalMinutes): self.decimalMinutes = decimalMinutes
    def get_minutes(self): return self.minutes
    def set_minutes(self, minutes): self.minutes = minutes
    def get_seconds(self): return self.seconds
    def set_seconds(self, seconds): self.seconds = seconds
    def hasContent_(self):
        if (
            self.degrees is not None or
            self.decimalMinutes is not None or
            self.minutes is not None or
            self.seconds is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DMSAngleType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DMSAngleType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DMSAngleType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DMSAngleType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DMSAngleType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.degrees is not None:
            self.degrees.export(outfile, level, namespace_='gml:', name_='degrees', pretty_print=pretty_print)
        if self.decimalMinutes is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdecimalMinutes>%s</%sdecimalMinutes>%s' % (namespace_, self.gds_format_float(self.decimalMinutes, input_name='decimalMinutes'), namespace_, eol_))
        if self.minutes is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sminutes>%s</%sminutes>%s' % (namespace_, self.gds_format_integer(self.minutes, input_name='minutes'), namespace_, eol_))
        if self.seconds is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sseconds>%s</%sseconds>%s' % (namespace_, self.gds_format_float(self.seconds, input_name='seconds'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='DMSAngleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.degrees is not None:
            showIndent(outfile, level)
            outfile.write('degrees=model_.degrees(\n')
            self.degrees.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.decimalMinutes is not None:
            showIndent(outfile, level)
            outfile.write('decimalMinutes=%f,\n' % self.decimalMinutes)
        if self.minutes is not None:
            showIndent(outfile, level)
            outfile.write('minutes=%d,\n' % self.minutes)
        if self.seconds is not None:
            showIndent(outfile, level)
            outfile.write('seconds=%f,\n' % self.seconds)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'degrees':
            obj_ = DegreesType.factory()
            obj_.build(child_)
            self.degrees = obj_
            obj_.original_tagname_ = 'degrees'
        elif nodeName_ == 'decimalMinutes':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'decimalMinutes')
            self.decimalMinutes = fval_
        elif nodeName_ == 'minutes':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            if ival_ < 0:
                raise_parse_error(child_, 'requires nonNegativeInteger')
            ival_ = self.gds_validate_integer(ival_, node, 'minutes')
            self.minutes = ival_
        elif nodeName_ == 'seconds':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'seconds')
            self.seconds = fval_
# end class DMSAngleType


class DegreesType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, direction=None, valueOf_=None):
        self.original_tagname_ = None
        self.direction = _cast(None, direction)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if DegreesType.subclass:
            return DegreesType.subclass(*args_, **kwargs_)
        else:
            return DegreesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_direction(self): return self.direction
    def set_direction(self, direction): self.direction = direction
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DegreesType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DegreesType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DegreesType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DegreesType'):
        if self.direction is not None and 'direction' not in already_processed:
            already_processed.add('direction')
            outfile.write(' direction=%s' % (self.gds_format_string(quote_attrib(self.direction).encode(ExternalEncoding), input_name='direction'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DegreesType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='DegreesType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.direction is not None and 'direction' not in already_processed:
            already_processed.add('direction')
            showIndent(outfile, level)
            outfile.write('direction="%s",\n' % (self.direction,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('direction', node)
        if value is not None and 'direction' not in already_processed:
            already_processed.add('direction')
            self.direction = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class DegreesType


class AngleChoiceType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, angle=None, dmsAngle=None):
        self.original_tagname_ = None
        self.angle = angle
        self.dmsAngle = dmsAngle
    def factory(*args_, **kwargs_):
        if AngleChoiceType.subclass:
            return AngleChoiceType.subclass(*args_, **kwargs_)
        else:
            return AngleChoiceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_angle(self): return self.angle
    def set_angle(self, angle): self.angle = angle
    def get_dmsAngle(self): return self.dmsAngle
    def set_dmsAngle(self, dmsAngle): self.dmsAngle = dmsAngle
    def hasContent_(self):
        if (
            self.angle is not None or
            self.dmsAngle is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AngleChoiceType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AngleChoiceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AngleChoiceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AngleChoiceType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AngleChoiceType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.angle is not None:
            self.angle.export(outfile, level, namespace_='gml:', name_='angle', pretty_print=pretty_print)
        if self.dmsAngle is not None:
            self.dmsAngle.export(outfile, level, namespace_='gml:', name_='dmsAngle', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AngleChoiceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.angle is not None:
            showIndent(outfile, level)
            outfile.write('angle=model_.AngleType(\n')
            self.angle.exportLiteral(outfile, level, name_='angle')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dmsAngle is not None:
            showIndent(outfile, level)
            outfile.write('dmsAngle=model_.DMSAngleType(\n')
            self.dmsAngle.exportLiteral(outfile, level, name_='dmsAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'angle':
            obj_ = AngleType.factory()
            obj_.build(child_)
            self.angle = obj_
            obj_.original_tagname_ = 'angle'
        elif nodeName_ == 'dmsAngle':
            obj_ = DMSAngleType.factory()
            obj_.build(child_)
            self.dmsAngle = obj_
            obj_.original_tagname_ = 'dmsAngle'
# end class AngleChoiceType


class ArrayAssociationType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, owns=False, AbstractObject=None):
        self.original_tagname_ = None
        self.owns = _cast(bool, owns)
        if AbstractObject is None:
            self.AbstractObject = []
        else:
            self.AbstractObject = AbstractObject
    def factory(*args_, **kwargs_):
        if ArrayAssociationType.subclass:
            return ArrayAssociationType.subclass(*args_, **kwargs_)
        else:
            return ArrayAssociationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractObject(self): return self.AbstractObject
    def set_AbstractObject(self, AbstractObject): self.AbstractObject = AbstractObject
    def add_AbstractObject(self, value): self.AbstractObject.append(value)
    def insert_AbstractObject_at(self, index, value): self.AbstractObject.insert(index, value)
    def replace_AbstractObject_at(self, index, value): self.AbstractObject[index] = value
    def get_owns(self): return self.owns
    def set_owns(self, owns): self.owns = owns
    def hasContent_(self):
        if (
            self.AbstractObject
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArrayAssociationType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArrayAssociationType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArrayAssociationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArrayAssociationType'):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            outfile.write(' owns="%s"' % self.gds_format_boolean(self.owns, input_name='owns'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArrayAssociationType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractObject_ in self.AbstractObject:
            AbstractObject_.export(outfile, level, namespace_, name_='AbstractObject', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArrayAssociationType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.owns is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            showIndent(outfile, level)
            outfile.write('owns=%s,\n' % (self.owns,))
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractObject=[\n')
        level += 1
        for AbstractObject_ in self.AbstractObject:
            showIndent(outfile, level)
            outfile.write('model_.AbstractObject_Type(\n')
            AbstractObject_.exportLiteral(outfile, level, name_='AbstractObject_Type')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('owns', node)
        if value is not None and 'owns' not in already_processed:
            already_processed.add('owns')
            if value in ('true', '1'):
                self.owns = True
            elif value in ('false', '0'):
                self.owns = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractObject':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractObject> element')
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AbstractObject'
        elif nodeName_ == 'AbstractCurveSegment':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurveSegment> element')
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AbstractCurveSegment'
        elif nodeName_ == 'AffinePlacement':
            obj_ = AffinePlacementType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AffinePlacement'
        elif nodeName_ == 'Shell':
            obj_ = ShellType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'Shell'
        elif nodeName_ == 'AbstractRing':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractRing> element')
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AbstractRing'
        elif nodeName_ == 'Envelope':
            class_obj_ = self.get_class_obj_(child_, EnvelopeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'Envelope'
        elif nodeName_ == 'AbstractGML':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGML> element')
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AbstractGML'
        elif nodeName_ == 'DataBlock':
            obj_ = DataBlockType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'DataBlock'
        elif nodeName_ == 'File':
            obj_ = FileType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'File'
        elif nodeName_ == 'coverageFunction':
            obj_ = CoverageFunctionType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'coverageFunction'
        elif nodeName_ == 'CoverageMappingRule':
            obj_ = MappingRuleType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'CoverageMappingRule'
        elif nodeName_ == 'GridFunction':
            obj_ = GridFunctionType.factory()
            obj_.build(child_)
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'GridFunction'
        elif nodeName_ == 'AbstractValue':
            AbstractValue_ = child_.text
            AbstractValue_ = self.gds_validate_string(AbstractValue_, node, 'AbstractValue')
            self.AbstractValue = AbstractValue_
        elif nodeName_ == 'AbstractGeneralParameterValue':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralParameterValue> element')
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AbstractGeneralParameterValue'
        elif nodeName_ == 'AbstractMetaData':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractMetaData> element')
            self.AbstractObject.append(obj_)
            obj_.original_tagname_ = 'AbstractMetaData'
        elif nodeName_ == 'LineStringSegment':
            obj_ = LineStringSegmentType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'LineStringSegment'
        elif nodeName_ == 'ArcString':
            obj_ = ArcStringType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'ArcString'
        elif nodeName_ == 'ArcStringByBulge':
            obj_ = ArcStringByBulgeType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'ArcStringByBulge'
        elif nodeName_ == 'ArcByCenterPoint':
            obj_ = ArcByCenterPointType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'ArcByCenterPoint'
        elif nodeName_ == 'CubicSpline':
            obj_ = CubicSplineType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'CubicSpline'
        elif nodeName_ == 'BSpline':
            obj_ = BSplineType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'BSpline'
        elif nodeName_ == 'OffsetCurve':
            obj_ = OffsetCurveType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'OffsetCurve'
        elif nodeName_ == 'Clothoid':
            obj_ = ClothoidType.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'Clothoid'
        elif nodeName_ == 'GeodesicString':
            class_obj_ = self.get_class_obj_(child_, GeodesicStringType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractCurveSegment.append(obj_)
            obj_.original_tagname_ = 'GeodesicString'
        elif nodeName_ == 'Arc':
            class_obj_ = self.get_class_obj_(child_, ArcType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.ArcString.append(obj_)
            obj_.original_tagname_ = 'Arc'
        elif nodeName_ == 'Circle':
            obj_ = CircleType.factory()
            obj_.build(child_)
            self.Arc.append(obj_)
            obj_.original_tagname_ = 'Circle'
        elif nodeName_ == 'ArcByBulge':
            obj_ = ArcByBulgeType.factory()
            obj_.build(child_)
            self.ArcStringByBulge.append(obj_)
            obj_.original_tagname_ = 'ArcByBulge'
        elif nodeName_ == 'CircleByCenterPoint':
            obj_ = CircleByCenterPointType.factory()
            obj_.build(child_)
            self.ArcByCenterPoint.append(obj_)
            obj_.original_tagname_ = 'CircleByCenterPoint'
        elif nodeName_ == 'Bezier':
            obj_ = BezierType.factory()
            obj_.build(child_)
            self.BSpline.append(obj_)
            obj_.original_tagname_ = 'Bezier'
        elif nodeName_ == 'Geodesic':
            obj_ = GeodesicType.factory()
            obj_.build(child_)
            self.GeodesicString.append(obj_)
            obj_.original_tagname_ = 'Geodesic'
        elif nodeName_ == 'Ring':
            obj_ = RingType.factory()
            obj_.build(child_)
            self.AbstractRing.append(obj_)
            obj_.original_tagname_ = 'Ring'
        elif nodeName_ == 'LinearRing':
            obj_ = LinearRingType.factory()
            obj_.build(child_)
            self.AbstractRing.append(obj_)
            obj_.original_tagname_ = 'LinearRing'
        elif nodeName_ == 'EnvelopeWithTimePeriod':
            obj_ = EnvelopeWithTimePeriodType.factory()
            obj_.build(child_)
            self.Envelope.append(obj_)
            obj_.original_tagname_ = 'EnvelopeWithTimePeriod'
        elif nodeName_ == 'AbstractTimeSlice':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeSlice> element')
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'AbstractTimeSlice'
        elif nodeName_ == 'AbstractTopology':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTopology> element')
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'AbstractTopology'
        elif nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'Definition':
            class_obj_ = self.get_class_obj_(child_, DefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'Definition'
        elif nodeName_ == 'AbstractFeature':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeature> element')
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'AbstractFeature'
        elif nodeName_ == 'AbstractTimeObject':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeObject> element')
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'AbstractTimeObject'
        elif nodeName_ == 'Bag':
            obj_ = BagType.factory()
            obj_.build(child_)
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'Bag'
        elif nodeName_ == 'Array':
            obj_ = ArrayType.factory()
            obj_.build(child_)
            self.AbstractGML.append(obj_)
            obj_.original_tagname_ = 'Array'
        elif nodeName_ == 'MovingObjectStatus':
            obj_ = MovingObjectStatusType.factory()
            obj_.build(child_)
            self.AbstractTimeSlice.append(obj_)
            obj_.original_tagname_ = 'MovingObjectStatus'
        elif nodeName_ == 'AbstractTopoPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTopoPrimitive> element')
            self.AbstractTopology.append(obj_)
            obj_.original_tagname_ = 'AbstractTopoPrimitive'
        elif nodeName_ == 'TopoComplex':
            obj_ = TopoComplexType.factory()
            obj_.build(child_)
            self.AbstractTopology.append(obj_)
            obj_.original_tagname_ = 'TopoComplex'
        elif nodeName_ == 'Node':
            obj_ = NodeType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'Node'
        elif nodeName_ == 'Edge':
            obj_ = EdgeType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'Edge'
        elif nodeName_ == 'Face':
            obj_ = FaceType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'Face'
        elif nodeName_ == 'TopoSolid':
            obj_ = TopoSolidType.factory()
            obj_.build(child_)
            self.AbstractTopoPrimitive.append(obj_)
            obj_.original_tagname_ = 'TopoSolid'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractGeometry.append(obj_)
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.AbstractGeometricAggregate.append(obj_)
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.AbstractSolid.append(obj_)
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.AbstractSurface.append(obj_)
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface.append(obj_)
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface.append(obj_)
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.TriangulatedSurface.append(obj_)
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.AbstractCurve.append(obj_)
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractImplicitGeometry.append(obj_)
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.Grid.append(obj_)
            obj_.original_tagname_ = 'RectifiedGrid'
        elif nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'Dictionary':
            obj_ = DictionaryType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'Dictionary'
        elif nodeName_ == 'CoordinateSystemAxis':
            obj_ = CoordinateSystemAxisType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'CoordinateSystemAxis'
        elif nodeName_ == 'AbstractCoordinateSystem':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoordinateSystem> element')
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'AbstractCoordinateSystem'
        elif nodeName_ == 'AbstractCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCRS> element')
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'AbstractCRS'
        elif nodeName_ == 'AbstractDatum':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDatum> element')
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'AbstractDatum'
        elif nodeName_ == 'Ellipsoid':
            obj_ = EllipsoidType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'Ellipsoid'
        elif nodeName_ == 'PrimeMeridian':
            obj_ = PrimeMeridianType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'PrimeMeridian'
        elif nodeName_ == 'AbstractCoordinateOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoordinateOperation> element')
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'AbstractCoordinateOperation'
        elif nodeName_ == 'OperationMethod':
            obj_ = OperationMethodType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'OperationMethod'
        elif nodeName_ == 'AbstractGeneralOperationParameter':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralOperationParameter> element')
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'AbstractGeneralOperationParameter'
        elif nodeName_ == 'TimeReferenceSystem':
            class_obj_ = self.get_class_obj_(child_, TimeReferenceSystemType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'TimeReferenceSystem'
        elif nodeName_ == 'DefinitionCollection':
            obj_ = DictionaryType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'DefinitionCollection'
        elif nodeName_ == 'DefinitionProxy':
            obj_ = DefinitionProxyType.factory()
            obj_.build(child_)
            self.Definition.append(obj_)
            obj_.original_tagname_ = 'DefinitionProxy'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.UnitDefinition.append(obj_)
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.UnitDefinition.append(obj_)
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.UnitDefinition.append(obj_)
            obj_.original_tagname_ = 'ConventionalUnit'
        elif nodeName_ == 'EllipsoidalCS':
            obj_ = EllipsoidalCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'EllipsoidalCS'
        elif nodeName_ == 'CartesianCS':
            obj_ = CartesianCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'CartesianCS'
        elif nodeName_ == 'VerticalCS':
            obj_ = VerticalCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'VerticalCS'
        elif nodeName_ == 'TimeCS':
            obj_ = TimeCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'TimeCS'
        elif nodeName_ == 'LinearCS':
            obj_ = LinearCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'LinearCS'
        elif nodeName_ == 'UserDefinedCS':
            obj_ = UserDefinedCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'UserDefinedCS'
        elif nodeName_ == 'SphericalCS':
            obj_ = SphericalCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'SphericalCS'
        elif nodeName_ == 'PolarCS':
            obj_ = PolarCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'PolarCS'
        elif nodeName_ == 'CylindricalCS':
            obj_ = CylindricalCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'CylindricalCS'
        elif nodeName_ == 'AffineCS':
            obj_ = AffineCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'AffineCS'
        elif nodeName_ == 'TemporalCS':
            obj_ = TemporalCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'TemporalCS'
        elif nodeName_ == 'ObliqueCartesianCS':
            obj_ = ObliqueCartesianCSType.factory()
            obj_.build(child_)
            self.AbstractCoordinateSystem.append(obj_)
            obj_.original_tagname_ = 'ObliqueCartesianCS'
        elif nodeName_ == 'AbstractSingleCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleCRS> element')
            self.AbstractCRS.append(obj_)
            obj_.original_tagname_ = 'AbstractSingleCRS'
        elif nodeName_ == 'CompoundCRS':
            obj_ = CompoundCRSType.factory()
            obj_.build(child_)
            self.AbstractCRS.append(obj_)
            obj_.original_tagname_ = 'CompoundCRS'
        elif nodeName_ == 'AbstractGeneralDerivedCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralDerivedCRS> element')
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'AbstractGeneralDerivedCRS'
        elif nodeName_ == 'GeodeticCRS':
            obj_ = GeodeticCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'GeodeticCRS'
        elif nodeName_ == 'VerticalCRS':
            obj_ = VerticalCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'VerticalCRS'
        elif nodeName_ == 'EngineeringCRS':
            obj_ = EngineeringCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'EngineeringCRS'
        elif nodeName_ == 'ImageCRS':
            obj_ = ImageCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'ImageCRS'
        elif nodeName_ == 'TemporalCRS':
            obj_ = TemporalCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'TemporalCRS'
        elif nodeName_ == 'GeographicCRS':
            obj_ = GeographicCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'GeographicCRS'
        elif nodeName_ == 'GeocentricCRS':
            obj_ = GeocentricCRSType.factory()
            obj_.build(child_)
            self.AbstractSingleCRS.append(obj_)
            obj_.original_tagname_ = 'GeocentricCRS'
        elif nodeName_ == 'ProjectedCRS':
            obj_ = ProjectedCRSType.factory()
            obj_.build(child_)
            self.AbstractGeneralDerivedCRS.append(obj_)
            obj_.original_tagname_ = 'ProjectedCRS'
        elif nodeName_ == 'DerivedCRS':
            obj_ = DerivedCRSType.factory()
            obj_.build(child_)
            self.AbstractGeneralDerivedCRS.append(obj_)
            obj_.original_tagname_ = 'DerivedCRS'
        elif nodeName_ == 'GeodeticDatum':
            obj_ = GeodeticDatumType.factory()
            obj_.build(child_)
            self.AbstractDatum.append(obj_)
            obj_.original_tagname_ = 'GeodeticDatum'
        elif nodeName_ == 'EngineeringDatum':
            obj_ = EngineeringDatumType.factory()
            obj_.build(child_)
            self.AbstractDatum.append(obj_)
            obj_.original_tagname_ = 'EngineeringDatum'
        elif nodeName_ == 'ImageDatum':
            obj_ = ImageDatumType.factory()
            obj_.build(child_)
            self.AbstractDatum.append(obj_)
            obj_.original_tagname_ = 'ImageDatum'
        elif nodeName_ == 'VerticalDatum':
            obj_ = VerticalDatumType.factory()
            obj_.build(child_)
            self.AbstractDatum.append(obj_)
            obj_.original_tagname_ = 'VerticalDatum'
        elif nodeName_ == 'TemporalDatum':
            obj_ = TemporalDatumType.factory()
            obj_.build(child_)
            self.AbstractDatum.append(obj_)
            obj_.original_tagname_ = 'TemporalDatum'
        elif nodeName_ == 'AbstractSingleOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleOperation> element')
            self.AbstractCoordinateOperation.append(obj_)
            obj_.original_tagname_ = 'AbstractSingleOperation'
        elif nodeName_ == 'ConcatenatedOperation':
            obj_ = ConcatenatedOperationType.factory()
            obj_.build(child_)
            self.AbstractCoordinateOperation.append(obj_)
            obj_.original_tagname_ = 'ConcatenatedOperation'
        elif nodeName_ == 'PassThroughOperation':
            obj_ = PassThroughOperationType.factory()
            obj_.build(child_)
            self.AbstractSingleOperation.append(obj_)
            obj_.original_tagname_ = 'PassThroughOperation'
        elif nodeName_ == 'AbstractOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractOperation> element')
            self.AbstractSingleOperation.append(obj_)
            obj_.original_tagname_ = 'AbstractOperation'
        elif nodeName_ == 'AbstractGeneralConversion':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralConversion> element')
            self.AbstractOperation.append(obj_)
            obj_.original_tagname_ = 'AbstractGeneralConversion'
        elif nodeName_ == 'AbstractGeneralTransformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralTransformation> element')
            self.AbstractOperation.append(obj_)
            obj_.original_tagname_ = 'AbstractGeneralTransformation'
        elif nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.AbstractGeneralConversion.append(obj_)
            obj_.original_tagname_ = 'Conversion'
        elif nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.AbstractGeneralTransformation.append(obj_)
            obj_.original_tagname_ = 'Transformation'
        elif nodeName_ == 'OperationParameter':
            obj_ = OperationParameterType.factory()
            obj_.build(child_)
            self.AbstractGeneralOperationParameter.append(obj_)
            obj_.original_tagname_ = 'OperationParameter'
        elif nodeName_ == 'OperationParameterGroup':
            obj_ = OperationParameterGroupType.factory()
            obj_.build(child_)
            self.AbstractGeneralOperationParameter.append(obj_)
            obj_.original_tagname_ = 'OperationParameterGroup'
        elif nodeName_ == 'TimeCoordinateSystem':
            obj_ = TimeCoordinateSystemType.factory()
            obj_.build(child_)
            self.TimeReferenceSystem.append(obj_)
            obj_.original_tagname_ = 'TimeCoordinateSystem'
        elif nodeName_ == 'TimeCalendar':
            obj_ = TimeCalendarType.factory()
            obj_.build(child_)
            self.TimeReferenceSystem.append(obj_)
            obj_.original_tagname_ = 'TimeCalendar'
        elif nodeName_ == 'TimeClock':
            obj_ = TimeClockType.factory()
            obj_.build(child_)
            self.TimeReferenceSystem.append(obj_)
            obj_.original_tagname_ = 'TimeClock'
        elif nodeName_ == 'TimeOrdinalReferenceSystem':
            obj_ = TimeOrdinalReferenceSystemType.factory()
            obj_.build(child_)
            self.TimeReferenceSystem.append(obj_)
            obj_.original_tagname_ = 'TimeOrdinalReferenceSystem'
        elif nodeName_ == 'DynamicFeature':
            class_obj_ = self.get_class_obj_(child_, DynamicFeatureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'DynamicFeature'
        elif nodeName_ == 'AbstractCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoverage> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractCoverage'
        elif nodeName_ == 'AbstractContinuousCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractContinuousCoverage> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractContinuousCoverage'
        elif nodeName_ == 'Observation':
            class_obj_ = self.get_class_obj_(child_, ObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'Observation'
        elif nodeName_ == 'AbstractFeatureCollection':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeatureCollection> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractFeatureCollection'
        elif nodeName_ == 'FeatureCollection':
            obj_ = FeatureCollectionType.factory()
            obj_.build(child_)
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'FeatureCollection'
        elif nodeName_ == 'DynamicFeatureCollection':
            obj_ = DynamicFeatureCollectionType.factory()
            obj_.build(child_)
            self.DynamicFeature.append(obj_)
            obj_.original_tagname_ = 'DynamicFeatureCollection'
        elif nodeName_ == 'AbstractDiscreteCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractCoverage.append(obj_)
            obj_.original_tagname_ = 'AbstractDiscreteCoverage'
        elif nodeName_ == 'MultiPointCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiPointCoverage'
        elif nodeName_ == 'MultiCurveCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiCurveCoverage'
        elif nodeName_ == 'MultiSurfaceCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiSurfaceCoverage'
        elif nodeName_ == 'MultiSolidCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiSolidCoverage'
        elif nodeName_ == 'GridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'GridCoverage'
        elif nodeName_ == 'RectifiedGridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'RectifiedGridCoverage'
        elif nodeName_ == 'DirectedObservation':
            class_obj_ = self.get_class_obj_(child_, DirectedObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Observation.append(obj_)
            obj_.original_tagname_ = 'DirectedObservation'
        elif nodeName_ == 'DirectedObservationAtDistance':
            obj_ = DirectedObservationAtDistanceType.factory()
            obj_.build(child_)
            self.DirectedObservation.append(obj_)
            obj_.original_tagname_ = 'DirectedObservationAtDistance'
        elif nodeName_ == 'AbstractTimePrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimePrimitive> element')
            self.AbstractTimeObject.append(obj_)
            obj_.original_tagname_ = 'AbstractTimePrimitive'
        elif nodeName_ == 'AbstractTimeComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeComplex> element')
            self.AbstractTimeObject.append(obj_)
            obj_.original_tagname_ = 'AbstractTimeComplex'
        elif nodeName_ == 'AbstractTimeGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeGeometricPrimitive> element')
            self.AbstractTimePrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractTimeGeometricPrimitive'
        elif nodeName_ == 'AbstractTimeTopologyPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractTimeTopologyPrimitive> element')
            self.AbstractTimePrimitive.append(obj_)
            obj_.original_tagname_ = 'AbstractTimeTopologyPrimitive'
        elif nodeName_ == 'TimeInstant':
            obj_ = TimeInstantType.factory()
            obj_.build(child_)
            self.AbstractTimeGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'TimeInstant'
        elif nodeName_ == 'TimePeriod':
            obj_ = TimePeriodType.factory()
            obj_.build(child_)
            self.AbstractTimeGeometricPrimitive.append(obj_)
            obj_.original_tagname_ = 'TimePeriod'
        elif nodeName_ == 'TimeNode':
            obj_ = TimeNodeType.factory()
            obj_.build(child_)
            self.AbstractTimeTopologyPrimitive.append(obj_)
            obj_.original_tagname_ = 'TimeNode'
        elif nodeName_ == 'TimeEdge':
            obj_ = TimeEdgeType.factory()
            obj_.build(child_)
            self.AbstractTimeTopologyPrimitive.append(obj_)
            obj_.original_tagname_ = 'TimeEdge'
        elif nodeName_ == 'TimeTopologyComplex':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <TimeTopologyComplex> element')
            self.AbstractTimeComplex.append(obj_)
            obj_.original_tagname_ = 'TimeTopologyComplex'
        elif nodeName_ == 'AbstractScalarValue':
            AbstractScalarValue_ = child_.text
            AbstractScalarValue_ = self.gds_validate_string(AbstractScalarValue_, node, 'AbstractScalarValue')
            self.AbstractScalarValue = AbstractScalarValue_
        elif nodeName_ == 'AbstractScalarValueList':
            AbstractScalarValueList_ = child_.text
            AbstractScalarValueList_ = self.gds_validate_string(AbstractScalarValueList_, node, 'AbstractScalarValueList')
            self.AbstractScalarValueList = AbstractScalarValueList_
        elif nodeName_ == 'CompositeValue':
            class_obj_ = self.get_class_obj_(child_, CompositeValueType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractValue.append(obj_)
            obj_.original_tagname_ = 'CompositeValue'
        elif nodeName_ == 'CategoryExtent':
            obj_ = CategoryExtentType.factory()
            obj_.build(child_)
            self.AbstractValue.append(obj_)
            obj_.original_tagname_ = 'CategoryExtent'
        elif nodeName_ == 'CountExtent':
            CountExtent_ = child_.text
            CountExtent_ = self.gds_validate_string(CountExtent_, node, 'CountExtent')
            self.CountExtent = CountExtent_
            self.validate_CountExtentType(self.CountExtent)    # validate type CountExtentType
        elif nodeName_ == 'QuantityExtent':
            obj_ = QuantityExtentType.factory()
            obj_.build(child_)
            self.AbstractValue.append(obj_)
            obj_.original_tagname_ = 'QuantityExtent'
        elif nodeName_ == 'Boolean':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'Boolean')
            self.Boolean = ival_
        elif nodeName_ == 'Category':
            obj_ = Category.factory()
            obj_.build(child_)
            self.AbstractScalarValue.append(obj_)
            obj_.original_tagname_ = 'Category'
        elif nodeName_ == 'Count':
            obj_ = Count.factory()
            obj_.build(child_)
            self.AbstractScalarValue.append(obj_)
            obj_.original_tagname_ = 'Count'
        elif nodeName_ == 'Quantity':
            obj_ = Quantity.factory()
            obj_.build(child_)
            self.AbstractScalarValue.append(obj_)
            obj_.original_tagname_ = 'Quantity'
        elif nodeName_ == 'BooleanList':
            BooleanList_ = child_.text
            self.BooleanList = BooleanList_
            self.BooleanList = self.BooleanList.split()
            self.validate_booleanOrNilReasonList(self.BooleanList)    # validate type booleanOrNilReasonList
        elif nodeName_ == 'CategoryList':
            class_obj_ = self.get_class_obj_(child_, CodeOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractScalarValueList.append(obj_)
            obj_.original_tagname_ = 'CategoryList'
        elif nodeName_ == 'CountList':
            CountList_ = child_.text
            self.CountList = CountList_
            self.CountList = self.CountList.split()
            self.validate_integerOrNilReasonList(self.CountList)    # validate type integerOrNilReasonList
        elif nodeName_ == 'QuantityList':
            class_obj_ = self.get_class_obj_(child_, MeasureOrNilReasonListType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractScalarValueList.append(obj_)
            obj_.original_tagname_ = 'QuantityList'
        elif nodeName_ == 'ValueArray':
            obj_ = ValueArrayType.factory()
            obj_.build(child_)
            self.CompositeValue.append(obj_)
            obj_.original_tagname_ = 'ValueArray'
        elif nodeName_ == 'ParameterValue':
            obj_ = ParameterValueType.factory()
            obj_.build(child_)
            self.AbstractGeneralParameterValue.append(obj_)
            obj_.original_tagname_ = 'ParameterValue'
        elif nodeName_ == 'ParameterValueGroup':
            obj_ = ParameterValueGroupType.factory()
            obj_.build(child_)
            self.AbstractGeneralParameterValue.append(obj_)
            obj_.original_tagname_ = 'ParameterValueGroup'
        elif nodeName_ == 'GenericMetaData':
            obj_ = GenericMetaDataType.factory()
            obj_.build(child_)
            self.AbstractMetaData.append(obj_)
            obj_.original_tagname_ = 'GenericMetaData'
# end class ArrayAssociationType


class StringOrRefType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, valueOf_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if StringOrRefType.subclass:
            return StringOrRefType.subclass(*args_, **kwargs_)
        else:
            return StringOrRefType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='StringOrRefType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='StringOrRefType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='StringOrRefType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='StringOrRefType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='StringOrRefType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='StringOrRefType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class StringOrRefType


class BagType(AbstractGMLType):
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, member=None, members=None):
        self.original_tagname_ = None
        super(BagType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        if member is None:
            self.member = []
        else:
            self.member = member
        self.members = members
    def factory(*args_, **kwargs_):
        if BagType.subclass:
            return BagType.subclass(*args_, **kwargs_)
        else:
            return BagType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_member(self): return self.member
    def set_member(self, member): self.member = member
    def add_member(self, value): self.member.append(value)
    def insert_member_at(self, index, value): self.member.insert(index, value)
    def replace_member_at(self, index, value): self.member[index] = value
    def get_members(self): return self.members
    def set_members(self, members): self.members = members
    def hasContent_(self):
        if (
            self.member or
            self.members is not None or
            super(BagType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BagType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BagType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BagType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BagType'):
        super(BagType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='BagType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BagType', fromsubclass_=False, pretty_print=True):
        super(BagType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for member_ in self.member:
            member_.export(outfile, level, namespace_='gml:', name_='member', pretty_print=pretty_print)
        if self.members is not None:
            self.members.export(outfile, level, namespace_='gml:', name_='members', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='BagType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(BagType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(BagType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('member=[\n')
        level += 1
        for member_ in self.member:
            showIndent(outfile, level)
            outfile.write('model_.AssociationRoleType(\n')
            member_.exportLiteral(outfile, level, name_='AssociationRoleType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.members is not None:
            showIndent(outfile, level)
            outfile.write('members=model_.ArrayAssociationType(\n')
            self.members.exportLiteral(outfile, level, name_='members')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(BagType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'member':
            obj_ = AssociationRoleType.factory()
            obj_.build(child_)
            self.member.append(obj_)
            obj_.original_tagname_ = 'member'
        elif nodeName_ == 'members':
            obj_ = ArrayAssociationType.factory()
            obj_.build(child_)
            self.members = obj_
            obj_.original_tagname_ = 'members'
        super(BagType, self).buildChildren(child_, node, nodeName_, True)
# end class BagType


class ArrayType(AbstractGMLType):
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, members=None):
        self.original_tagname_ = None
        super(ArrayType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.members = members
    def factory(*args_, **kwargs_):
        if ArrayType.subclass:
            return ArrayType.subclass(*args_, **kwargs_)
        else:
            return ArrayType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_members(self): return self.members
    def set_members(self, members): self.members = members
    def hasContent_(self):
        if (
            self.members is not None or
            super(ArrayType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ArrayType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArrayType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ArrayType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ArrayType'):
        super(ArrayType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ArrayType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ArrayType', fromsubclass_=False, pretty_print=True):
        super(ArrayType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.members is not None:
            self.members.export(outfile, level, namespace_='gml:', name_='members', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ArrayType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ArrayType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ArrayType, self).exportLiteralChildren(outfile, level, name_)
        if self.members is not None:
            showIndent(outfile, level)
            outfile.write('members=model_.ArrayAssociationType(\n')
            self.members.exportLiteral(outfile, level, name_='members')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ArrayType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'members':
            obj_ = ArrayAssociationType.factory()
            obj_.build(child_)
            self.members = obj_
            obj_.original_tagname_ = 'members'
        super(ArrayType, self).buildChildren(child_, node, nodeName_, True)
# end class ArrayType


class MetaDataPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, about=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractMetaData=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.about = _cast(None, about)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractMetaData = AbstractMetaData
    def factory(*args_, **kwargs_):
        if MetaDataPropertyType.subclass:
            return MetaDataPropertyType.subclass(*args_, **kwargs_)
        else:
            return MetaDataPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractMetaData(self): return self.AbstractMetaData
    def set_AbstractMetaData(self, AbstractMetaData): self.AbstractMetaData = AbstractMetaData
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_about(self): return self.about
    def set_about(self, about): self.about = about
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.AbstractMetaData is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MetaDataPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MetaDataPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MetaDataPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MetaDataPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.about is not None and 'about' not in already_processed:
            already_processed.add('about')
            outfile.write(' about=%s' % (self.gds_format_string(quote_attrib(self.about).encode(ExternalEncoding), input_name='about'), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MetaDataPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractMetaData is not None:
            self.AbstractMetaData.export(outfile, level, namespace_, name_='AbstractMetaData', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MetaDataPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.about is not None and 'about' not in already_processed:
            already_processed.add('about')
            showIndent(outfile, level)
            outfile.write('about="%s",\n' % (self.about,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractMetaData is not None:
            showIndent(outfile, level)
            outfile.write('AbstractMetaData=model_.AbstractMetaData(\n')
            self.AbstractMetaData.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('about', node)
        if value is not None and 'about' not in already_processed:
            already_processed.add('about')
            self.about = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractMetaData':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractMetaData> element')
            self.AbstractMetaData = obj_
            obj_.original_tagname_ = 'AbstractMetaData'
        elif nodeName_ == 'GenericMetaData':
            obj_ = GenericMetaDataType.factory()
            obj_.build(child_)
            self.GenericMetaData = obj_
            obj_.original_tagname_ = 'GenericMetaData'
# end class MetaDataPropertyType


class AbstractMetaDataType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, valueOf_=None, mixedclass_=None, content_=None, extensiontype_=None):
        self.original_tagname_ = None
        self.id = _cast(None, id)
        self.valueOf_ = valueOf_
        self.extensiontype_ = extensiontype_
        if mixedclass_ is None:
            self.mixedclass_ = MixedContainer
        else:
            self.mixedclass_ = mixedclass_
        if content_ is None:
            self.content_ = []
        else:
            self.content_ = content_
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if AbstractMetaDataType.subclass:
            return AbstractMetaDataType.subclass(*args_, **kwargs_)
        else:
            return AbstractMetaDataType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.valueOf_
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractMetaDataType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMetaDataType')
        outfile.write('>')
        self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)
        outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractMetaDataType'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractMetaDataType', fromsubclass_=False, pretty_print=True):
        pass
    def exportLiteral(self, outfile, level, name_='AbstractMetaDataType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            showIndent(outfile, level)
            outfile.write('id="%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        if node.text is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', node.text)
            self.content_.append(obj_)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        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_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if not fromsubclass_ and child_.tail is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', child_.tail)
            self.content_.append(obj_)
        pass
# end class AbstractMetaDataType


class GenericMetaDataType(AbstractMetaDataType):
    subclass = None
    superclass = AbstractMetaDataType
    def __init__(self, id=None, anytypeobjs_=None, valueOf_=None, mixedclass_=None, content_=None):
        self.original_tagname_ = None
        super(GenericMetaDataType, self).__init__(id, valueOf_, mixedclass_, content_, )
        if anytypeobjs_ is None:
            self.anytypeobjs_ = []
        else:
            self.anytypeobjs_ = anytypeobjs_
        self.valueOf_ = valueOf_
        if mixedclass_ is None:
            self.mixedclass_ = MixedContainer
        else:
            self.mixedclass_ = mixedclass_
        if content_ is None:
            self.content_ = []
        else:
            self.content_ = content_
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if GenericMetaDataType.subclass:
            return GenericMetaDataType.subclass(*args_, **kwargs_)
        else:
            return GenericMetaDataType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_anytypeobjs_(self): return self.anytypeobjs_
    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)
    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.anytypeobjs_ or
            self.valueOf_ or
            super(GenericMetaDataType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GenericMetaDataType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GenericMetaDataType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GenericMetaDataType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GenericMetaDataType'):
        super(GenericMetaDataType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GenericMetaDataType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GenericMetaDataType', fromsubclass_=False, pretty_print=True):
        super(GenericMetaDataType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if not fromsubclass_:
            for item_ in self.content_:
                item_.export(outfile, level, item_.name, namespace_, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GenericMetaDataType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GenericMetaDataType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GenericMetaDataType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('content_ = [\n')
        for item_ in self.content_:
            item_.exportLiteral(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('],\n')
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        if node.text is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', node.text)
            self.content_.append(obj_)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GenericMetaDataType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == '':
            obj_ = __ANY__.factory()
            obj_.build(child_)
            obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
                MixedContainer.TypeNone, '', obj_)
            self.content_.append(obj_)
            if hasattr(self, 'add_'):
              self.add_(obj_.value)
            elif hasattr(self, 'set_'):
              self.set_(obj_.value)
        if not fromsubclass_ and child_.tail is not None:
            obj_ = self.mixedclass_(MixedContainer.CategoryText,
                MixedContainer.TypeNone, '', child_.tail)
            self.content_.append(obj_)
        super(GenericMetaDataType, self).buildChildren(child_, node, nodeName_, True)
# end class GenericMetaDataType


class LocationPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeometry=None, LocationKeyWord=None, LocationString=None, Null=None, extensiontype_=None):
        self.original_tagname_ = None
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.AbstractGeometry = AbstractGeometry
        self.LocationKeyWord = LocationKeyWord
        self.LocationString = LocationString
        self.Null = Null
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if LocationPropertyType.subclass:
            return LocationPropertyType.subclass(*args_, **kwargs_)
        else:
            return LocationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractGeometry(self): return self.AbstractGeometry
    def set_AbstractGeometry(self, AbstractGeometry): self.AbstractGeometry = AbstractGeometry
    def get_LocationKeyWord(self): return self.LocationKeyWord
    def set_LocationKeyWord(self, LocationKeyWord): self.LocationKeyWord = LocationKeyWord
    def get_LocationString(self): return self.LocationString
    def set_LocationString(self, LocationString): self.LocationString = LocationString
    def get_Null(self): return self.Null
    def set_Null(self, Null): self.Null = Null
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_NilReasonType(self, value):
        # Validate type NilReasonType, a restriction on None.
        pass
    def hasContent_(self):
        if (
            self.AbstractGeometry is not None or
            self.LocationKeyWord is not None or
            self.LocationString is not None or
            self.Null is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LocationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LocationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LocationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LocationPropertyType'):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LocationPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.AbstractGeometry is not None:
            self.AbstractGeometry.export(outfile, level, namespace_, name_='AbstractGeometry', pretty_print=pretty_print)
        if self.LocationKeyWord is not None:
            self.LocationKeyWord.export(outfile, level, namespace_='gml:', name_='LocationKeyWord', pretty_print=pretty_print)
        if self.LocationString is not None:
            self.LocationString.export(outfile, level, namespace_='gml:', name_='LocationString', pretty_print=pretty_print)
        if self.Null is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sNull>%s</%sNull>%s' % ('gml:', self.gds_format_string(quote_xml(self.Null).encode(ExternalEncoding), input_name='Null'), 'gml:', eol_))
    def exportLiteral(self, outfile, level, name_='LocationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.AbstractGeometryType is not None:
            showIndent(outfile, level)
            outfile.write('AbstractGeometryType=model_.AbstractGeometryType(\n')
            self.AbstractGeometryType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.LocationKeyWord is not None:
            showIndent(outfile, level)
            outfile.write('LocationKeyWord=model_.LocationKeyWord(\n')
            self.LocationKeyWord.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.LocationString is not None:
            showIndent(outfile, level)
            outfile.write('LocationString=model_.LocationString(\n')
            self.LocationString.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.Null is not None:
            showIndent(outfile, level)
            outfile.write('Null=%s,\n' % quote_python(self.Null).encode(ExternalEncoding))
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometry> element')
            self.AbstractGeometry = obj_
            obj_.original_tagname_ = 'AbstractGeometry'
        elif nodeName_ == 'GeometricComplex':
            obj_ = GeometricComplexType.factory()
            obj_.build(child_)
            self.GeometricComplex = obj_
            obj_.original_tagname_ = 'GeometricComplex'
        elif nodeName_ == 'AbstractGeometricAggregate':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricAggregate> element')
            self.AbstractGeometricAggregate = obj_
            obj_.original_tagname_ = 'AbstractGeometricAggregate'
        elif nodeName_ == 'AbstractGeometricPrimitive':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeometricPrimitive> element')
            self.AbstractGeometricPrimitive = obj_
            obj_.original_tagname_ = 'AbstractGeometricPrimitive'
        elif nodeName_ == 'AbstractImplicitGeometry':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractImplicitGeometry> element')
            self.AbstractImplicitGeometry = obj_
            obj_.original_tagname_ = 'AbstractImplicitGeometry'
        elif nodeName_ == 'MultiGeometry':
            obj_ = MultiGeometryType.factory()
            obj_.build(child_)
            self.MultiGeometry = obj_
            obj_.original_tagname_ = 'MultiGeometry'
        elif nodeName_ == 'MultiPoint':
            obj_ = MultiPointType.factory()
            obj_.build(child_)
            self.MultiPoint = obj_
            obj_.original_tagname_ = 'MultiPoint'
        elif nodeName_ == 'MultiCurve':
            obj_ = MultiCurveType.factory()
            obj_.build(child_)
            self.MultiCurve = obj_
            obj_.original_tagname_ = 'MultiCurve'
        elif nodeName_ == 'MultiSurface':
            obj_ = MultiSurfaceType.factory()
            obj_.build(child_)
            self.MultiSurface = obj_
            obj_.original_tagname_ = 'MultiSurface'
        elif nodeName_ == 'MultiSolid':
            obj_ = MultiSolidType.factory()
            obj_.build(child_)
            self.MultiSolid = obj_
            obj_.original_tagname_ = 'MultiSolid'
        elif nodeName_ == 'AbstractSolid':
            class_obj_ = self.get_class_obj_(child_, AbstractSolidType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractSolid = obj_
            obj_.original_tagname_ = 'AbstractSolid'
        elif nodeName_ == 'AbstractSurface':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSurface> element')
            self.AbstractSurface = obj_
            obj_.original_tagname_ = 'AbstractSurface'
        elif nodeName_ == 'Point':
            obj_ = PointType.factory()
            obj_.build(child_)
            self.Point = obj_
            obj_.original_tagname_ = 'Point'
        elif nodeName_ == 'AbstractCurve':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCurve> element')
            self.AbstractCurve = obj_
            obj_.original_tagname_ = 'AbstractCurve'
        elif nodeName_ == 'CompositeSolid':
            obj_ = CompositeSolidType.factory()
            obj_.build(child_)
            self.CompositeSolid = obj_
            obj_.original_tagname_ = 'CompositeSolid'
        elif nodeName_ == 'Solid':
            obj_ = SolidType.factory()
            obj_.build(child_)
            self.Solid = obj_
            obj_.original_tagname_ = 'Solid'
        elif nodeName_ == 'CompositeSurface':
            obj_ = CompositeSurfaceType.factory()
            obj_.build(child_)
            self.CompositeSurface = obj_
            obj_.original_tagname_ = 'CompositeSurface'
        elif nodeName_ == 'Surface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Surface = obj_
            obj_.original_tagname_ = 'Surface'
        elif nodeName_ == 'OrientableSurface':
            obj_ = OrientableSurfaceType.factory()
            obj_.build(child_)
            self.OrientableSurface = obj_
            obj_.original_tagname_ = 'OrientableSurface'
        elif nodeName_ == 'Polygon':
            obj_ = PolygonType.factory()
            obj_.build(child_)
            self.Polygon = obj_
            obj_.original_tagname_ = 'Polygon'
        elif nodeName_ == 'PolyhedralSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.PolyhedralSurface = obj_
            obj_.original_tagname_ = 'PolyhedralSurface'
        elif nodeName_ == 'TriangulatedSurface':
            class_obj_ = self.get_class_obj_(child_, SurfaceType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TriangulatedSurface = obj_
            obj_.original_tagname_ = 'TriangulatedSurface'
        elif nodeName_ == 'Tin':
            obj_ = TinType.factory()
            obj_.build(child_)
            self.Tin = obj_
            obj_.original_tagname_ = 'Tin'
        elif nodeName_ == 'CompositeCurve':
            obj_ = CompositeCurveType.factory()
            obj_.build(child_)
            self.CompositeCurve = obj_
            obj_.original_tagname_ = 'CompositeCurve'
        elif nodeName_ == 'Curve':
            obj_ = CurveType.factory()
            obj_.build(child_)
            self.Curve = obj_
            obj_.original_tagname_ = 'Curve'
        elif nodeName_ == 'OrientableCurve':
            obj_ = OrientableCurveType.factory()
            obj_.build(child_)
            self.OrientableCurve = obj_
            obj_.original_tagname_ = 'OrientableCurve'
        elif nodeName_ == 'LineString':
            obj_ = LineStringType.factory()
            obj_.build(child_)
            self.LineString = obj_
            obj_.original_tagname_ = 'LineString'
        elif nodeName_ == 'Grid':
            class_obj_ = self.get_class_obj_(child_, GridType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Grid = obj_
            obj_.original_tagname_ = 'Grid'
        elif nodeName_ == 'RectifiedGrid':
            obj_ = RectifiedGridType.factory()
            obj_.build(child_)
            self.RectifiedGrid = obj_
            obj_.original_tagname_ = 'RectifiedGrid'
        elif nodeName_ == 'LocationKeyWord':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.LocationKeyWord = obj_
            obj_.original_tagname_ = 'LocationKeyWord'
        elif nodeName_ == 'LocationString':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.LocationString = obj_
            obj_.original_tagname_ = 'LocationString'
        elif nodeName_ == 'Null':
            Null_ = child_.text
            Null_ = self.gds_validate_string(Null_, node, 'Null')
            self.Null = Null_
            self.validate_NilReasonType(self.Null)    # validate type NilReasonType
# end class LocationPropertyType


class PriorityLocationPropertyType(LocationPropertyType):
    subclass = None
    superclass = LocationPropertyType
    def __init__(self, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, AbstractGeometry=None, LocationKeyWord=None, LocationString=None, Null=None, priority=None):
        self.original_tagname_ = None
        super(PriorityLocationPropertyType, self).__init__(nilReason, title, show, actuate, href, role, arcrole, remoteSchema, type_, AbstractGeometry, LocationKeyWord, LocationString, Null, )
        self.priority = _cast(None, priority)
    def factory(*args_, **kwargs_):
        if PriorityLocationPropertyType.subclass:
            return PriorityLocationPropertyType.subclass(*args_, **kwargs_)
        else:
            return PriorityLocationPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_priority(self): return self.priority
    def set_priority(self, priority): self.priority = priority
    def hasContent_(self):
        if (
            super(PriorityLocationPropertyType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PriorityLocationPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PriorityLocationPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PriorityLocationPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PriorityLocationPropertyType'):
        super(PriorityLocationPropertyType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PriorityLocationPropertyType')
        if self.priority is not None and 'priority' not in already_processed:
            already_processed.add('priority')
            outfile.write(' priority=%s' % (self.gds_format_string(quote_attrib(self.priority).encode(ExternalEncoding), input_name='priority'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PriorityLocationPropertyType', fromsubclass_=False, pretty_print=True):
        super(PriorityLocationPropertyType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PriorityLocationPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.priority is not None and 'priority' not in already_processed:
            already_processed.add('priority')
            showIndent(outfile, level)
            outfile.write('priority="%s",\n' % (self.priority,))
        super(PriorityLocationPropertyType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PriorityLocationPropertyType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('priority', node)
        if value is not None and 'priority' not in already_processed:
            already_processed.add('priority')
            self.priority = value
        super(PriorityLocationPropertyType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(PriorityLocationPropertyType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class PriorityLocationPropertyType


class FeatureArrayPropertyType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, AbstractFeature=None):
        self.original_tagname_ = None
        if AbstractFeature is None:
            self.AbstractFeature = []
        else:
            self.AbstractFeature = AbstractFeature
    def factory(*args_, **kwargs_):
        if FeatureArrayPropertyType.subclass:
            return FeatureArrayPropertyType.subclass(*args_, **kwargs_)
        else:
            return FeatureArrayPropertyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_AbstractFeature(self): return self.AbstractFeature
    def set_AbstractFeature(self, AbstractFeature): self.AbstractFeature = AbstractFeature
    def add_AbstractFeature(self, value): self.AbstractFeature.append(value)
    def insert_AbstractFeature_at(self, index, value): self.AbstractFeature.insert(index, value)
    def replace_AbstractFeature_at(self, index, value): self.AbstractFeature[index] = value
    def hasContent_(self):
        if (
            self.AbstractFeature
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FeatureArrayPropertyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FeatureArrayPropertyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FeatureArrayPropertyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FeatureArrayPropertyType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FeatureArrayPropertyType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for AbstractFeature_ in self.AbstractFeature:
            AbstractFeature_.export(outfile, level, namespace_, name_='AbstractFeature', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='FeatureArrayPropertyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('AbstractFeature=[\n')
        level += 1
        for AbstractFeature_ in self.AbstractFeature:
            showIndent(outfile, level)
            outfile.write('model_.AbstractFeatureType(\n')
            AbstractFeature_.exportLiteral(outfile, level, name_='AbstractFeatureType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'AbstractFeature':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeature> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractFeature'
        elif nodeName_ == 'DynamicFeature':
            class_obj_ = self.get_class_obj_(child_, DynamicFeatureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'DynamicFeature'
        elif nodeName_ == 'AbstractCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoverage> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractCoverage'
        elif nodeName_ == 'AbstractContinuousCoverage':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractContinuousCoverage> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractContinuousCoverage'
        elif nodeName_ == 'Observation':
            class_obj_ = self.get_class_obj_(child_, ObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'Observation'
        elif nodeName_ == 'AbstractFeatureCollection':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractFeatureCollection> element')
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'AbstractFeatureCollection'
        elif nodeName_ == 'FeatureCollection':
            obj_ = FeatureCollectionType.factory()
            obj_.build(child_)
            self.AbstractFeature.append(obj_)
            obj_.original_tagname_ = 'FeatureCollection'
        elif nodeName_ == 'DynamicFeatureCollection':
            obj_ = DynamicFeatureCollectionType.factory()
            obj_.build(child_)
            self.DynamicFeature.append(obj_)
            obj_.original_tagname_ = 'DynamicFeatureCollection'
        elif nodeName_ == 'AbstractDiscreteCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractCoverage.append(obj_)
            obj_.original_tagname_ = 'AbstractDiscreteCoverage'
        elif nodeName_ == 'MultiPointCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiPointCoverage'
        elif nodeName_ == 'MultiCurveCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiCurveCoverage'
        elif nodeName_ == 'MultiSurfaceCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiSurfaceCoverage'
        elif nodeName_ == 'MultiSolidCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'MultiSolidCoverage'
        elif nodeName_ == 'GridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'GridCoverage'
        elif nodeName_ == 'RectifiedGridCoverage':
            obj_ = DiscreteCoverageType.factory()
            obj_.build(child_)
            self.AbstractDiscreteCoverage.append(obj_)
            obj_.original_tagname_ = 'RectifiedGridCoverage'
        elif nodeName_ == 'DirectedObservation':
            class_obj_ = self.get_class_obj_(child_, DirectedObservationType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Observation.append(obj_)
            obj_.original_tagname_ = 'DirectedObservation'
        elif nodeName_ == 'DirectedObservationAtDistance':
            obj_ = DirectedObservationAtDistanceType.factory()
            obj_.build(child_)
            self.DirectedObservation.append(obj_)
            obj_.original_tagname_ = 'DirectedObservationAtDistance'
# end class FeatureArrayPropertyType


class BoundedFeatureType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None):
        self.original_tagname_ = None
        if metaDataProperty is None:
            self.metaDataProperty = []
        else:
            self.metaDataProperty = metaDataProperty
        self.description = description
        self.descriptionReference = descriptionReference
        self.identifier = identifier
        if name is None:
            self.name = []
        else:
            self.name = name
        self.boundedBy = boundedBy
        self.location = location
    def factory(*args_, **kwargs_):
        if BoundedFeatureType.subclass:
            return BoundedFeatureType.subclass(*args_, **kwargs_)
        else:
            return BoundedFeatureType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metaDataProperty(self): return self.metaDataProperty
    def set_metaDataProperty(self, metaDataProperty): self.metaDataProperty = metaDataProperty
    def add_metaDataProperty(self, value): self.metaDataProperty.append(value)
    def insert_metaDataProperty_at(self, index, value): self.metaDataProperty.insert(index, value)
    def replace_metaDataProperty_at(self, index, value): self.metaDataProperty[index] = value
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_descriptionReference(self): return self.descriptionReference
    def set_descriptionReference(self, descriptionReference): self.descriptionReference = descriptionReference
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def add_name(self, value): self.name.append(value)
    def insert_name_at(self, index, value): self.name.insert(index, value)
    def replace_name_at(self, index, value): self.name[index] = value
    def get_boundedBy(self): return self.boundedBy
    def set_boundedBy(self, boundedBy): self.boundedBy = boundedBy
    def get_location(self): return self.location
    def set_location(self, location): self.location = location
    def hasContent_(self):
        if (
            self.metaDataProperty or
            self.description is not None or
            self.descriptionReference is not None or
            self.identifier is not None or
            self.name or
            self.boundedBy is not None or
            self.location is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BoundedFeatureType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BoundedFeatureType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BoundedFeatureType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BoundedFeatureType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BoundedFeatureType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for metaDataProperty_ in self.metaDataProperty:
            metaDataProperty_.export(outfile, level, namespace_='gml:', name_='metaDataProperty', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_='gml:', name_='description', pretty_print=pretty_print)
        if self.descriptionReference is not None:
            self.descriptionReference.export(outfile, level, namespace_='gml:', name_='descriptionReference', pretty_print=pretty_print)
        if self.identifier is not None:
            self.identifier.export(outfile, level, namespace_='gml:', name_='identifier', pretty_print=pretty_print)
        for name_ in self.name:
            name_.export(outfile, level, namespace_='gml:', name_='name', pretty_print=pretty_print)
        if self.boundedBy is not None:
            self.boundedBy.export(outfile, level, namespace_='gml:', name_='boundedBy', pretty_print=pretty_print)
        if self.location is not None:
            self.location.export(outfile, level, namespace_='gml:', name_='location', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='BoundedFeatureType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('metaDataProperty=[\n')
        level += 1
        for metaDataProperty_ in self.metaDataProperty:
            showIndent(outfile, level)
            outfile.write('model_.metaDataProperty(\n')
            metaDataProperty_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.description(\n')
            self.description.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.descriptionReference is not None:
            showIndent(outfile, level)
            outfile.write('descriptionReference=model_.descriptionReference(\n')
            self.descriptionReference.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.identifier is not None:
            showIndent(outfile, level)
            outfile.write('identifier=model_.identifier(\n')
            self.identifier.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('name=[\n')
        level += 1
        for name_ in self.name:
            showIndent(outfile, level)
            outfile.write('model_.name(\n')
            name_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.boundedBy is not None:
            showIndent(outfile, level)
            outfile.write('boundedBy=model_.BoundingShapeType(\n')
            self.boundedBy.exportLiteral(outfile, level, name_='boundedBy')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.location is not None:
            showIndent(outfile, level)
            outfile.write('location=model_.LocationPropertyType(\n')
            self.location.exportLiteral(outfile, level, name_='location')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metaDataProperty':
            obj_ = MetaDataPropertyType.factory()
            obj_.build(child_)
            self.metaDataProperty.append(obj_)
            obj_.original_tagname_ = 'metaDataProperty'
        elif nodeName_ == 'description':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'descriptionReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.descriptionReference = obj_
            obj_.original_tagname_ = 'descriptionReference'
        elif nodeName_ == 'identifier':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.identifier = obj_
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name.append(obj_)
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'boundedBy':
            obj_ = BoundingShapeType.factory()
            obj_.build(child_)
            self.boundedBy = obj_
            obj_.original_tagname_ = 'boundedBy'
        elif nodeName_ == 'location':
            class_obj_ = self.get_class_obj_(child_, LocationPropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'priorityLocation':
            obj_ = PriorityLocationPropertyType.factory()
            obj_.build(child_)
            self.priorityLocation = obj_
            obj_.original_tagname_ = 'priorityLocation'
# end class BoundedFeatureType


class AbstractFeatureCollectionType(AbstractFeatureType):
    subclass = None
    superclass = AbstractFeatureType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, featureMember=None, featureMembers=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractFeatureCollectionType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, extensiontype_, )
        if featureMember is None:
            self.featureMember = []
        else:
            self.featureMember = featureMember
        self.featureMembers = featureMembers
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractFeatureCollectionType.subclass:
            return AbstractFeatureCollectionType.subclass(*args_, **kwargs_)
        else:
            return AbstractFeatureCollectionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_featureMember(self): return self.featureMember
    def set_featureMember(self, featureMember): self.featureMember = featureMember
    def add_featureMember(self, value): self.featureMember.append(value)
    def insert_featureMember_at(self, index, value): self.featureMember.insert(index, value)
    def replace_featureMember_at(self, index, value): self.featureMember[index] = value
    def get_featureMembers(self): return self.featureMembers
    def set_featureMembers(self, featureMembers): self.featureMembers = featureMembers
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.featureMember or
            self.featureMembers is not None or
            super(AbstractFeatureCollectionType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractFeatureCollectionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractFeatureCollectionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractFeatureCollectionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractFeatureCollectionType'):
        super(AbstractFeatureCollectionType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractFeatureCollectionType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractFeatureCollectionType', fromsubclass_=False, pretty_print=True):
        super(AbstractFeatureCollectionType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for featureMember_ in self.featureMember:
            featureMember_.export(outfile, level, namespace_='gml:', name_='featureMember', pretty_print=pretty_print)
        if self.featureMembers is not None:
            self.featureMembers.export(outfile, level, namespace_='gml:', name_='featureMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractFeatureCollectionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractFeatureCollectionType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractFeatureCollectionType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('featureMember=[\n')
        level += 1
        for featureMember_ in self.featureMember:
            showIndent(outfile, level)
            outfile.write('model_.FeaturePropertyType(\n')
            featureMember_.exportLiteral(outfile, level, name_='FeaturePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.featureMembers is not None:
            showIndent(outfile, level)
            outfile.write('featureMembers=model_.FeatureArrayPropertyType(\n')
            self.featureMembers.exportLiteral(outfile, level, name_='featureMembers')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractFeatureCollectionType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'featureMember':
            obj_ = FeaturePropertyType.factory()
            obj_.build(child_)
            self.featureMember.append(obj_)
            obj_.original_tagname_ = 'featureMember'
        elif nodeName_ == 'featureMembers':
            obj_ = FeatureArrayPropertyType.factory()
            obj_.build(child_)
            self.featureMembers = obj_
            obj_.original_tagname_ = 'featureMembers'
        super(AbstractFeatureCollectionType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractFeatureCollectionType


class FeatureCollectionType(AbstractFeatureCollectionType):
    subclass = None
    superclass = AbstractFeatureCollectionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, featureMember=None, featureMembers=None):
        self.original_tagname_ = None
        super(FeatureCollectionType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, featureMember, featureMembers, )
    def factory(*args_, **kwargs_):
        if FeatureCollectionType.subclass:
            return FeatureCollectionType.subclass(*args_, **kwargs_)
        else:
            return FeatureCollectionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(FeatureCollectionType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FeatureCollectionType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FeatureCollectionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FeatureCollectionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FeatureCollectionType'):
        super(FeatureCollectionType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='FeatureCollectionType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FeatureCollectionType', fromsubclass_=False, pretty_print=True):
        super(FeatureCollectionType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='FeatureCollectionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(FeatureCollectionType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(FeatureCollectionType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(FeatureCollectionType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(FeatureCollectionType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class FeatureCollectionType


class IndirectEntryType(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, DefinitionProxy=None):
        self.original_tagname_ = None
        self.DefinitionProxy = DefinitionProxy
    def factory(*args_, **kwargs_):
        if IndirectEntryType.subclass:
            return IndirectEntryType.subclass(*args_, **kwargs_)
        else:
            return IndirectEntryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DefinitionProxy(self): return self.DefinitionProxy
    def set_DefinitionProxy(self, DefinitionProxy): self.DefinitionProxy = DefinitionProxy
    def hasContent_(self):
        if (
            self.DefinitionProxy is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='IndirectEntryType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IndirectEntryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='IndirectEntryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='IndirectEntryType'):
        pass
    def exportChildren(self, outfile, level, namespace_='gml:', name_='IndirectEntryType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.DefinitionProxy is not None:
            self.DefinitionProxy.export(outfile, level, namespace_='gml:', name_='DefinitionProxy', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='IndirectEntryType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.DefinitionProxy is not None:
            showIndent(outfile, level)
            outfile.write('DefinitionProxy=model_.DefinitionProxy(\n')
            self.DefinitionProxy.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DefinitionProxy':
            obj_ = DefinitionProxyType.factory()
            obj_.build(child_)
            self.DefinitionProxy = obj_
            obj_.original_tagname_ = 'DefinitionProxy'
# end class IndirectEntryType


class DefinitionProxyType(DefinitionType):
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, definitionRef=None):
        self.original_tagname_ = None
        super(DefinitionProxyType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.definitionRef = definitionRef
    def factory(*args_, **kwargs_):
        if DefinitionProxyType.subclass:
            return DefinitionProxyType.subclass(*args_, **kwargs_)
        else:
            return DefinitionProxyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_definitionRef(self): return self.definitionRef
    def set_definitionRef(self, definitionRef): self.definitionRef = definitionRef
    def hasContent_(self):
        if (
            self.definitionRef is not None or
            super(DefinitionProxyType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DefinitionProxyType', namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionProxyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DefinitionProxyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DefinitionProxyType'):
        super(DefinitionProxyType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DefinitionProxyType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DefinitionProxyType', fromsubclass_=False, pretty_print=True):
        super(DefinitionProxyType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.definitionRef is not None:
            self.definitionRef.export(outfile, level, namespace_='gml:', name_='definitionRef', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DefinitionProxyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DefinitionProxyType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DefinitionProxyType, self).exportLiteralChildren(outfile, level, name_)
        if self.definitionRef is not None:
            showIndent(outfile, level)
            outfile.write('definitionRef=model_.definitionRef(\n')
            self.definitionRef.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DefinitionProxyType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'definitionRef':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.definitionRef = obj_
            obj_.original_tagname_ = 'definitionRef'
        super(DefinitionProxyType, self).buildChildren(child_, node, nodeName_, True)
# end class DefinitionProxyType


class TemporalDatumType(TemporalDatumBaseType):
    subclass = None
    superclass = TemporalDatumBaseType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, origin=None):
        self.original_tagname_ = None
        super(TemporalDatumType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.origin = origin
    def factory(*args_, **kwargs_):
        if TemporalDatumType.subclass:
            return TemporalDatumType.subclass(*args_, **kwargs_)
        else:
            return TemporalDatumType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_origin(self): return self.origin
    def set_origin(self, origin): self.origin = origin
    def hasContent_(self):
        if (
            self.origin is not None or
            super(TemporalDatumType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalDatumType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalDatumType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalDatumType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalDatumType'):
        super(TemporalDatumType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalDatumType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalDatumType', fromsubclass_=False, pretty_print=True):
        super(TemporalDatumType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.origin is not None:
            self.origin.export(outfile, level, namespace_='gml:', name_='origin', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalDatumType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TemporalDatumType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TemporalDatumType, self).exportLiteralChildren(outfile, level, name_)
        if self.origin is not None:
            showIndent(outfile, level)
            outfile.write('origin=model_.PointPropertyType(\n')
            self.origin.exportLiteral(outfile, level, name_='origin')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TemporalDatumType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'origin':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.origin = obj_
            obj_.original_tagname_ = 'origin'
        super(TemporalDatumType, self).buildChildren(child_, node, nodeName_, True)
# end class TemporalDatumType


class AbstractDQ_Completeness_Type(AbstractDQ_Element_Type):
    subclass = None
    superclass = AbstractDQ_Element_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_Completeness_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_Completeness_Type.subclass:
            return AbstractDQ_Completeness_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_Completeness_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractDQ_Completeness_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_Completeness_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_Completeness_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_Completeness_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_Completeness_Type'):
        super(AbstractDQ_Completeness_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_Completeness_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_Completeness_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_Completeness_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDQ_Completeness_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_Completeness_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_Completeness_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_Completeness_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractDQ_Completeness_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractDQ_Completeness_Type


class AbstractDQ_LogicalConsistency_Type(AbstractDQ_Element_Type):
    subclass = None
    superclass = AbstractDQ_Element_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_LogicalConsistency_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_LogicalConsistency_Type.subclass:
            return AbstractDQ_LogicalConsistency_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_LogicalConsistency_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractDQ_LogicalConsistency_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_LogicalConsistency_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_LogicalConsistency_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_LogicalConsistency_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_LogicalConsistency_Type'):
        super(AbstractDQ_LogicalConsistency_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_LogicalConsistency_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_LogicalConsistency_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_LogicalConsistency_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDQ_LogicalConsistency_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_LogicalConsistency_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_LogicalConsistency_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_LogicalConsistency_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractDQ_LogicalConsistency_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractDQ_LogicalConsistency_Type


class AbstractDQ_PositionalAccuracy_Type(AbstractDQ_Element_Type):
    subclass = None
    superclass = AbstractDQ_Element_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_PositionalAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_PositionalAccuracy_Type.subclass:
            return AbstractDQ_PositionalAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_PositionalAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractDQ_PositionalAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_PositionalAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_PositionalAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_PositionalAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_PositionalAccuracy_Type'):
        super(AbstractDQ_PositionalAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_PositionalAccuracy_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_PositionalAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_PositionalAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDQ_PositionalAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_PositionalAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_PositionalAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_PositionalAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractDQ_PositionalAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractDQ_PositionalAccuracy_Type


class AbstractDQ_ThematicAccuracy_Type(AbstractDQ_Element_Type):
    subclass = None
    superclass = AbstractDQ_Element_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_ThematicAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_ThematicAccuracy_Type.subclass:
            return AbstractDQ_ThematicAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_ThematicAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractDQ_ThematicAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_ThematicAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_ThematicAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_ThematicAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_ThematicAccuracy_Type'):
        super(AbstractDQ_ThematicAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_ThematicAccuracy_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_ThematicAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_ThematicAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDQ_ThematicAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_ThematicAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_ThematicAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_ThematicAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractDQ_ThematicAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractDQ_ThematicAccuracy_Type


class AbstractDQ_TemporalAccuracy_Type(AbstractDQ_Element_Type):
    subclass = None
    superclass = AbstractDQ_Element_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDQ_TemporalAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDQ_TemporalAccuracy_Type.subclass:
            return AbstractDQ_TemporalAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDQ_TemporalAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractDQ_TemporalAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDQ_TemporalAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_TemporalAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDQ_TemporalAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDQ_TemporalAccuracy_Type'):
        super(AbstractDQ_TemporalAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDQ_TemporalAccuracy_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDQ_TemporalAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDQ_TemporalAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDQ_TemporalAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDQ_TemporalAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDQ_TemporalAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDQ_TemporalAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractDQ_TemporalAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractDQ_TemporalAccuracy_Type


class DQ_CompletenessCommission_Type(AbstractDQ_Completeness_Type):
    subclass = None
    superclass = AbstractDQ_Completeness_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_CompletenessCommission_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_CompletenessCommission_Type.subclass:
            return DQ_CompletenessCommission_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_CompletenessCommission_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_CompletenessCommission_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessCommission_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_CompletenessCommission_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_CompletenessCommission_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_CompletenessCommission_Type'):
        super(DQ_CompletenessCommission_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_CompletenessCommission_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessCommission_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_CompletenessCommission_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_CompletenessCommission_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_CompletenessCommission_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_CompletenessCommission_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_CompletenessCommission_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_CompletenessCommission_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_CompletenessCommission_Type


class DQ_CompletenessOmission_Type(AbstractDQ_Completeness_Type):
    subclass = None
    superclass = AbstractDQ_Completeness_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_CompletenessOmission_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_CompletenessOmission_Type.subclass:
            return DQ_CompletenessOmission_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_CompletenessOmission_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_CompletenessOmission_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessOmission_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_CompletenessOmission_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_CompletenessOmission_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_CompletenessOmission_Type'):
        super(DQ_CompletenessOmission_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_CompletenessOmission_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_CompletenessOmission_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_CompletenessOmission_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_CompletenessOmission_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_CompletenessOmission_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_CompletenessOmission_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_CompletenessOmission_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_CompletenessOmission_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_CompletenessOmission_Type


class DQ_ConceptualConsistency_Type(AbstractDQ_LogicalConsistency_Type):
    subclass = None
    superclass = AbstractDQ_LogicalConsistency_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_ConceptualConsistency_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_ConceptualConsistency_Type.subclass:
            return DQ_ConceptualConsistency_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_ConceptualConsistency_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_ConceptualConsistency_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ConceptualConsistency_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ConceptualConsistency_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ConceptualConsistency_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ConceptualConsistency_Type'):
        super(DQ_ConceptualConsistency_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ConceptualConsistency_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ConceptualConsistency_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_ConceptualConsistency_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ConceptualConsistency_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_ConceptualConsistency_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_ConceptualConsistency_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_ConceptualConsistency_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_ConceptualConsistency_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_ConceptualConsistency_Type


class DQ_DomainConsistency_Type(AbstractDQ_LogicalConsistency_Type):
    subclass = None
    superclass = AbstractDQ_LogicalConsistency_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_DomainConsistency_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_DomainConsistency_Type.subclass:
            return DQ_DomainConsistency_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_DomainConsistency_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_DomainConsistency_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_DomainConsistency_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_DomainConsistency_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_DomainConsistency_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_DomainConsistency_Type'):
        super(DQ_DomainConsistency_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_DomainConsistency_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_DomainConsistency_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_DomainConsistency_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_DomainConsistency_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_DomainConsistency_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_DomainConsistency_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_DomainConsistency_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_DomainConsistency_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_DomainConsistency_Type


class DQ_FormatConsistency_Type(AbstractDQ_LogicalConsistency_Type):
    subclass = None
    superclass = AbstractDQ_LogicalConsistency_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_FormatConsistency_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_FormatConsistency_Type.subclass:
            return DQ_FormatConsistency_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_FormatConsistency_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_FormatConsistency_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_FormatConsistency_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_FormatConsistency_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_FormatConsistency_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_FormatConsistency_Type'):
        super(DQ_FormatConsistency_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_FormatConsistency_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_FormatConsistency_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_FormatConsistency_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_FormatConsistency_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_FormatConsistency_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_FormatConsistency_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_FormatConsistency_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_FormatConsistency_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_FormatConsistency_Type


class DQ_TopologicalConsistency_Type(AbstractDQ_LogicalConsistency_Type):
    subclass = None
    superclass = AbstractDQ_LogicalConsistency_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_TopologicalConsistency_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_TopologicalConsistency_Type.subclass:
            return DQ_TopologicalConsistency_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_TopologicalConsistency_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_TopologicalConsistency_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TopologicalConsistency_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TopologicalConsistency_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TopologicalConsistency_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TopologicalConsistency_Type'):
        super(DQ_TopologicalConsistency_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TopologicalConsistency_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TopologicalConsistency_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_TopologicalConsistency_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TopologicalConsistency_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_TopologicalConsistency_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_TopologicalConsistency_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_TopologicalConsistency_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_TopologicalConsistency_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_TopologicalConsistency_Type


class DQ_AbsoluteExternalPositionalAccuracy_Type(AbstractDQ_PositionalAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_PositionalAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_AbsoluteExternalPositionalAccuracy_Type.subclass:
            return DQ_AbsoluteExternalPositionalAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_AbsoluteExternalPositionalAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_AbsoluteExternalPositionalAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_Type'):
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_AbsoluteExternalPositionalAccuracy_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_AbsoluteExternalPositionalAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_AbsoluteExternalPositionalAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_AbsoluteExternalPositionalAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_AbsoluteExternalPositionalAccuracy_Type


class DQ_GriddedDataPositionalAccuracy_Type(AbstractDQ_PositionalAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_PositionalAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_GriddedDataPositionalAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_GriddedDataPositionalAccuracy_Type.subclass:
            return DQ_GriddedDataPositionalAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_GriddedDataPositionalAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_GriddedDataPositionalAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_GriddedDataPositionalAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_Type'):
        super(DQ_GriddedDataPositionalAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_GriddedDataPositionalAccuracy_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_GriddedDataPositionalAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_GriddedDataPositionalAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_GriddedDataPositionalAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_GriddedDataPositionalAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_GriddedDataPositionalAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_GriddedDataPositionalAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_GriddedDataPositionalAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_GriddedDataPositionalAccuracy_Type


class DQ_RelativeInternalPositionalAccuracy_Type(AbstractDQ_PositionalAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_PositionalAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_RelativeInternalPositionalAccuracy_Type.subclass:
            return DQ_RelativeInternalPositionalAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_RelativeInternalPositionalAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_RelativeInternalPositionalAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_RelativeInternalPositionalAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_Type'):
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_RelativeInternalPositionalAccuracy_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_RelativeInternalPositionalAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_RelativeInternalPositionalAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_RelativeInternalPositionalAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_RelativeInternalPositionalAccuracy_Type


class DQ_ThematicClassificationCorrectness_Type(AbstractDQ_ThematicAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_ThematicAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_ThematicClassificationCorrectness_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_ThematicClassificationCorrectness_Type.subclass:
            return DQ_ThematicClassificationCorrectness_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_ThematicClassificationCorrectness_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_ThematicClassificationCorrectness_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ThematicClassificationCorrectness_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_Type'):
        super(DQ_ThematicClassificationCorrectness_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ThematicClassificationCorrectness_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ThematicClassificationCorrectness_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_ThematicClassificationCorrectness_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ThematicClassificationCorrectness_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_ThematicClassificationCorrectness_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_ThematicClassificationCorrectness_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_ThematicClassificationCorrectness_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_ThematicClassificationCorrectness_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_ThematicClassificationCorrectness_Type


class DQ_NonQuantitativeAttributeAccuracy_Type(AbstractDQ_ThematicAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_ThematicAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_NonQuantitativeAttributeAccuracy_Type.subclass:
            return DQ_NonQuantitativeAttributeAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_NonQuantitativeAttributeAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_NonQuantitativeAttributeAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_NonQuantitativeAttributeAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_Type'):
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_NonQuantitativeAttributeAccuracy_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_NonQuantitativeAttributeAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_NonQuantitativeAttributeAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_NonQuantitativeAttributeAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_NonQuantitativeAttributeAccuracy_Type


class DQ_QuantitativeAttributeAccuracy_Type(AbstractDQ_ThematicAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_ThematicAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_QuantitativeAttributeAccuracy_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_QuantitativeAttributeAccuracy_Type.subclass:
            return DQ_QuantitativeAttributeAccuracy_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_QuantitativeAttributeAccuracy_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_QuantitativeAttributeAccuracy_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_QuantitativeAttributeAccuracy_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_Type'):
        super(DQ_QuantitativeAttributeAccuracy_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_QuantitativeAttributeAccuracy_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeAttributeAccuracy_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_QuantitativeAttributeAccuracy_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_QuantitativeAttributeAccuracy_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_QuantitativeAttributeAccuracy_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_QuantitativeAttributeAccuracy_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_QuantitativeAttributeAccuracy_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_QuantitativeAttributeAccuracy_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_QuantitativeAttributeAccuracy_Type


class DQ_AccuracyOfATimeMeasurement_Type(AbstractDQ_TemporalAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_TemporalAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_AccuracyOfATimeMeasurement_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_AccuracyOfATimeMeasurement_Type.subclass:
            return DQ_AccuracyOfATimeMeasurement_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_AccuracyOfATimeMeasurement_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_AccuracyOfATimeMeasurement_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_AccuracyOfATimeMeasurement_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_Type'):
        super(DQ_AccuracyOfATimeMeasurement_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_AccuracyOfATimeMeasurement_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_AccuracyOfATimeMeasurement_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_AccuracyOfATimeMeasurement_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_AccuracyOfATimeMeasurement_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_AccuracyOfATimeMeasurement_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_AccuracyOfATimeMeasurement_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_AccuracyOfATimeMeasurement_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_AccuracyOfATimeMeasurement_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_AccuracyOfATimeMeasurement_Type


class DQ_TemporalConsistency_Type(AbstractDQ_TemporalAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_TemporalAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_TemporalConsistency_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_TemporalConsistency_Type.subclass:
            return DQ_TemporalConsistency_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_TemporalConsistency_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_TemporalConsistency_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TemporalConsistency_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalConsistency_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TemporalConsistency_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TemporalConsistency_Type'):
        super(DQ_TemporalConsistency_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalConsistency_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TemporalConsistency_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_TemporalConsistency_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TemporalConsistency_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_TemporalConsistency_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_TemporalConsistency_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_TemporalConsistency_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_TemporalConsistency_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_TemporalConsistency_Type


class DQ_TemporalValidity_Type(AbstractDQ_TemporalAccuracy_Type):
    subclass = None
    superclass = AbstractDQ_TemporalAccuracy_Type
    def __init__(self, id=None, uuid=None, nameOfMeasure=None, measureIdentification=None, measureDescription=None, evaluationMethodType=None, evaluationMethodDescription=None, evaluationProcedure=None, dateTime=None, result=None):
        self.original_tagname_ = None
        super(DQ_TemporalValidity_Type, self).__init__(id, uuid, nameOfMeasure, measureIdentification, measureDescription, evaluationMethodType, evaluationMethodDescription, evaluationProcedure, dateTime, result, )
    def factory(*args_, **kwargs_):
        if DQ_TemporalValidity_Type.subclass:
            return DQ_TemporalValidity_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_TemporalValidity_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DQ_TemporalValidity_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_TemporalValidity_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalValidity_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_TemporalValidity_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_TemporalValidity_Type'):
        super(DQ_TemporalValidity_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_TemporalValidity_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_TemporalValidity_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_TemporalValidity_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_TemporalValidity_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_TemporalValidity_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_TemporalValidity_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_TemporalValidity_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DQ_TemporalValidity_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DQ_TemporalValidity_Type


class DQ_QuantitativeResult_Type(AbstractDQ_Result_Type):
    """Quantitative_conformance_measure from Quality Procedures. - -
    Renamed to remove implied use limitation - - OCL - -- result is
    type specified by valueDomain - result.tupleType = valueDomain"""
    subclass = None
    superclass = AbstractDQ_Result_Type
    def __init__(self, id=None, uuid=None, valueType=None, valueUnit=None, errorStatistic=None, value=None):
        self.original_tagname_ = None
        super(DQ_QuantitativeResult_Type, self).__init__(id, uuid, )
        self.valueType = valueType
        self.valueUnit = valueUnit
        self.errorStatistic = errorStatistic
        if value is None:
            self.value = []
        else:
            self.value = value
    def factory(*args_, **kwargs_):
        if DQ_QuantitativeResult_Type.subclass:
            return DQ_QuantitativeResult_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_QuantitativeResult_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueType(self): return self.valueType
    def set_valueType(self, valueType): self.valueType = valueType
    def get_valueUnit(self): return self.valueUnit
    def set_valueUnit(self, valueUnit): self.valueUnit = valueUnit
    def get_errorStatistic(self): return self.errorStatistic
    def set_errorStatistic(self, errorStatistic): self.errorStatistic = errorStatistic
    def get_value(self): return self.value
    def set_value(self, value): self.value = value
    def add_value(self, value): self.value.append(value)
    def insert_value_at(self, index, value): self.value.insert(index, value)
    def replace_value_at(self, index, value): self.value[index] = value
    def hasContent_(self):
        if (
            self.valueType is not None or
            self.valueUnit is not None or
            self.errorStatistic is not None or
            self.value or
            super(DQ_QuantitativeResult_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeResult_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_QuantitativeResult_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_QuantitativeResult_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_QuantitativeResult_Type'):
        super(DQ_QuantitativeResult_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_QuantitativeResult_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_QuantitativeResult_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_QuantitativeResult_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.valueType is not None:
            self.valueType.export(outfile, level, namespace_, name_='valueType', pretty_print=pretty_print)
        if self.valueUnit is not None:
            self.valueUnit.export(outfile, level, namespace_, name_='valueUnit', pretty_print=pretty_print)
        if self.errorStatistic is not None:
            self.errorStatistic.export(outfile, level, namespace_, name_='errorStatistic', pretty_print=pretty_print)
        for value_ in self.value:
            value_.export(outfile, level, namespace_, name_='value', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_QuantitativeResult_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_QuantitativeResult_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_QuantitativeResult_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.valueType is not None:
            showIndent(outfile, level)
            outfile.write('valueType=model_.RecordType_PropertyType(\n')
            self.valueType.exportLiteral(outfile, level, name_='valueType')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.valueUnit is not None:
            showIndent(outfile, level)
            outfile.write('valueUnit=model_.UnitOfMeasure_PropertyType(\n')
            self.valueUnit.exportLiteral(outfile, level, name_='valueUnit')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.errorStatistic is not None:
            showIndent(outfile, level)
            outfile.write('errorStatistic=model_.CharacterString_PropertyType(\n')
            self.errorStatistic.exportLiteral(outfile, level, name_='errorStatistic')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('value=[\n')
        level += 1
        for value_ in self.value:
            showIndent(outfile, level)
            outfile.write('model_.Record_PropertyType(\n')
            value_.exportLiteral(outfile, level, name_='Record_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_QuantitativeResult_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'valueType':
            obj_ = RecordType_PropertyType.factory()
            obj_.build(child_)
            self.valueType = obj_
            obj_.original_tagname_ = 'valueType'
        elif nodeName_ == 'valueUnit':
            obj_ = UnitOfMeasure_PropertyType.factory()
            obj_.build(child_)
            self.valueUnit = obj_
            obj_.original_tagname_ = 'valueUnit'
        elif nodeName_ == 'errorStatistic':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.errorStatistic = obj_
            obj_.original_tagname_ = 'errorStatistic'
        elif nodeName_ == 'value':
            obj_ = Record_PropertyType.factory()
            obj_.build(child_)
            self.value.append(obj_)
            obj_.original_tagname_ = 'value'
        super(DQ_QuantitativeResult_Type, self).buildChildren(child_, node, nodeName_, True)
# end class DQ_QuantitativeResult_Type


class DQ_ConformanceResult_Type(AbstractDQ_Result_Type):
    """quantitative_result from Quality Procedures - - renamed to remove
    implied use limitiation."""
    subclass = None
    superclass = AbstractDQ_Result_Type
    def __init__(self, id=None, uuid=None, specification=None, explanation=None, pass_=None):
        self.original_tagname_ = None
        super(DQ_ConformanceResult_Type, self).__init__(id, uuid, )
        self.specification = specification
        self.explanation = explanation
        self.pass_ = pass_
    def factory(*args_, **kwargs_):
        if DQ_ConformanceResult_Type.subclass:
            return DQ_ConformanceResult_Type.subclass(*args_, **kwargs_)
        else:
            return DQ_ConformanceResult_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_specification(self): return self.specification
    def set_specification(self, specification): self.specification = specification
    def get_explanation(self): return self.explanation
    def set_explanation(self, explanation): self.explanation = explanation
    def get_pass(self): return self.pass_
    def set_pass(self, pass_): self.pass_ = pass_
    def hasContent_(self):
        if (
            self.specification is not None or
            self.explanation is not None or
            self.pass_ is not None or
            super(DQ_ConformanceResult_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DQ_ConformanceResult_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ConformanceResult_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DQ_ConformanceResult_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DQ_ConformanceResult_Type'):
        super(DQ_ConformanceResult_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DQ_ConformanceResult_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DQ_ConformanceResult_Type', fromsubclass_=False, pretty_print=True):
        super(DQ_ConformanceResult_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.specification is not None:
            self.specification.export(outfile, level, namespace_, name_='specification', pretty_print=pretty_print)
        if self.explanation is not None:
            self.explanation.export(outfile, level, namespace_, name_='explanation', pretty_print=pretty_print)
        if self.pass_ is not None:
            self.pass_.export(outfile, level, namespace_, name_='pass', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DQ_ConformanceResult_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DQ_ConformanceResult_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DQ_ConformanceResult_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.specification is not None:
            showIndent(outfile, level)
            outfile.write('specification=model_.CI_Citation_PropertyType(\n')
            self.specification.exportLiteral(outfile, level, name_='specification')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.explanation is not None:
            showIndent(outfile, level)
            outfile.write('explanation=model_.CharacterString_PropertyType(\n')
            self.explanation.exportLiteral(outfile, level, name_='explanation')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pass_ is not None:
            showIndent(outfile, level)
            outfile.write('pass_=model_.Boolean_PropertyType(\n')
            self.pass_.exportLiteral(outfile, level, name_='pass')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DQ_ConformanceResult_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'specification':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.specification = obj_
            obj_.original_tagname_ = 'specification'
        elif nodeName_ == 'explanation':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.explanation = obj_
            obj_.original_tagname_ = 'explanation'
        elif nodeName_ == 'pass':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.pass_ = obj_
            obj_.original_tagname_ = 'pass'
        super(DQ_ConformanceResult_Type, self).buildChildren(child_, node, nodeName_, True)
# end class DQ_ConformanceResult_Type


class MD_CoverageDescription_Type(AbstractMD_ContentInformation_Type):
    """Information about the domain of the raster cell"""
    subclass = None
    superclass = AbstractMD_ContentInformation_Type
    def __init__(self, id=None, uuid=None, attributeDescription=None, contentType=None, dimension=None, extensiontype_=None):
        self.original_tagname_ = None
        super(MD_CoverageDescription_Type, self).__init__(id, uuid, extensiontype_, )
        self.attributeDescription = attributeDescription
        self.contentType = contentType
        if dimension is None:
            self.dimension = []
        else:
            self.dimension = dimension
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MD_CoverageDescription_Type.subclass:
            return MD_CoverageDescription_Type.subclass(*args_, **kwargs_)
        else:
            return MD_CoverageDescription_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_attributeDescription(self): return self.attributeDescription
    def set_attributeDescription(self, attributeDescription): self.attributeDescription = attributeDescription
    def get_contentType(self): return self.contentType
    def set_contentType(self, contentType): self.contentType = contentType
    def get_dimension(self): return self.dimension
    def set_dimension(self, dimension): self.dimension = dimension
    def add_dimension(self, value): self.dimension.append(value)
    def insert_dimension_at(self, index, value): self.dimension.insert(index, value)
    def replace_dimension_at(self, index, value): self.dimension[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.attributeDescription is not None or
            self.contentType is not None or
            self.dimension or
            super(MD_CoverageDescription_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_CoverageDescription_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_CoverageDescription_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_CoverageDescription_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_CoverageDescription_Type'):
        super(MD_CoverageDescription_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_CoverageDescription_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_CoverageDescription_Type', fromsubclass_=False, pretty_print=True):
        super(MD_CoverageDescription_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.attributeDescription is not None:
            self.attributeDescription.export(outfile, level, namespace_, name_='attributeDescription', pretty_print=pretty_print)
        if self.contentType is not None:
            self.contentType.export(outfile, level, namespace_, name_='contentType', pretty_print=pretty_print)
        for dimension_ in self.dimension:
            dimension_.export(outfile, level, namespace_, name_='dimension', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_CoverageDescription_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_CoverageDescription_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_CoverageDescription_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.attributeDescription is not None:
            showIndent(outfile, level)
            outfile.write('attributeDescription=model_.RecordType_PropertyType(\n')
            self.attributeDescription.exportLiteral(outfile, level, name_='attributeDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.contentType is not None:
            showIndent(outfile, level)
            outfile.write('contentType=model_.MD_CoverageContentTypeCode_PropertyType(\n')
            self.contentType.exportLiteral(outfile, level, name_='contentType')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('dimension=[\n')
        level += 1
        for dimension_ in self.dimension:
            showIndent(outfile, level)
            outfile.write('model_.MD_RangeDimension_PropertyType(\n')
            dimension_.exportLiteral(outfile, level, name_='MD_RangeDimension_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(MD_CoverageDescription_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'attributeDescription':
            obj_ = RecordType_PropertyType.factory()
            obj_.build(child_)
            self.attributeDescription = obj_
            obj_.original_tagname_ = 'attributeDescription'
        elif nodeName_ == 'contentType':
            obj_ = MD_CoverageContentTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.contentType = obj_
            obj_.original_tagname_ = 'contentType'
        elif nodeName_ == 'dimension':
            obj_ = MD_RangeDimension_PropertyType.factory()
            obj_.build(child_)
            self.dimension.append(obj_)
            obj_.original_tagname_ = 'dimension'
        super(MD_CoverageDescription_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_CoverageDescription_Type


class MD_FeatureCatalogueDescription_Type(AbstractMD_ContentInformation_Type):
    """Information identifing the feature catalogue"""
    subclass = None
    superclass = AbstractMD_ContentInformation_Type
    def __init__(self, id=None, uuid=None, complianceCode=None, language=None, includedWithDataset=None, featureTypes=None, featureCatalogueCitation=None):
        self.original_tagname_ = None
        super(MD_FeatureCatalogueDescription_Type, self).__init__(id, uuid, )
        self.complianceCode = complianceCode
        if language is None:
            self.language = []
        else:
            self.language = language
        self.includedWithDataset = includedWithDataset
        if featureTypes is None:
            self.featureTypes = []
        else:
            self.featureTypes = featureTypes
        if featureCatalogueCitation is None:
            self.featureCatalogueCitation = []
        else:
            self.featureCatalogueCitation = featureCatalogueCitation
    def factory(*args_, **kwargs_):
        if MD_FeatureCatalogueDescription_Type.subclass:
            return MD_FeatureCatalogueDescription_Type.subclass(*args_, **kwargs_)
        else:
            return MD_FeatureCatalogueDescription_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_complianceCode(self): return self.complianceCode
    def set_complianceCode(self, complianceCode): self.complianceCode = complianceCode
    def get_language(self): return self.language
    def set_language(self, language): self.language = language
    def add_language(self, value): self.language.append(value)
    def insert_language_at(self, index, value): self.language.insert(index, value)
    def replace_language_at(self, index, value): self.language[index] = value
    def get_includedWithDataset(self): return self.includedWithDataset
    def set_includedWithDataset(self, includedWithDataset): self.includedWithDataset = includedWithDataset
    def get_featureTypes(self): return self.featureTypes
    def set_featureTypes(self, featureTypes): self.featureTypes = featureTypes
    def add_featureTypes(self, value): self.featureTypes.append(value)
    def insert_featureTypes_at(self, index, value): self.featureTypes.insert(index, value)
    def replace_featureTypes_at(self, index, value): self.featureTypes[index] = value
    def get_featureCatalogueCitation(self): return self.featureCatalogueCitation
    def set_featureCatalogueCitation(self, featureCatalogueCitation): self.featureCatalogueCitation = featureCatalogueCitation
    def add_featureCatalogueCitation(self, value): self.featureCatalogueCitation.append(value)
    def insert_featureCatalogueCitation_at(self, index, value): self.featureCatalogueCitation.insert(index, value)
    def replace_featureCatalogueCitation_at(self, index, value): self.featureCatalogueCitation[index] = value
    def hasContent_(self):
        if (
            self.complianceCode is not None or
            self.language or
            self.includedWithDataset is not None or
            self.featureTypes or
            self.featureCatalogueCitation or
            super(MD_FeatureCatalogueDescription_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_FeatureCatalogueDescription_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_FeatureCatalogueDescription_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_FeatureCatalogueDescription_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_FeatureCatalogueDescription_Type'):
        super(MD_FeatureCatalogueDescription_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_FeatureCatalogueDescription_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_FeatureCatalogueDescription_Type', fromsubclass_=False, pretty_print=True):
        super(MD_FeatureCatalogueDescription_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.complianceCode is not None:
            self.complianceCode.export(outfile, level, namespace_, name_='complianceCode', pretty_print=pretty_print)
        for language_ in self.language:
            language_.export(outfile, level, namespace_, name_='language', pretty_print=pretty_print)
        if self.includedWithDataset is not None:
            self.includedWithDataset.export(outfile, level, namespace_, name_='includedWithDataset', pretty_print=pretty_print)
        for featureTypes_ in self.featureTypes:
            featureTypes_.export(outfile, level, namespace_, name_='featureTypes', pretty_print=pretty_print)
        for featureCatalogueCitation_ in self.featureCatalogueCitation:
            featureCatalogueCitation_.export(outfile, level, namespace_, name_='featureCatalogueCitation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_FeatureCatalogueDescription_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_FeatureCatalogueDescription_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_FeatureCatalogueDescription_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.complianceCode is not None:
            showIndent(outfile, level)
            outfile.write('complianceCode=model_.Boolean_PropertyType(\n')
            self.complianceCode.exportLiteral(outfile, level, name_='complianceCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('language=[\n')
        level += 1
        for language_ in self.language:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            language_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.includedWithDataset is not None:
            showIndent(outfile, level)
            outfile.write('includedWithDataset=model_.Boolean_PropertyType(\n')
            self.includedWithDataset.exportLiteral(outfile, level, name_='includedWithDataset')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('featureTypes=[\n')
        level += 1
        for featureTypes_ in self.featureTypes:
            showIndent(outfile, level)
            outfile.write('model_.GenericName_PropertyType(\n')
            featureTypes_.exportLiteral(outfile, level, name_='GenericName_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('featureCatalogueCitation=[\n')
        level += 1
        for featureCatalogueCitation_ in self.featureCatalogueCitation:
            showIndent(outfile, level)
            outfile.write('model_.CI_Citation_PropertyType(\n')
            featureCatalogueCitation_.exportLiteral(outfile, level, name_='CI_Citation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_FeatureCatalogueDescription_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'complianceCode':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.complianceCode = obj_
            obj_.original_tagname_ = 'complianceCode'
        elif nodeName_ == 'language':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.language.append(obj_)
            obj_.original_tagname_ = 'language'
        elif nodeName_ == 'includedWithDataset':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.includedWithDataset = obj_
            obj_.original_tagname_ = 'includedWithDataset'
        elif nodeName_ == 'featureTypes':
            obj_ = GenericName_PropertyType.factory()
            obj_.build(child_)
            self.featureTypes.append(obj_)
            obj_.original_tagname_ = 'featureTypes'
        elif nodeName_ == 'featureCatalogueCitation':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.featureCatalogueCitation.append(obj_)
            obj_.original_tagname_ = 'featureCatalogueCitation'
        super(MD_FeatureCatalogueDescription_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_FeatureCatalogueDescription_Type


class MultiplicityRange_Type(AbstractObject_Type):
    """A component of a multiplicity, consisting of an non-negative lower
    bound, and a potentially infinite upper bound."""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, lower=None, upper=None):
        self.original_tagname_ = None
        super(MultiplicityRange_Type, self).__init__(id, uuid, )
        self.lower = lower
        self.upper = upper
    def factory(*args_, **kwargs_):
        if MultiplicityRange_Type.subclass:
            return MultiplicityRange_Type.subclass(*args_, **kwargs_)
        else:
            return MultiplicityRange_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_lower(self): return self.lower
    def set_lower(self, lower): self.lower = lower
    def get_upper(self): return self.upper
    def set_upper(self, upper): self.upper = upper
    def hasContent_(self):
        if (
            self.lower is not None or
            self.upper is not None or
            super(MultiplicityRange_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiplicityRange_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiplicityRange_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiplicityRange_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiplicityRange_Type'):
        super(MultiplicityRange_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MultiplicityRange_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiplicityRange_Type', fromsubclass_=False, pretty_print=True):
        super(MultiplicityRange_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.lower is not None:
            self.lower.export(outfile, level, namespace_, name_='lower', pretty_print=pretty_print)
        if self.upper is not None:
            self.upper.export(outfile, level, namespace_, name_='upper', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiplicityRange_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MultiplicityRange_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MultiplicityRange_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.lower is not None:
            showIndent(outfile, level)
            outfile.write('lower=model_.Integer_PropertyType(\n')
            self.lower.exportLiteral(outfile, level, name_='lower')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.upper is not None:
            showIndent(outfile, level)
            outfile.write('upper=model_.UnlimitedInteger_PropertyType(\n')
            self.upper.exportLiteral(outfile, level, name_='upper')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MultiplicityRange_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'lower':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.lower = obj_
            obj_.original_tagname_ = 'lower'
        elif nodeName_ == 'upper':
            obj_ = UnlimitedInteger_PropertyType.factory()
            obj_.build(child_)
            self.upper = obj_
            obj_.original_tagname_ = 'upper'
        super(MultiplicityRange_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MultiplicityRange_Type


class Multiplicity_Type(AbstractObject_Type):
    """Use to represent the possible cardinality of a relation. Represented
    by a set of simple multiplicity ranges."""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, range=None):
        self.original_tagname_ = None
        super(Multiplicity_Type, self).__init__(id, uuid, )
        if range is None:
            self.range = []
        else:
            self.range = range
    def factory(*args_, **kwargs_):
        if Multiplicity_Type.subclass:
            return Multiplicity_Type.subclass(*args_, **kwargs_)
        else:
            return Multiplicity_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_range(self): return self.range
    def set_range(self, range): self.range = range
    def add_range(self, value): self.range.append(value)
    def insert_range_at(self, index, value): self.range.insert(index, value)
    def replace_range_at(self, index, value): self.range[index] = value
    def hasContent_(self):
        if (
            self.range or
            super(Multiplicity_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='Multiplicity_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Multiplicity_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='Multiplicity_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='Multiplicity_Type'):
        super(Multiplicity_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Multiplicity_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='Multiplicity_Type', fromsubclass_=False, pretty_print=True):
        super(Multiplicity_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for range_ in self.range:
            range_.export(outfile, level, namespace_, name_='range', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='Multiplicity_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(Multiplicity_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(Multiplicity_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('range=[\n')
        level += 1
        for range_ in self.range:
            showIndent(outfile, level)
            outfile.write('model_.MultiplicityRange_PropertyType(\n')
            range_.exportLiteral(outfile, level, name_='MultiplicityRange_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(Multiplicity_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'range':
            obj_ = MultiplicityRange_PropertyType.factory()
            obj_.build(child_)
            self.range.append(obj_)
            obj_.original_tagname_ = 'range'
        super(Multiplicity_Type, self).buildChildren(child_, node, nodeName_, True)
# end class Multiplicity_Type


class MemberName_Type(AbstractObject_Type):
    """A MemberName is a LocalName that references either an attribute slot
    in a record or recordType or an attribute, operation, or
    association role in an object instance or type description in
    some form of schema. The stored value "aName" is the returned
    value for the "aName()" operation."""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, aName=None, attributeType=None):
        self.original_tagname_ = None
        super(MemberName_Type, self).__init__(id, uuid, )
        self.aName = aName
        self.attributeType = attributeType
    def factory(*args_, **kwargs_):
        if MemberName_Type.subclass:
            return MemberName_Type.subclass(*args_, **kwargs_)
        else:
            return MemberName_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_aName(self): return self.aName
    def set_aName(self, aName): self.aName = aName
    def get_attributeType(self): return self.attributeType
    def set_attributeType(self, attributeType): self.attributeType = attributeType
    def hasContent_(self):
        if (
            self.aName is not None or
            self.attributeType is not None or
            super(MemberName_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MemberName_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MemberName_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MemberName_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MemberName_Type'):
        super(MemberName_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MemberName_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MemberName_Type', fromsubclass_=False, pretty_print=True):
        super(MemberName_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.aName is not None:
            self.aName.export(outfile, level, namespace_, name_='aName', pretty_print=pretty_print)
        if self.attributeType is not None:
            self.attributeType.export(outfile, level, namespace_, name_='attributeType', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MemberName_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MemberName_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MemberName_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.aName is not None:
            showIndent(outfile, level)
            outfile.write('aName=model_.CharacterString_PropertyType(\n')
            self.aName.exportLiteral(outfile, level, name_='aName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.attributeType is not None:
            showIndent(outfile, level)
            outfile.write('attributeType=model_.TypeName_PropertyType(\n')
            self.attributeType.exportLiteral(outfile, level, name_='attributeType')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MemberName_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'aName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.aName = obj_
            obj_.original_tagname_ = 'aName'
        elif nodeName_ == 'attributeType':
            obj_ = TypeName_PropertyType.factory()
            obj_.build(child_)
            self.attributeType = obj_
            obj_.original_tagname_ = 'attributeType'
        super(MemberName_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MemberName_Type


class TypeName_Type(AbstractObject_Type):
    """A TypeName is a LocalName that references either a recordType or
    object type in some form of schema. The stored value "aName" is
    the returned value for the "aName()" operation. This is the
    types name. - For parsing from types (or objects) the parsible
    name normally uses a "." navigation separator, so that it is of
    the form [class].[member].[memberOfMember]. ...)"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, aName=None):
        self.original_tagname_ = None
        super(TypeName_Type, self).__init__(id, uuid, )
        self.aName = aName
    def factory(*args_, **kwargs_):
        if TypeName_Type.subclass:
            return TypeName_Type.subclass(*args_, **kwargs_)
        else:
            return TypeName_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_aName(self): return self.aName
    def set_aName(self, aName): self.aName = aName
    def hasContent_(self):
        if (
            self.aName is not None or
            super(TypeName_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TypeName_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TypeName_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TypeName_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TypeName_Type'):
        super(TypeName_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TypeName_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TypeName_Type', fromsubclass_=False, pretty_print=True):
        super(TypeName_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.aName is not None:
            self.aName.export(outfile, level, namespace_, name_='aName', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TypeName_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TypeName_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TypeName_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.aName is not None:
            showIndent(outfile, level)
            outfile.write('aName=model_.CharacterString_PropertyType(\n')
            self.aName.exportLiteral(outfile, level, name_='aName')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TypeName_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'aName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.aName = obj_
            obj_.original_tagname_ = 'aName'
        super(TypeName_Type, self).buildChildren(child_, node, nodeName_, True)
# end class TypeName_Type


class AbstractEX_GeographicExtent_Type(AbstractObject_Type):
    """Geographic area of the dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, extentTypeCode=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractEX_GeographicExtent_Type, self).__init__(id, uuid, extensiontype_, )
        self.extentTypeCode = extentTypeCode
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractEX_GeographicExtent_Type.subclass:
            return AbstractEX_GeographicExtent_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractEX_GeographicExtent_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extentTypeCode(self): return self.extentTypeCode
    def set_extentTypeCode(self, extentTypeCode): self.extentTypeCode = extentTypeCode
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.extentTypeCode is not None or
            super(AbstractEX_GeographicExtent_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractEX_GeographicExtent_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractEX_GeographicExtent_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractEX_GeographicExtent_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractEX_GeographicExtent_Type'):
        super(AbstractEX_GeographicExtent_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractEX_GeographicExtent_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractEX_GeographicExtent_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractEX_GeographicExtent_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.extentTypeCode is not None:
            self.extentTypeCode.export(outfile, level, namespace_, name_='extentTypeCode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractEX_GeographicExtent_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractEX_GeographicExtent_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractEX_GeographicExtent_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.extentTypeCode is not None:
            showIndent(outfile, level)
            outfile.write('extentTypeCode=model_.Boolean_PropertyType(\n')
            self.extentTypeCode.exportLiteral(outfile, level, name_='extentTypeCode')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractEX_GeographicExtent_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'extentTypeCode':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.extentTypeCode = obj_
            obj_.original_tagname_ = 'extentTypeCode'
        super(AbstractEX_GeographicExtent_Type, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractEX_GeographicExtent_Type


class EX_Extent_Type(AbstractObject_Type):
    """Information about spatial, vertical, and temporal extent"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, description=None, geographicElement=None, temporalElement=None, verticalElement=None):
        self.original_tagname_ = None
        super(EX_Extent_Type, self).__init__(id, uuid, )
        self.description = description
        if geographicElement is None:
            self.geographicElement = []
        else:
            self.geographicElement = geographicElement
        if temporalElement is None:
            self.temporalElement = []
        else:
            self.temporalElement = temporalElement
        if verticalElement is None:
            self.verticalElement = []
        else:
            self.verticalElement = verticalElement
    def factory(*args_, **kwargs_):
        if EX_Extent_Type.subclass:
            return EX_Extent_Type.subclass(*args_, **kwargs_)
        else:
            return EX_Extent_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_geographicElement(self): return self.geographicElement
    def set_geographicElement(self, geographicElement): self.geographicElement = geographicElement
    def add_geographicElement(self, value): self.geographicElement.append(value)
    def insert_geographicElement_at(self, index, value): self.geographicElement.insert(index, value)
    def replace_geographicElement_at(self, index, value): self.geographicElement[index] = value
    def get_temporalElement(self): return self.temporalElement
    def set_temporalElement(self, temporalElement): self.temporalElement = temporalElement
    def add_temporalElement(self, value): self.temporalElement.append(value)
    def insert_temporalElement_at(self, index, value): self.temporalElement.insert(index, value)
    def replace_temporalElement_at(self, index, value): self.temporalElement[index] = value
    def get_verticalElement(self): return self.verticalElement
    def set_verticalElement(self, verticalElement): self.verticalElement = verticalElement
    def add_verticalElement(self, value): self.verticalElement.append(value)
    def insert_verticalElement_at(self, index, value): self.verticalElement.insert(index, value)
    def replace_verticalElement_at(self, index, value): self.verticalElement[index] = value
    def hasContent_(self):
        if (
            self.description is not None or
            self.geographicElement or
            self.temporalElement or
            self.verticalElement or
            super(EX_Extent_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_Extent_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_Extent_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_Extent_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_Extent_Type'):
        super(EX_Extent_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_Extent_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_Extent_Type', fromsubclass_=False, pretty_print=True):
        super(EX_Extent_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.description is not None:
            self.description.export(outfile, level, namespace_, name_='description', pretty_print=pretty_print)
        for geographicElement_ in self.geographicElement:
            geographicElement_.export(outfile, level, namespace_, name_='geographicElement', pretty_print=pretty_print)
        for temporalElement_ in self.temporalElement:
            temporalElement_.export(outfile, level, namespace_, name_='temporalElement', pretty_print=pretty_print)
        for verticalElement_ in self.verticalElement:
            verticalElement_.export(outfile, level, namespace_, name_='verticalElement', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_Extent_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_Extent_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_Extent_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('geographicElement=[\n')
        level += 1
        for geographicElement_ in self.geographicElement:
            showIndent(outfile, level)
            outfile.write('model_.EX_GeographicExtent_PropertyType(\n')
            geographicElement_.exportLiteral(outfile, level, name_='EX_GeographicExtent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('temporalElement=[\n')
        level += 1
        for temporalElement_ in self.temporalElement:
            showIndent(outfile, level)
            outfile.write('model_.EX_TemporalExtent_PropertyType(\n')
            temporalElement_.exportLiteral(outfile, level, name_='EX_TemporalExtent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('verticalElement=[\n')
        level += 1
        for verticalElement_ in self.verticalElement:
            showIndent(outfile, level)
            outfile.write('model_.EX_VerticalExtent_PropertyType(\n')
            verticalElement_.exportLiteral(outfile, level, name_='EX_VerticalExtent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EX_Extent_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'geographicElement':
            obj_ = EX_GeographicExtent_PropertyType.factory()
            obj_.build(child_)
            self.geographicElement.append(obj_)
            obj_.original_tagname_ = 'geographicElement'
        elif nodeName_ == 'temporalElement':
            obj_ = EX_TemporalExtent_PropertyType.factory()
            obj_.build(child_)
            self.temporalElement.append(obj_)
            obj_.original_tagname_ = 'temporalElement'
        elif nodeName_ == 'verticalElement':
            obj_ = EX_VerticalExtent_PropertyType.factory()
            obj_.build(child_)
            self.verticalElement.append(obj_)
            obj_.original_tagname_ = 'verticalElement'
        super(EX_Extent_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_Extent_Type


class EX_BoundingPolygon_Type(AbstractEX_GeographicExtent_Type):
    """Boundary enclosing the dataset expressed as the closed set of (x,y)
    coordinates of the polygon (last point replicates first point)"""
    subclass = None
    superclass = AbstractEX_GeographicExtent_Type
    def __init__(self, id=None, uuid=None, extentTypeCode=None, polygon=None):
        self.original_tagname_ = None
        super(EX_BoundingPolygon_Type, self).__init__(id, uuid, extentTypeCode, )
        if polygon is None:
            self.polygon = []
        else:
            self.polygon = polygon
    def factory(*args_, **kwargs_):
        if EX_BoundingPolygon_Type.subclass:
            return EX_BoundingPolygon_Type.subclass(*args_, **kwargs_)
        else:
            return EX_BoundingPolygon_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_polygon(self): return self.polygon
    def set_polygon(self, polygon): self.polygon = polygon
    def add_polygon(self, value): self.polygon.append(value)
    def insert_polygon_at(self, index, value): self.polygon.insert(index, value)
    def replace_polygon_at(self, index, value): self.polygon[index] = value
    def hasContent_(self):
        if (
            self.polygon or
            super(EX_BoundingPolygon_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_BoundingPolygon_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_BoundingPolygon_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_BoundingPolygon_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_BoundingPolygon_Type'):
        super(EX_BoundingPolygon_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_BoundingPolygon_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_BoundingPolygon_Type', fromsubclass_=False, pretty_print=True):
        super(EX_BoundingPolygon_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for polygon_ in self.polygon:
            polygon_.export(outfile, level, namespace_, name_='polygon', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_BoundingPolygon_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_BoundingPolygon_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_BoundingPolygon_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('polygon=[\n')
        level += 1
        for polygon_ in self.polygon:
            showIndent(outfile, level)
            outfile.write('model_.GM_Object_PropertyType(\n')
            polygon_.exportLiteral(outfile, level, name_='GM_Object_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EX_BoundingPolygon_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'polygon':
            obj_ = GM_Object_PropertyType.factory()
            obj_.build(child_)
            self.polygon.append(obj_)
            obj_.original_tagname_ = 'polygon'
        super(EX_BoundingPolygon_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_BoundingPolygon_Type


class EX_VerticalExtent_Type(AbstractObject_Type):
    """Vertical domain of dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, minimumValue=None, maximumValue=None, verticalCRS=None):
        self.original_tagname_ = None
        super(EX_VerticalExtent_Type, self).__init__(id, uuid, )
        self.minimumValue = minimumValue
        self.maximumValue = maximumValue
        self.verticalCRS = verticalCRS
    def factory(*args_, **kwargs_):
        if EX_VerticalExtent_Type.subclass:
            return EX_VerticalExtent_Type.subclass(*args_, **kwargs_)
        else:
            return EX_VerticalExtent_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_minimumValue(self): return self.minimumValue
    def set_minimumValue(self, minimumValue): self.minimumValue = minimumValue
    def get_maximumValue(self): return self.maximumValue
    def set_maximumValue(self, maximumValue): self.maximumValue = maximumValue
    def get_verticalCRS(self): return self.verticalCRS
    def set_verticalCRS(self, verticalCRS): self.verticalCRS = verticalCRS
    def hasContent_(self):
        if (
            self.minimumValue is not None or
            self.maximumValue is not None or
            self.verticalCRS is not None or
            super(EX_VerticalExtent_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_VerticalExtent_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_VerticalExtent_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_VerticalExtent_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_VerticalExtent_Type'):
        super(EX_VerticalExtent_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_VerticalExtent_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_VerticalExtent_Type', fromsubclass_=False, pretty_print=True):
        super(EX_VerticalExtent_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.minimumValue is not None:
            self.minimumValue.export(outfile, level, namespace_, name_='minimumValue', pretty_print=pretty_print)
        if self.maximumValue is not None:
            self.maximumValue.export(outfile, level, namespace_, name_='maximumValue', pretty_print=pretty_print)
        if self.verticalCRS is not None:
            self.verticalCRS.export(outfile, level, namespace_, name_='verticalCRS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_VerticalExtent_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_VerticalExtent_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_VerticalExtent_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.minimumValue is not None:
            showIndent(outfile, level)
            outfile.write('minimumValue=model_.Real_PropertyType(\n')
            self.minimumValue.exportLiteral(outfile, level, name_='minimumValue')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.maximumValue is not None:
            showIndent(outfile, level)
            outfile.write('maximumValue=model_.Real_PropertyType(\n')
            self.maximumValue.exportLiteral(outfile, level, name_='maximumValue')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.verticalCRS is not None:
            showIndent(outfile, level)
            outfile.write('verticalCRS=model_.SC_CRS_PropertyType(\n')
            self.verticalCRS.exportLiteral(outfile, level, name_='verticalCRS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EX_VerticalExtent_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'minimumValue':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.minimumValue = obj_
            obj_.original_tagname_ = 'minimumValue'
        elif nodeName_ == 'maximumValue':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.maximumValue = obj_
            obj_.original_tagname_ = 'maximumValue'
        elif nodeName_ == 'verticalCRS':
            obj_ = SC_CRS_PropertyType.factory()
            obj_.build(child_)
            self.verticalCRS = obj_
            obj_.original_tagname_ = 'verticalCRS'
        super(EX_VerticalExtent_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_VerticalExtent_Type


class EX_TemporalExtent_Type(AbstractObject_Type):
    """Time period covered by the content of the dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, extent=None, extensiontype_=None):
        self.original_tagname_ = None
        super(EX_TemporalExtent_Type, self).__init__(id, uuid, extensiontype_, )
        self.extent = extent
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if EX_TemporalExtent_Type.subclass:
            return EX_TemporalExtent_Type.subclass(*args_, **kwargs_)
        else:
            return EX_TemporalExtent_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extent(self): return self.extent
    def set_extent(self, extent): self.extent = extent
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.extent is not None or
            super(EX_TemporalExtent_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_TemporalExtent_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_TemporalExtent_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_TemporalExtent_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_TemporalExtent_Type'):
        super(EX_TemporalExtent_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_TemporalExtent_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_TemporalExtent_Type', fromsubclass_=False, pretty_print=True):
        super(EX_TemporalExtent_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.extent is not None:
            self.extent.export(outfile, level, namespace_, name_='extent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_TemporalExtent_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_TemporalExtent_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_TemporalExtent_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.extent is not None:
            showIndent(outfile, level)
            outfile.write('extent=model_.TM_Primitive_PropertyType(\n')
            self.extent.exportLiteral(outfile, level, name_='extent')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(EX_TemporalExtent_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'extent':
            obj_ = TM_Primitive_PropertyType.factory()
            obj_.build(child_)
            self.extent = obj_
            obj_.original_tagname_ = 'extent'
        super(EX_TemporalExtent_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_TemporalExtent_Type


class AbstractRS_ReferenceSystem_Type(AbstractObject_Type):
    """Description of the spatial and temporal reference systems used in
    the dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, name=None, domainOfValidity=None):
        self.original_tagname_ = None
        super(AbstractRS_ReferenceSystem_Type, self).__init__(id, uuid, )
        self.name = name
        if domainOfValidity is None:
            self.domainOfValidity = []
        else:
            self.domainOfValidity = domainOfValidity
    def factory(*args_, **kwargs_):
        if AbstractRS_ReferenceSystem_Type.subclass:
            return AbstractRS_ReferenceSystem_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractRS_ReferenceSystem_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_domainOfValidity(self): return self.domainOfValidity
    def set_domainOfValidity(self, domainOfValidity): self.domainOfValidity = domainOfValidity
    def add_domainOfValidity(self, value): self.domainOfValidity.append(value)
    def insert_domainOfValidity_at(self, index, value): self.domainOfValidity.insert(index, value)
    def replace_domainOfValidity_at(self, index, value): self.domainOfValidity[index] = value
    def hasContent_(self):
        if (
            self.name is not None or
            self.domainOfValidity or
            super(AbstractRS_ReferenceSystem_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractRS_ReferenceSystem_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractRS_ReferenceSystem_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractRS_ReferenceSystem_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractRS_ReferenceSystem_Type'):
        super(AbstractRS_ReferenceSystem_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractRS_ReferenceSystem_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractRS_ReferenceSystem_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractRS_ReferenceSystem_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        for domainOfValidity_ in self.domainOfValidity:
            domainOfValidity_.export(outfile, level, namespace_, name_='domainOfValidity', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractRS_ReferenceSystem_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractRS_ReferenceSystem_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractRS_ReferenceSystem_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.RS_Identifier_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('domainOfValidity=[\n')
        level += 1
        for domainOfValidity_ in self.domainOfValidity:
            showIndent(outfile, level)
            outfile.write('model_.EX_Extent_PropertyType(\n')
            domainOfValidity_.exportLiteral(outfile, level, name_='EX_Extent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(AbstractRS_ReferenceSystem_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'name':
            obj_ = RS_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'domainOfValidity':
            obj_ = EX_Extent_PropertyType.factory()
            obj_.build(child_)
            self.domainOfValidity.append(obj_)
            obj_.original_tagname_ = 'domainOfValidity'
        super(AbstractRS_ReferenceSystem_Type, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractRS_ReferenceSystem_Type


class MD_Identifier_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, authority=None, code=None, extensiontype_=None):
        self.original_tagname_ = None
        super(MD_Identifier_Type, self).__init__(id, uuid, extensiontype_, )
        self.authority = authority
        self.code = code
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MD_Identifier_Type.subclass:
            return MD_Identifier_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Identifier_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_authority(self): return self.authority
    def set_authority(self, authority): self.authority = authority
    def get_code(self): return self.code
    def set_code(self, code): self.code = code
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.authority is not None or
            self.code is not None or
            super(MD_Identifier_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Identifier_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Identifier_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Identifier_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Identifier_Type'):
        super(MD_Identifier_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Identifier_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Identifier_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Identifier_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.authority is not None:
            self.authority.export(outfile, level, namespace_, name_='authority', pretty_print=pretty_print)
        if self.code is not None:
            self.code.export(outfile, level, namespace_, name_='code', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Identifier_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Identifier_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Identifier_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.authority is not None:
            showIndent(outfile, level)
            outfile.write('authority=model_.CI_Citation_PropertyType(\n')
            self.authority.exportLiteral(outfile, level, name_='authority')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.code is not None:
            showIndent(outfile, level)
            outfile.write('code=model_.CharacterString_PropertyType(\n')
            self.code.exportLiteral(outfile, level, name_='code')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(MD_Identifier_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'authority':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.authority = obj_
            obj_.original_tagname_ = 'authority'
        elif nodeName_ == 'code':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.code = obj_
            obj_.original_tagname_ = 'code'
        super(MD_Identifier_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Identifier_Type


class MD_ReferenceSystem_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, referenceSystemIdentifier=None):
        self.original_tagname_ = None
        super(MD_ReferenceSystem_Type, self).__init__(id, uuid, )
        self.referenceSystemIdentifier = referenceSystemIdentifier
    def factory(*args_, **kwargs_):
        if MD_ReferenceSystem_Type.subclass:
            return MD_ReferenceSystem_Type.subclass(*args_, **kwargs_)
        else:
            return MD_ReferenceSystem_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_referenceSystemIdentifier(self): return self.referenceSystemIdentifier
    def set_referenceSystemIdentifier(self, referenceSystemIdentifier): self.referenceSystemIdentifier = referenceSystemIdentifier
    def hasContent_(self):
        if (
            self.referenceSystemIdentifier is not None or
            super(MD_ReferenceSystem_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ReferenceSystem_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ReferenceSystem_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ReferenceSystem_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ReferenceSystem_Type'):
        super(MD_ReferenceSystem_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ReferenceSystem_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ReferenceSystem_Type', fromsubclass_=False, pretty_print=True):
        super(MD_ReferenceSystem_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.referenceSystemIdentifier is not None:
            self.referenceSystemIdentifier.export(outfile, level, namespace_, name_='referenceSystemIdentifier', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ReferenceSystem_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_ReferenceSystem_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_ReferenceSystem_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.referenceSystemIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('referenceSystemIdentifier=model_.RS_Identifier_PropertyType(\n')
            self.referenceSystemIdentifier.exportLiteral(outfile, level, name_='referenceSystemIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_ReferenceSystem_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'referenceSystemIdentifier':
            obj_ = RS_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.referenceSystemIdentifier = obj_
            obj_.original_tagname_ = 'referenceSystemIdentifier'
        super(MD_ReferenceSystem_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_ReferenceSystem_Type


class RS_Identifier_Type(MD_Identifier_Type):
    subclass = None
    superclass = MD_Identifier_Type
    def __init__(self, id=None, uuid=None, authority=None, code=None, codeSpace=None, version=None):
        self.original_tagname_ = None
        super(RS_Identifier_Type, self).__init__(id, uuid, authority, code, )
        self.codeSpace = codeSpace
        self.version = version
    def factory(*args_, **kwargs_):
        if RS_Identifier_Type.subclass:
            return RS_Identifier_Type.subclass(*args_, **kwargs_)
        else:
            return RS_Identifier_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_codeSpace(self): return self.codeSpace
    def set_codeSpace(self, codeSpace): self.codeSpace = codeSpace
    def get_version(self): return self.version
    def set_version(self, version): self.version = version
    def hasContent_(self):
        if (
            self.codeSpace is not None or
            self.version is not None or
            super(RS_Identifier_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RS_Identifier_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RS_Identifier_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RS_Identifier_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RS_Identifier_Type'):
        super(RS_Identifier_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RS_Identifier_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RS_Identifier_Type', fromsubclass_=False, pretty_print=True):
        super(RS_Identifier_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.codeSpace is not None:
            self.codeSpace.export(outfile, level, namespace_, name_='codeSpace', pretty_print=pretty_print)
        if self.version is not None:
            self.version.export(outfile, level, namespace_, name_='version', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RS_Identifier_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(RS_Identifier_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(RS_Identifier_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.codeSpace is not None:
            showIndent(outfile, level)
            outfile.write('codeSpace=model_.CharacterString_PropertyType(\n')
            self.codeSpace.exportLiteral(outfile, level, name_='codeSpace')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.version is not None:
            showIndent(outfile, level)
            outfile.write('version=model_.CharacterString_PropertyType(\n')
            self.version.exportLiteral(outfile, level, name_='version')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(RS_Identifier_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'codeSpace':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.codeSpace = obj_
            obj_.original_tagname_ = 'codeSpace'
        elif nodeName_ == 'version':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.version = obj_
            obj_.original_tagname_ = 'version'
        super(RS_Identifier_Type, self).buildChildren(child_, node, nodeName_, True)
# end class RS_Identifier_Type


class CI_Series_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, name=None, issueIdentification=None, page=None):
        self.original_tagname_ = None
        super(CI_Series_Type, self).__init__(id, uuid, )
        self.name = name
        self.issueIdentification = issueIdentification
        self.page = page
    def factory(*args_, **kwargs_):
        if CI_Series_Type.subclass:
            return CI_Series_Type.subclass(*args_, **kwargs_)
        else:
            return CI_Series_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_issueIdentification(self): return self.issueIdentification
    def set_issueIdentification(self, issueIdentification): self.issueIdentification = issueIdentification
    def get_page(self): return self.page
    def set_page(self, page): self.page = page
    def hasContent_(self):
        if (
            self.name is not None or
            self.issueIdentification is not None or
            self.page is not None or
            super(CI_Series_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Series_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Series_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Series_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Series_Type'):
        super(CI_Series_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Series_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Series_Type', fromsubclass_=False, pretty_print=True):
        super(CI_Series_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        if self.issueIdentification is not None:
            self.issueIdentification.export(outfile, level, namespace_, name_='issueIdentification', pretty_print=pretty_print)
        if self.page is not None:
            self.page.export(outfile, level, namespace_, name_='page', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Series_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_Series_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_Series_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.CharacterString_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.issueIdentification is not None:
            showIndent(outfile, level)
            outfile.write('issueIdentification=model_.CharacterString_PropertyType(\n')
            self.issueIdentification.exportLiteral(outfile, level, name_='issueIdentification')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.page is not None:
            showIndent(outfile, level)
            outfile.write('page=model_.CharacterString_PropertyType(\n')
            self.page.exportLiteral(outfile, level, name_='page')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_Series_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'issueIdentification':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.issueIdentification = obj_
            obj_.original_tagname_ = 'issueIdentification'
        elif nodeName_ == 'page':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.page = obj_
            obj_.original_tagname_ = 'page'
        super(CI_Series_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_Series_Type


class CI_Date_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, date=None, dateType=None):
        self.original_tagname_ = None
        super(CI_Date_Type, self).__init__(id, uuid, )
        self.date = date
        self.dateType = dateType
    def factory(*args_, **kwargs_):
        if CI_Date_Type.subclass:
            return CI_Date_Type.subclass(*args_, **kwargs_)
        else:
            return CI_Date_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_date(self): return self.date
    def set_date(self, date): self.date = date
    def get_dateType(self): return self.dateType
    def set_dateType(self, dateType): self.dateType = dateType
    def hasContent_(self):
        if (
            self.date is not None or
            self.dateType is not None or
            super(CI_Date_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Date_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Date_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Date_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Date_Type'):
        super(CI_Date_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Date_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Date_Type', fromsubclass_=False, pretty_print=True):
        super(CI_Date_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.date is not None:
            self.date.export(outfile, level, namespace_, name_='date', pretty_print=pretty_print)
        if self.dateType is not None:
            self.dateType.export(outfile, level, namespace_, name_='dateType', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Date_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_Date_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_Date_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.date is not None:
            showIndent(outfile, level)
            outfile.write('date=model_.Date_PropertyType(\n')
            self.date.exportLiteral(outfile, level, name_='date')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dateType is not None:
            showIndent(outfile, level)
            outfile.write('dateType=model_.CI_DateTypeCode_PropertyType(\n')
            self.dateType.exportLiteral(outfile, level, name_='dateType')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_Date_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'date':
            obj_ = Date_PropertyType.factory()
            obj_.build(child_)
            self.date = obj_
            obj_.original_tagname_ = 'date'
        elif nodeName_ == 'dateType':
            obj_ = CI_DateTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.dateType = obj_
            obj_.original_tagname_ = 'dateType'
        super(CI_Date_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_Date_Type


class CI_Telephone_Type(AbstractObject_Type):
    """Telephone numbers for contacting the responsible individual or
    organisation"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, voice=None, facsimile=None):
        self.original_tagname_ = None
        super(CI_Telephone_Type, self).__init__(id, uuid, )
        if voice is None:
            self.voice = []
        else:
            self.voice = voice
        if facsimile is None:
            self.facsimile = []
        else:
            self.facsimile = facsimile
    def factory(*args_, **kwargs_):
        if CI_Telephone_Type.subclass:
            return CI_Telephone_Type.subclass(*args_, **kwargs_)
        else:
            return CI_Telephone_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_voice(self): return self.voice
    def set_voice(self, voice): self.voice = voice
    def add_voice(self, value): self.voice.append(value)
    def insert_voice_at(self, index, value): self.voice.insert(index, value)
    def replace_voice_at(self, index, value): self.voice[index] = value
    def get_facsimile(self): return self.facsimile
    def set_facsimile(self, facsimile): self.facsimile = facsimile
    def add_facsimile(self, value): self.facsimile.append(value)
    def insert_facsimile_at(self, index, value): self.facsimile.insert(index, value)
    def replace_facsimile_at(self, index, value): self.facsimile[index] = value
    def hasContent_(self):
        if (
            self.voice or
            self.facsimile or
            super(CI_Telephone_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Telephone_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Telephone_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Telephone_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Telephone_Type'):
        super(CI_Telephone_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Telephone_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Telephone_Type', fromsubclass_=False, pretty_print=True):
        super(CI_Telephone_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for voice_ in self.voice:
            voice_.export(outfile, level, namespace_, name_='voice', pretty_print=pretty_print)
        for facsimile_ in self.facsimile:
            facsimile_.export(outfile, level, namespace_, name_='facsimile', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Telephone_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_Telephone_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_Telephone_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('voice=[\n')
        level += 1
        for voice_ in self.voice:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            voice_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('facsimile=[\n')
        level += 1
        for facsimile_ in self.facsimile:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            facsimile_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_Telephone_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'voice':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.voice.append(obj_)
            obj_.original_tagname_ = 'voice'
        elif nodeName_ == 'facsimile':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.facsimile.append(obj_)
            obj_.original_tagname_ = 'facsimile'
        super(CI_Telephone_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_Telephone_Type


class CI_Contact_Type(AbstractObject_Type):
    """Information required enabling contact with the responsible person
    and/or organisation"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, phone=None, address=None, onlineResource=None, hoursOfService=None, contactInstructions=None):
        self.original_tagname_ = None
        super(CI_Contact_Type, self).__init__(id, uuid, )
        self.phone = phone
        self.address = address
        self.onlineResource = onlineResource
        self.hoursOfService = hoursOfService
        self.contactInstructions = contactInstructions
    def factory(*args_, **kwargs_):
        if CI_Contact_Type.subclass:
            return CI_Contact_Type.subclass(*args_, **kwargs_)
        else:
            return CI_Contact_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_phone(self): return self.phone
    def set_phone(self, phone): self.phone = phone
    def get_address(self): return self.address
    def set_address(self, address): self.address = address
    def get_onlineResource(self): return self.onlineResource
    def set_onlineResource(self, onlineResource): self.onlineResource = onlineResource
    def get_hoursOfService(self): return self.hoursOfService
    def set_hoursOfService(self, hoursOfService): self.hoursOfService = hoursOfService
    def get_contactInstructions(self): return self.contactInstructions
    def set_contactInstructions(self, contactInstructions): self.contactInstructions = contactInstructions
    def hasContent_(self):
        if (
            self.phone is not None or
            self.address is not None or
            self.onlineResource is not None or
            self.hoursOfService is not None or
            self.contactInstructions is not None or
            super(CI_Contact_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Contact_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Contact_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Contact_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Contact_Type'):
        super(CI_Contact_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Contact_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Contact_Type', fromsubclass_=False, pretty_print=True):
        super(CI_Contact_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.phone is not None:
            self.phone.export(outfile, level, namespace_, name_='phone', pretty_print=pretty_print)
        if self.address is not None:
            self.address.export(outfile, level, namespace_, name_='address', pretty_print=pretty_print)
        if self.onlineResource is not None:
            self.onlineResource.export(outfile, level, namespace_, name_='onlineResource', pretty_print=pretty_print)
        if self.hoursOfService is not None:
            self.hoursOfService.export(outfile, level, namespace_, name_='hoursOfService', pretty_print=pretty_print)
        if self.contactInstructions is not None:
            self.contactInstructions.export(outfile, level, namespace_, name_='contactInstructions', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Contact_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_Contact_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_Contact_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.phone is not None:
            showIndent(outfile, level)
            outfile.write('phone=model_.CI_Telephone_PropertyType(\n')
            self.phone.exportLiteral(outfile, level, name_='phone')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.address is not None:
            showIndent(outfile, level)
            outfile.write('address=model_.CI_Address_PropertyType(\n')
            self.address.exportLiteral(outfile, level, name_='address')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.onlineResource is not None:
            showIndent(outfile, level)
            outfile.write('onlineResource=model_.CI_OnlineResource_PropertyType(\n')
            self.onlineResource.exportLiteral(outfile, level, name_='onlineResource')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.hoursOfService is not None:
            showIndent(outfile, level)
            outfile.write('hoursOfService=model_.CharacterString_PropertyType(\n')
            self.hoursOfService.exportLiteral(outfile, level, name_='hoursOfService')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.contactInstructions is not None:
            showIndent(outfile, level)
            outfile.write('contactInstructions=model_.CharacterString_PropertyType(\n')
            self.contactInstructions.exportLiteral(outfile, level, name_='contactInstructions')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_Contact_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'phone':
            obj_ = CI_Telephone_PropertyType.factory()
            obj_.build(child_)
            self.phone = obj_
            obj_.original_tagname_ = 'phone'
        elif nodeName_ == 'address':
            obj_ = CI_Address_PropertyType.factory()
            obj_.build(child_)
            self.address = obj_
            obj_.original_tagname_ = 'address'
        elif nodeName_ == 'onlineResource':
            obj_ = CI_OnlineResource_PropertyType.factory()
            obj_.build(child_)
            self.onlineResource = obj_
            obj_.original_tagname_ = 'onlineResource'
        elif nodeName_ == 'hoursOfService':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.hoursOfService = obj_
            obj_.original_tagname_ = 'hoursOfService'
        elif nodeName_ == 'contactInstructions':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.contactInstructions = obj_
            obj_.original_tagname_ = 'contactInstructions'
        super(CI_Contact_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_Contact_Type


class CI_OnlineResource_Type(AbstractObject_Type):
    """Information about online sources from which the dataset,
    specification, or community profile name and extended metadata
    elements can be obtained."""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, linkage=None, protocol=None, applicationProfile=None, name=None, description=None, function=None):
        self.original_tagname_ = None
        super(CI_OnlineResource_Type, self).__init__(id, uuid, )
        self.linkage = linkage
        self.protocol = protocol
        self.applicationProfile = applicationProfile
        self.name = name
        self.description = description
        self.function = function
    def factory(*args_, **kwargs_):
        if CI_OnlineResource_Type.subclass:
            return CI_OnlineResource_Type.subclass(*args_, **kwargs_)
        else:
            return CI_OnlineResource_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_linkage(self): return self.linkage
    def set_linkage(self, linkage): self.linkage = linkage
    def get_protocol(self): return self.protocol
    def set_protocol(self, protocol): self.protocol = protocol
    def get_applicationProfile(self): return self.applicationProfile
    def set_applicationProfile(self, applicationProfile): self.applicationProfile = applicationProfile
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_description(self): return self.description
    def set_description(self, description): self.description = description
    def get_function(self): return self.function
    def set_function(self, function): self.function = function
    def hasContent_(self):
        if (
            self.linkage is not None or
            self.protocol is not None or
            self.applicationProfile is not None or
            self.name is not None or
            self.description is not None or
            self.function is not None or
            super(CI_OnlineResource_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_OnlineResource_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_OnlineResource_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_OnlineResource_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_OnlineResource_Type'):
        super(CI_OnlineResource_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_OnlineResource_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_OnlineResource_Type', fromsubclass_=False, pretty_print=True):
        super(CI_OnlineResource_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.linkage is not None:
            self.linkage.export(outfile, level, namespace_, name_='linkage', pretty_print=pretty_print)
        if self.protocol is not None:
            self.protocol.export(outfile, level, namespace_, name_='protocol', pretty_print=pretty_print)
        if self.applicationProfile is not None:
            self.applicationProfile.export(outfile, level, namespace_, name_='applicationProfile', pretty_print=pretty_print)
        if self.name is not None:
            self.name.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
        if self.description is not None:
            self.description.export(outfile, level, namespace_, name_='description', pretty_print=pretty_print)
        if self.function is not None:
            self.function.export(outfile, level, namespace_, name_='function', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_OnlineResource_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_OnlineResource_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_OnlineResource_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.linkage is not None:
            showIndent(outfile, level)
            outfile.write('linkage=model_.URL_PropertyType(\n')
            self.linkage.exportLiteral(outfile, level, name_='linkage')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.protocol is not None:
            showIndent(outfile, level)
            outfile.write('protocol=model_.CharacterString_PropertyType(\n')
            self.protocol.exportLiteral(outfile, level, name_='protocol')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.applicationProfile is not None:
            showIndent(outfile, level)
            outfile.write('applicationProfile=model_.CharacterString_PropertyType(\n')
            self.applicationProfile.exportLiteral(outfile, level, name_='applicationProfile')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.name is not None:
            showIndent(outfile, level)
            outfile.write('name=model_.CharacterString_PropertyType(\n')
            self.name.exportLiteral(outfile, level, name_='name')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.description is not None:
            showIndent(outfile, level)
            outfile.write('description=model_.CharacterString_PropertyType(\n')
            self.description.exportLiteral(outfile, level, name_='description')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.function is not None:
            showIndent(outfile, level)
            outfile.write('function=model_.CI_OnLineFunctionCode_PropertyType(\n')
            self.function.exportLiteral(outfile, level, name_='function')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_OnlineResource_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'linkage':
            obj_ = URL_PropertyType.factory()
            obj_.build(child_)
            self.linkage = obj_
            obj_.original_tagname_ = 'linkage'
        elif nodeName_ == 'protocol':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.protocol = obj_
            obj_.original_tagname_ = 'protocol'
        elif nodeName_ == 'applicationProfile':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.applicationProfile = obj_
            obj_.original_tagname_ = 'applicationProfile'
        elif nodeName_ == 'name':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.name = obj_
            obj_.original_tagname_ = 'name'
        elif nodeName_ == 'description':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.description = obj_
            obj_.original_tagname_ = 'description'
        elif nodeName_ == 'function':
            obj_ = CI_OnLineFunctionCode_PropertyType.factory()
            obj_.build(child_)
            self.function = obj_
            obj_.original_tagname_ = 'function'
        super(CI_OnlineResource_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_OnlineResource_Type


class CI_Address_Type(AbstractObject_Type):
    """Location of the responsible individual or organisation"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, deliveryPoint=None, city=None, administrativeArea=None, postalCode=None, country=None, electronicMailAddress=None):
        self.original_tagname_ = None
        super(CI_Address_Type, self).__init__(id, uuid, )
        if deliveryPoint is None:
            self.deliveryPoint = []
        else:
            self.deliveryPoint = deliveryPoint
        self.city = city
        self.administrativeArea = administrativeArea
        self.postalCode = postalCode
        self.country = country
        if electronicMailAddress is None:
            self.electronicMailAddress = []
        else:
            self.electronicMailAddress = electronicMailAddress
    def factory(*args_, **kwargs_):
        if CI_Address_Type.subclass:
            return CI_Address_Type.subclass(*args_, **kwargs_)
        else:
            return CI_Address_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_deliveryPoint(self): return self.deliveryPoint
    def set_deliveryPoint(self, deliveryPoint): self.deliveryPoint = deliveryPoint
    def add_deliveryPoint(self, value): self.deliveryPoint.append(value)
    def insert_deliveryPoint_at(self, index, value): self.deliveryPoint.insert(index, value)
    def replace_deliveryPoint_at(self, index, value): self.deliveryPoint[index] = value
    def get_city(self): return self.city
    def set_city(self, city): self.city = city
    def get_administrativeArea(self): return self.administrativeArea
    def set_administrativeArea(self, administrativeArea): self.administrativeArea = administrativeArea
    def get_postalCode(self): return self.postalCode
    def set_postalCode(self, postalCode): self.postalCode = postalCode
    def get_country(self): return self.country
    def set_country(self, country): self.country = country
    def get_electronicMailAddress(self): return self.electronicMailAddress
    def set_electronicMailAddress(self, electronicMailAddress): self.electronicMailAddress = electronicMailAddress
    def add_electronicMailAddress(self, value): self.electronicMailAddress.append(value)
    def insert_electronicMailAddress_at(self, index, value): self.electronicMailAddress.insert(index, value)
    def replace_electronicMailAddress_at(self, index, value): self.electronicMailAddress[index] = value
    def hasContent_(self):
        if (
            self.deliveryPoint or
            self.city is not None or
            self.administrativeArea is not None or
            self.postalCode is not None or
            self.country is not None or
            self.electronicMailAddress or
            super(CI_Address_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Address_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Address_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Address_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Address_Type'):
        super(CI_Address_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Address_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Address_Type', fromsubclass_=False, pretty_print=True):
        super(CI_Address_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for deliveryPoint_ in self.deliveryPoint:
            deliveryPoint_.export(outfile, level, namespace_, name_='deliveryPoint', pretty_print=pretty_print)
        if self.city is not None:
            self.city.export(outfile, level, namespace_, name_='city', pretty_print=pretty_print)
        if self.administrativeArea is not None:
            self.administrativeArea.export(outfile, level, namespace_, name_='administrativeArea', pretty_print=pretty_print)
        if self.postalCode is not None:
            self.postalCode.export(outfile, level, namespace_, name_='postalCode', pretty_print=pretty_print)
        if self.country is not None:
            self.country.export(outfile, level, namespace_, name_='country', pretty_print=pretty_print)
        for electronicMailAddress_ in self.electronicMailAddress:
            electronicMailAddress_.export(outfile, level, namespace_, name_='electronicMailAddress', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Address_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_Address_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_Address_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('deliveryPoint=[\n')
        level += 1
        for deliveryPoint_ in self.deliveryPoint:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            deliveryPoint_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.city is not None:
            showIndent(outfile, level)
            outfile.write('city=model_.CharacterString_PropertyType(\n')
            self.city.exportLiteral(outfile, level, name_='city')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.administrativeArea is not None:
            showIndent(outfile, level)
            outfile.write('administrativeArea=model_.CharacterString_PropertyType(\n')
            self.administrativeArea.exportLiteral(outfile, level, name_='administrativeArea')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.postalCode is not None:
            showIndent(outfile, level)
            outfile.write('postalCode=model_.CharacterString_PropertyType(\n')
            self.postalCode.exportLiteral(outfile, level, name_='postalCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.country is not None:
            showIndent(outfile, level)
            outfile.write('country=model_.CharacterString_PropertyType(\n')
            self.country.exportLiteral(outfile, level, name_='country')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('electronicMailAddress=[\n')
        level += 1
        for electronicMailAddress_ in self.electronicMailAddress:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            electronicMailAddress_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_Address_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'deliveryPoint':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.deliveryPoint.append(obj_)
            obj_.original_tagname_ = 'deliveryPoint'
        elif nodeName_ == 'city':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.city = obj_
            obj_.original_tagname_ = 'city'
        elif nodeName_ == 'administrativeArea':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.administrativeArea = obj_
            obj_.original_tagname_ = 'administrativeArea'
        elif nodeName_ == 'postalCode':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.postalCode = obj_
            obj_.original_tagname_ = 'postalCode'
        elif nodeName_ == 'country':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.country = obj_
            obj_.original_tagname_ = 'country'
        elif nodeName_ == 'electronicMailAddress':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.electronicMailAddress.append(obj_)
            obj_.original_tagname_ = 'electronicMailAddress'
        super(CI_Address_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_Address_Type


class CI_Citation_Type(AbstractObject_Type):
    """Standardized resource reference"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, title=None, alternateTitle=None, date=None, edition=None, editionDate=None, identifier=None, citedResponsibleParty=None, presentationForm=None, series=None, otherCitationDetails=None, collectiveTitle=None, ISBN=None, ISSN=None):
        self.original_tagname_ = None
        super(CI_Citation_Type, self).__init__(id, uuid, )
        self.title = title
        if alternateTitle is None:
            self.alternateTitle = []
        else:
            self.alternateTitle = alternateTitle
        if date is None:
            self.date = []
        else:
            self.date = date
        self.edition = edition
        self.editionDate = editionDate
        if identifier is None:
            self.identifier = []
        else:
            self.identifier = identifier
        if citedResponsibleParty is None:
            self.citedResponsibleParty = []
        else:
            self.citedResponsibleParty = citedResponsibleParty
        if presentationForm is None:
            self.presentationForm = []
        else:
            self.presentationForm = presentationForm
        self.series = series
        self.otherCitationDetails = otherCitationDetails
        self.collectiveTitle = collectiveTitle
        self.ISBN = ISBN
        self.ISSN = ISSN
    def factory(*args_, **kwargs_):
        if CI_Citation_Type.subclass:
            return CI_Citation_Type.subclass(*args_, **kwargs_)
        else:
            return CI_Citation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_alternateTitle(self): return self.alternateTitle
    def set_alternateTitle(self, alternateTitle): self.alternateTitle = alternateTitle
    def add_alternateTitle(self, value): self.alternateTitle.append(value)
    def insert_alternateTitle_at(self, index, value): self.alternateTitle.insert(index, value)
    def replace_alternateTitle_at(self, index, value): self.alternateTitle[index] = value
    def get_date(self): return self.date
    def set_date(self, date): self.date = date
    def add_date(self, value): self.date.append(value)
    def insert_date_at(self, index, value): self.date.insert(index, value)
    def replace_date_at(self, index, value): self.date[index] = value
    def get_edition(self): return self.edition
    def set_edition(self, edition): self.edition = edition
    def get_editionDate(self): return self.editionDate
    def set_editionDate(self, editionDate): self.editionDate = editionDate
    def get_identifier(self): return self.identifier
    def set_identifier(self, identifier): self.identifier = identifier
    def add_identifier(self, value): self.identifier.append(value)
    def insert_identifier_at(self, index, value): self.identifier.insert(index, value)
    def replace_identifier_at(self, index, value): self.identifier[index] = value
    def get_citedResponsibleParty(self): return self.citedResponsibleParty
    def set_citedResponsibleParty(self, citedResponsibleParty): self.citedResponsibleParty = citedResponsibleParty
    def add_citedResponsibleParty(self, value): self.citedResponsibleParty.append(value)
    def insert_citedResponsibleParty_at(self, index, value): self.citedResponsibleParty.insert(index, value)
    def replace_citedResponsibleParty_at(self, index, value): self.citedResponsibleParty[index] = value
    def get_presentationForm(self): return self.presentationForm
    def set_presentationForm(self, presentationForm): self.presentationForm = presentationForm
    def add_presentationForm(self, value): self.presentationForm.append(value)
    def insert_presentationForm_at(self, index, value): self.presentationForm.insert(index, value)
    def replace_presentationForm_at(self, index, value): self.presentationForm[index] = value
    def get_series(self): return self.series
    def set_series(self, series): self.series = series
    def get_otherCitationDetails(self): return self.otherCitationDetails
    def set_otherCitationDetails(self, otherCitationDetails): self.otherCitationDetails = otherCitationDetails
    def get_collectiveTitle(self): return self.collectiveTitle
    def set_collectiveTitle(self, collectiveTitle): self.collectiveTitle = collectiveTitle
    def get_ISBN(self): return self.ISBN
    def set_ISBN(self, ISBN): self.ISBN = ISBN
    def get_ISSN(self): return self.ISSN
    def set_ISSN(self, ISSN): self.ISSN = ISSN
    def hasContent_(self):
        if (
            self.title is not None or
            self.alternateTitle or
            self.date or
            self.edition is not None or
            self.editionDate is not None or
            self.identifier or
            self.citedResponsibleParty or
            self.presentationForm or
            self.series is not None or
            self.otherCitationDetails is not None or
            self.collectiveTitle is not None or
            self.ISBN is not None or
            self.ISSN is not None or
            super(CI_Citation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_Citation_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Citation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_Citation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_Citation_Type'):
        super(CI_Citation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_Citation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_Citation_Type', fromsubclass_=False, pretty_print=True):
        super(CI_Citation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.title is not None:
            self.title.export(outfile, level, namespace_, name_='title', pretty_print=pretty_print)
        for alternateTitle_ in self.alternateTitle:
            alternateTitle_.export(outfile, level, namespace_, name_='alternateTitle', pretty_print=pretty_print)
        for date_ in self.date:
            date_.export(outfile, level, namespace_, name_='date', pretty_print=pretty_print)
        if self.edition is not None:
            self.edition.export(outfile, level, namespace_, name_='edition', pretty_print=pretty_print)
        if self.editionDate is not None:
            self.editionDate.export(outfile, level, namespace_, name_='editionDate', pretty_print=pretty_print)
        for identifier_ in self.identifier:
            identifier_.export(outfile, level, namespace_, name_='identifier', pretty_print=pretty_print)
        for citedResponsibleParty_ in self.citedResponsibleParty:
            citedResponsibleParty_.export(outfile, level, namespace_, name_='citedResponsibleParty', pretty_print=pretty_print)
        for presentationForm_ in self.presentationForm:
            presentationForm_.export(outfile, level, namespace_, name_='presentationForm', pretty_print=pretty_print)
        if self.series is not None:
            self.series.export(outfile, level, namespace_, name_='series', pretty_print=pretty_print)
        if self.otherCitationDetails is not None:
            self.otherCitationDetails.export(outfile, level, namespace_, name_='otherCitationDetails', pretty_print=pretty_print)
        if self.collectiveTitle is not None:
            self.collectiveTitle.export(outfile, level, namespace_, name_='collectiveTitle', pretty_print=pretty_print)
        if self.ISBN is not None:
            self.ISBN.export(outfile, level, namespace_, name_='ISBN', pretty_print=pretty_print)
        if self.ISSN is not None:
            self.ISSN.export(outfile, level, namespace_, name_='ISSN', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_Citation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_Citation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_Citation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.title is not None:
            showIndent(outfile, level)
            outfile.write('title=model_.CharacterString_PropertyType(\n')
            self.title.exportLiteral(outfile, level, name_='title')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('alternateTitle=[\n')
        level += 1
        for alternateTitle_ in self.alternateTitle:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            alternateTitle_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('date=[\n')
        level += 1
        for date_ in self.date:
            showIndent(outfile, level)
            outfile.write('model_.CI_Date_PropertyType(\n')
            date_.exportLiteral(outfile, level, name_='CI_Date_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.edition is not None:
            showIndent(outfile, level)
            outfile.write('edition=model_.CharacterString_PropertyType(\n')
            self.edition.exportLiteral(outfile, level, name_='edition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.editionDate is not None:
            showIndent(outfile, level)
            outfile.write('editionDate=model_.Date_PropertyType(\n')
            self.editionDate.exportLiteral(outfile, level, name_='editionDate')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('identifier=[\n')
        level += 1
        for identifier_ in self.identifier:
            showIndent(outfile, level)
            outfile.write('model_.MD_Identifier_PropertyType(\n')
            identifier_.exportLiteral(outfile, level, name_='MD_Identifier_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('citedResponsibleParty=[\n')
        level += 1
        for citedResponsibleParty_ in self.citedResponsibleParty:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            citedResponsibleParty_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('presentationForm=[\n')
        level += 1
        for presentationForm_ in self.presentationForm:
            showIndent(outfile, level)
            outfile.write('model_.CI_PresentationFormCode_PropertyType(\n')
            presentationForm_.exportLiteral(outfile, level, name_='CI_PresentationFormCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.series is not None:
            showIndent(outfile, level)
            outfile.write('series=model_.CI_Series_PropertyType(\n')
            self.series.exportLiteral(outfile, level, name_='series')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.otherCitationDetails is not None:
            showIndent(outfile, level)
            outfile.write('otherCitationDetails=model_.CharacterString_PropertyType(\n')
            self.otherCitationDetails.exportLiteral(outfile, level, name_='otherCitationDetails')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.collectiveTitle is not None:
            showIndent(outfile, level)
            outfile.write('collectiveTitle=model_.CharacterString_PropertyType(\n')
            self.collectiveTitle.exportLiteral(outfile, level, name_='collectiveTitle')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ISBN is not None:
            showIndent(outfile, level)
            outfile.write('ISBN=model_.CharacterString_PropertyType(\n')
            self.ISBN.exportLiteral(outfile, level, name_='ISBN')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ISSN is not None:
            showIndent(outfile, level)
            outfile.write('ISSN=model_.CharacterString_PropertyType(\n')
            self.ISSN.exportLiteral(outfile, level, name_='ISSN')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_Citation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'title':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.title = obj_
            obj_.original_tagname_ = 'title'
        elif nodeName_ == 'alternateTitle':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.alternateTitle.append(obj_)
            obj_.original_tagname_ = 'alternateTitle'
        elif nodeName_ == 'date':
            obj_ = CI_Date_PropertyType.factory()
            obj_.build(child_)
            self.date.append(obj_)
            obj_.original_tagname_ = 'date'
        elif nodeName_ == 'edition':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.edition = obj_
            obj_.original_tagname_ = 'edition'
        elif nodeName_ == 'editionDate':
            obj_ = Date_PropertyType.factory()
            obj_.build(child_)
            self.editionDate = obj_
            obj_.original_tagname_ = 'editionDate'
        elif nodeName_ == 'identifier':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.identifier.append(obj_)
            obj_.original_tagname_ = 'identifier'
        elif nodeName_ == 'citedResponsibleParty':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.citedResponsibleParty.append(obj_)
            obj_.original_tagname_ = 'citedResponsibleParty'
        elif nodeName_ == 'presentationForm':
            obj_ = CI_PresentationFormCode_PropertyType.factory()
            obj_.build(child_)
            self.presentationForm.append(obj_)
            obj_.original_tagname_ = 'presentationForm'
        elif nodeName_ == 'series':
            obj_ = CI_Series_PropertyType.factory()
            obj_.build(child_)
            self.series = obj_
            obj_.original_tagname_ = 'series'
        elif nodeName_ == 'otherCitationDetails':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.otherCitationDetails = obj_
            obj_.original_tagname_ = 'otherCitationDetails'
        elif nodeName_ == 'collectiveTitle':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.collectiveTitle = obj_
            obj_.original_tagname_ = 'collectiveTitle'
        elif nodeName_ == 'ISBN':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.ISBN = obj_
            obj_.original_tagname_ = 'ISBN'
        elif nodeName_ == 'ISSN':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.ISSN = obj_
            obj_.original_tagname_ = 'ISSN'
        super(CI_Citation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_Citation_Type


class CI_ResponsibleParty_Type(AbstractObject_Type):
    """Identification of, and means of communication with, person(s) and
    organisations associated with the dataset"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, individualName=None, organisationName=None, positionName=None, contactInfo=None, role=None):
        self.original_tagname_ = None
        super(CI_ResponsibleParty_Type, self).__init__(id, uuid, )
        self.individualName = individualName
        self.organisationName = organisationName
        self.positionName = positionName
        self.contactInfo = contactInfo
        self.role = role
    def factory(*args_, **kwargs_):
        if CI_ResponsibleParty_Type.subclass:
            return CI_ResponsibleParty_Type.subclass(*args_, **kwargs_)
        else:
            return CI_ResponsibleParty_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_individualName(self): return self.individualName
    def set_individualName(self, individualName): self.individualName = individualName
    def get_organisationName(self): return self.organisationName
    def set_organisationName(self, organisationName): self.organisationName = organisationName
    def get_positionName(self): return self.positionName
    def set_positionName(self, positionName): self.positionName = positionName
    def get_contactInfo(self): return self.contactInfo
    def set_contactInfo(self, contactInfo): self.contactInfo = contactInfo
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def hasContent_(self):
        if (
            self.individualName is not None or
            self.organisationName is not None or
            self.positionName is not None or
            self.contactInfo is not None or
            self.role is not None or
            super(CI_ResponsibleParty_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CI_ResponsibleParty_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CI_ResponsibleParty_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CI_ResponsibleParty_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CI_ResponsibleParty_Type'):
        super(CI_ResponsibleParty_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CI_ResponsibleParty_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CI_ResponsibleParty_Type', fromsubclass_=False, pretty_print=True):
        super(CI_ResponsibleParty_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.individualName is not None:
            self.individualName.export(outfile, level, namespace_, name_='individualName', pretty_print=pretty_print)
        if self.organisationName is not None:
            self.organisationName.export(outfile, level, namespace_, name_='organisationName', pretty_print=pretty_print)
        if self.positionName is not None:
            self.positionName.export(outfile, level, namespace_, name_='positionName', pretty_print=pretty_print)
        if self.contactInfo is not None:
            self.contactInfo.export(outfile, level, namespace_, name_='contactInfo', pretty_print=pretty_print)
        if self.role is not None:
            self.role.export(outfile, level, namespace_, name_='role', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CI_ResponsibleParty_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CI_ResponsibleParty_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CI_ResponsibleParty_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.individualName is not None:
            showIndent(outfile, level)
            outfile.write('individualName=model_.CharacterString_PropertyType(\n')
            self.individualName.exportLiteral(outfile, level, name_='individualName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.organisationName is not None:
            showIndent(outfile, level)
            outfile.write('organisationName=model_.CharacterString_PropertyType(\n')
            self.organisationName.exportLiteral(outfile, level, name_='organisationName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.positionName is not None:
            showIndent(outfile, level)
            outfile.write('positionName=model_.CharacterString_PropertyType(\n')
            self.positionName.exportLiteral(outfile, level, name_='positionName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.contactInfo is not None:
            showIndent(outfile, level)
            outfile.write('contactInfo=model_.CI_Contact_PropertyType(\n')
            self.contactInfo.exportLiteral(outfile, level, name_='contactInfo')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.role is not None:
            showIndent(outfile, level)
            outfile.write('role=model_.CI_RoleCode_PropertyType(\n')
            self.role.exportLiteral(outfile, level, name_='role')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CI_ResponsibleParty_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'individualName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.individualName = obj_
            obj_.original_tagname_ = 'individualName'
        elif nodeName_ == 'organisationName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.organisationName = obj_
            obj_.original_tagname_ = 'organisationName'
        elif nodeName_ == 'positionName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.positionName = obj_
            obj_.original_tagname_ = 'positionName'
        elif nodeName_ == 'contactInfo':
            obj_ = CI_Contact_PropertyType.factory()
            obj_.build(child_)
            self.contactInfo = obj_
            obj_.original_tagname_ = 'contactInfo'
        elif nodeName_ == 'role':
            obj_ = CI_RoleCode_PropertyType.factory()
            obj_.build(child_)
            self.role = obj_
            obj_.original_tagname_ = 'role'
        super(CI_ResponsibleParty_Type, self).buildChildren(child_, node, nodeName_, True)
# end class CI_ResponsibleParty_Type


class MD_GeometricObjects_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, geometricObjectType=None, geometricObjectCount=None):
        self.original_tagname_ = None
        super(MD_GeometricObjects_Type, self).__init__(id, uuid, )
        self.geometricObjectType = geometricObjectType
        self.geometricObjectCount = geometricObjectCount
    def factory(*args_, **kwargs_):
        if MD_GeometricObjects_Type.subclass:
            return MD_GeometricObjects_Type.subclass(*args_, **kwargs_)
        else:
            return MD_GeometricObjects_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_geometricObjectType(self): return self.geometricObjectType
    def set_geometricObjectType(self, geometricObjectType): self.geometricObjectType = geometricObjectType
    def get_geometricObjectCount(self): return self.geometricObjectCount
    def set_geometricObjectCount(self, geometricObjectCount): self.geometricObjectCount = geometricObjectCount
    def hasContent_(self):
        if (
            self.geometricObjectType is not None or
            self.geometricObjectCount is not None or
            super(MD_GeometricObjects_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_GeometricObjects_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GeometricObjects_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_GeometricObjects_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_GeometricObjects_Type'):
        super(MD_GeometricObjects_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GeometricObjects_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_GeometricObjects_Type', fromsubclass_=False, pretty_print=True):
        super(MD_GeometricObjects_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.geometricObjectType is not None:
            self.geometricObjectType.export(outfile, level, namespace_, name_='geometricObjectType', pretty_print=pretty_print)
        if self.geometricObjectCount is not None:
            self.geometricObjectCount.export(outfile, level, namespace_, name_='geometricObjectCount', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_GeometricObjects_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_GeometricObjects_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_GeometricObjects_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.geometricObjectType is not None:
            showIndent(outfile, level)
            outfile.write('geometricObjectType=model_.MD_GeometricObjectTypeCode_PropertyType(\n')
            self.geometricObjectType.exportLiteral(outfile, level, name_='geometricObjectType')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.geometricObjectCount is not None:
            showIndent(outfile, level)
            outfile.write('geometricObjectCount=model_.Integer_PropertyType(\n')
            self.geometricObjectCount.exportLiteral(outfile, level, name_='geometricObjectCount')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_GeometricObjects_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'geometricObjectType':
            obj_ = MD_GeometricObjectTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.geometricObjectType = obj_
            obj_.original_tagname_ = 'geometricObjectType'
        elif nodeName_ == 'geometricObjectCount':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.geometricObjectCount = obj_
            obj_.original_tagname_ = 'geometricObjectCount'
        super(MD_GeometricObjects_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_GeometricObjects_Type


class MD_Dimension_Type(AbstractObject_Type):
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, dimensionName=None, dimensionSize=None, resolution=None):
        self.original_tagname_ = None
        super(MD_Dimension_Type, self).__init__(id, uuid, )
        self.dimensionName = dimensionName
        self.dimensionSize = dimensionSize
        self.resolution = resolution
    def factory(*args_, **kwargs_):
        if MD_Dimension_Type.subclass:
            return MD_Dimension_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Dimension_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_dimensionName(self): return self.dimensionName
    def set_dimensionName(self, dimensionName): self.dimensionName = dimensionName
    def get_dimensionSize(self): return self.dimensionSize
    def set_dimensionSize(self, dimensionSize): self.dimensionSize = dimensionSize
    def get_resolution(self): return self.resolution
    def set_resolution(self, resolution): self.resolution = resolution
    def hasContent_(self):
        if (
            self.dimensionName is not None or
            self.dimensionSize is not None or
            self.resolution is not None or
            super(MD_Dimension_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Dimension_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Dimension_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Dimension_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Dimension_Type'):
        super(MD_Dimension_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Dimension_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Dimension_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Dimension_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.dimensionName is not None:
            self.dimensionName.export(outfile, level, namespace_, name_='dimensionName', pretty_print=pretty_print)
        if self.dimensionSize is not None:
            self.dimensionSize.export(outfile, level, namespace_, name_='dimensionSize', pretty_print=pretty_print)
        if self.resolution is not None:
            self.resolution.export(outfile, level, namespace_, name_='resolution', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Dimension_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Dimension_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Dimension_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.dimensionName is not None:
            showIndent(outfile, level)
            outfile.write('dimensionName=model_.MD_DimensionNameTypeCode_PropertyType(\n')
            self.dimensionName.exportLiteral(outfile, level, name_='dimensionName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dimensionSize is not None:
            showIndent(outfile, level)
            outfile.write('dimensionSize=model_.Integer_PropertyType(\n')
            self.dimensionSize.exportLiteral(outfile, level, name_='dimensionSize')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.resolution is not None:
            showIndent(outfile, level)
            outfile.write('resolution=model_.Measure_PropertyType(\n')
            self.resolution.exportLiteral(outfile, level, name_='resolution')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Dimension_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'dimensionName':
            obj_ = MD_DimensionNameTypeCode_PropertyType.factory()
            obj_.build(child_)
            self.dimensionName = obj_
            obj_.original_tagname_ = 'dimensionName'
        elif nodeName_ == 'dimensionSize':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.dimensionSize = obj_
            obj_.original_tagname_ = 'dimensionSize'
        elif nodeName_ == 'resolution':
            obj_ = Measure_PropertyType.factory()
            obj_.build(child_)
            self.resolution = obj_
            obj_.original_tagname_ = 'resolution'
        super(MD_Dimension_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Dimension_Type


class AbstractMD_SpatialRepresentation_Type(AbstractObject_Type):
    """Digital mechanism used to represent spatial information"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractMD_SpatialRepresentation_Type, self).__init__(id, uuid, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractMD_SpatialRepresentation_Type.subclass:
            return AbstractMD_SpatialRepresentation_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractMD_SpatialRepresentation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractMD_SpatialRepresentation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractMD_SpatialRepresentation_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMD_SpatialRepresentation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractMD_SpatialRepresentation_Type', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractMD_SpatialRepresentation_Type'):
        super(AbstractMD_SpatialRepresentation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMD_SpatialRepresentation_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractMD_SpatialRepresentation_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractMD_SpatialRepresentation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='AbstractMD_SpatialRepresentation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractMD_SpatialRepresentation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractMD_SpatialRepresentation_Type, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractMD_SpatialRepresentation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractMD_SpatialRepresentation_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractMD_SpatialRepresentation_Type


class MD_VectorSpatialRepresentation_Type(AbstractMD_SpatialRepresentation_Type):
    """Information about the vector spatial objects in the dataset"""
    subclass = None
    superclass = AbstractMD_SpatialRepresentation_Type
    def __init__(self, id=None, uuid=None, topologyLevel=None, geometricObjects=None):
        self.original_tagname_ = None
        super(MD_VectorSpatialRepresentation_Type, self).__init__(id, uuid, )
        self.topologyLevel = topologyLevel
        if geometricObjects is None:
            self.geometricObjects = []
        else:
            self.geometricObjects = geometricObjects
    def factory(*args_, **kwargs_):
        if MD_VectorSpatialRepresentation_Type.subclass:
            return MD_VectorSpatialRepresentation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_VectorSpatialRepresentation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_topologyLevel(self): return self.topologyLevel
    def set_topologyLevel(self, topologyLevel): self.topologyLevel = topologyLevel
    def get_geometricObjects(self): return self.geometricObjects
    def set_geometricObjects(self, geometricObjects): self.geometricObjects = geometricObjects
    def add_geometricObjects(self, value): self.geometricObjects.append(value)
    def insert_geometricObjects_at(self, index, value): self.geometricObjects.insert(index, value)
    def replace_geometricObjects_at(self, index, value): self.geometricObjects[index] = value
    def hasContent_(self):
        if (
            self.topologyLevel is not None or
            self.geometricObjects or
            super(MD_VectorSpatialRepresentation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_VectorSpatialRepresentation_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_VectorSpatialRepresentation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_VectorSpatialRepresentation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_VectorSpatialRepresentation_Type'):
        super(MD_VectorSpatialRepresentation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_VectorSpatialRepresentation_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_VectorSpatialRepresentation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_VectorSpatialRepresentation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.topologyLevel is not None:
            self.topologyLevel.export(outfile, level, namespace_, name_='topologyLevel', pretty_print=pretty_print)
        for geometricObjects_ in self.geometricObjects:
            geometricObjects_.export(outfile, level, namespace_, name_='geometricObjects', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_VectorSpatialRepresentation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_VectorSpatialRepresentation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_VectorSpatialRepresentation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.topologyLevel is not None:
            showIndent(outfile, level)
            outfile.write('topologyLevel=model_.MD_TopologyLevelCode_PropertyType(\n')
            self.topologyLevel.exportLiteral(outfile, level, name_='topologyLevel')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('geometricObjects=[\n')
        level += 1
        for geometricObjects_ in self.geometricObjects:
            showIndent(outfile, level)
            outfile.write('model_.MD_GeometricObjects_PropertyType(\n')
            geometricObjects_.exportLiteral(outfile, level, name_='MD_GeometricObjects_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_VectorSpatialRepresentation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'topologyLevel':
            obj_ = MD_TopologyLevelCode_PropertyType.factory()
            obj_.build(child_)
            self.topologyLevel = obj_
            obj_.original_tagname_ = 'topologyLevel'
        elif nodeName_ == 'geometricObjects':
            obj_ = MD_GeometricObjects_PropertyType.factory()
            obj_.build(child_)
            self.geometricObjects.append(obj_)
            obj_.original_tagname_ = 'geometricObjects'
        super(MD_VectorSpatialRepresentation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_VectorSpatialRepresentation_Type


class MD_GridSpatialRepresentation_Type(AbstractMD_SpatialRepresentation_Type):
    """Types and numbers of raster spatial objects in the dataset"""
    subclass = None
    superclass = AbstractMD_SpatialRepresentation_Type
    def __init__(self, id=None, uuid=None, numberOfDimensions=None, axisDimensionProperties=None, cellGeometry=None, transformationParameterAvailability=None, extensiontype_=None):
        self.original_tagname_ = None
        super(MD_GridSpatialRepresentation_Type, self).__init__(id, uuid, extensiontype_, )
        self.numberOfDimensions = numberOfDimensions
        if axisDimensionProperties is None:
            self.axisDimensionProperties = []
        else:
            self.axisDimensionProperties = axisDimensionProperties
        self.cellGeometry = cellGeometry
        self.transformationParameterAvailability = transformationParameterAvailability
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if MD_GridSpatialRepresentation_Type.subclass:
            return MD_GridSpatialRepresentation_Type.subclass(*args_, **kwargs_)
        else:
            return MD_GridSpatialRepresentation_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_numberOfDimensions(self): return self.numberOfDimensions
    def set_numberOfDimensions(self, numberOfDimensions): self.numberOfDimensions = numberOfDimensions
    def get_axisDimensionProperties(self): return self.axisDimensionProperties
    def set_axisDimensionProperties(self, axisDimensionProperties): self.axisDimensionProperties = axisDimensionProperties
    def add_axisDimensionProperties(self, value): self.axisDimensionProperties.append(value)
    def insert_axisDimensionProperties_at(self, index, value): self.axisDimensionProperties.insert(index, value)
    def replace_axisDimensionProperties_at(self, index, value): self.axisDimensionProperties[index] = value
    def get_cellGeometry(self): return self.cellGeometry
    def set_cellGeometry(self, cellGeometry): self.cellGeometry = cellGeometry
    def get_transformationParameterAvailability(self): return self.transformationParameterAvailability
    def set_transformationParameterAvailability(self, transformationParameterAvailability): self.transformationParameterAvailability = transformationParameterAvailability
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.numberOfDimensions is not None or
            self.axisDimensionProperties or
            self.cellGeometry is not None or
            self.transformationParameterAvailability is not None or
            super(MD_GridSpatialRepresentation_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_GridSpatialRepresentation_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GridSpatialRepresentation_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_GridSpatialRepresentation_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_GridSpatialRepresentation_Type'):
        super(MD_GridSpatialRepresentation_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_GridSpatialRepresentation_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_GridSpatialRepresentation_Type', fromsubclass_=False, pretty_print=True):
        super(MD_GridSpatialRepresentation_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.numberOfDimensions is not None:
            self.numberOfDimensions.export(outfile, level, namespace_, name_='numberOfDimensions', pretty_print=pretty_print)
        for axisDimensionProperties_ in self.axisDimensionProperties:
            axisDimensionProperties_.export(outfile, level, namespace_, name_='axisDimensionProperties', pretty_print=pretty_print)
        if self.cellGeometry is not None:
            self.cellGeometry.export(outfile, level, namespace_, name_='cellGeometry', pretty_print=pretty_print)
        if self.transformationParameterAvailability is not None:
            self.transformationParameterAvailability.export(outfile, level, namespace_, name_='transformationParameterAvailability', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_GridSpatialRepresentation_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_GridSpatialRepresentation_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_GridSpatialRepresentation_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.numberOfDimensions is not None:
            showIndent(outfile, level)
            outfile.write('numberOfDimensions=model_.Integer_PropertyType(\n')
            self.numberOfDimensions.exportLiteral(outfile, level, name_='numberOfDimensions')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('axisDimensionProperties=[\n')
        level += 1
        for axisDimensionProperties_ in self.axisDimensionProperties:
            showIndent(outfile, level)
            outfile.write('model_.MD_Dimension_PropertyType(\n')
            axisDimensionProperties_.exportLiteral(outfile, level, name_='MD_Dimension_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.cellGeometry is not None:
            showIndent(outfile, level)
            outfile.write('cellGeometry=model_.MD_CellGeometryCode_PropertyType(\n')
            self.cellGeometry.exportLiteral(outfile, level, name_='cellGeometry')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.transformationParameterAvailability is not None:
            showIndent(outfile, level)
            outfile.write('transformationParameterAvailability=model_.Boolean_PropertyType(\n')
            self.transformationParameterAvailability.exportLiteral(outfile, level, name_='transformationParameterAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(MD_GridSpatialRepresentation_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'numberOfDimensions':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.numberOfDimensions = obj_
            obj_.original_tagname_ = 'numberOfDimensions'
        elif nodeName_ == 'axisDimensionProperties':
            obj_ = MD_Dimension_PropertyType.factory()
            obj_.build(child_)
            self.axisDimensionProperties.append(obj_)
            obj_.original_tagname_ = 'axisDimensionProperties'
        elif nodeName_ == 'cellGeometry':
            obj_ = MD_CellGeometryCode_PropertyType.factory()
            obj_.build(child_)
            self.cellGeometry = obj_
            obj_.original_tagname_ = 'cellGeometry'
        elif nodeName_ == 'transformationParameterAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.transformationParameterAvailability = obj_
            obj_.original_tagname_ = 'transformationParameterAvailability'
        super(MD_GridSpatialRepresentation_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_GridSpatialRepresentation_Type


class MD_Metadata_Type(AbstractObject_Type):
    """Information about the metadata"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, fileIdentifier=None, language=None, characterSet=None, parentIdentifier=None, hierarchyLevel=None, hierarchyLevelName=None, contact=None, dateStamp=None, metadataStandardName=None, metadataStandardVersion=None, dataSetURI=None, locale=None, spatialRepresentationInfo=None, referenceSystemInfo=None, metadataExtensionInfo=None, identificationInfo=None, contentInfo=None, distributionInfo=None, dataQualityInfo=None, portrayalCatalogueInfo=None, metadataConstraints=None, applicationSchemaInfo=None, metadataMaintenance=None, series=None, describes=None, propertyType=None, featureType=None, featureAttribute=None):
        self.original_tagname_ = None
        super(MD_Metadata_Type, self).__init__(id, uuid, )
        self.fileIdentifier = fileIdentifier
        self.language = language
        self.characterSet = characterSet
        self.parentIdentifier = parentIdentifier
        if hierarchyLevel is None:
            self.hierarchyLevel = []
        else:
            self.hierarchyLevel = hierarchyLevel
        if hierarchyLevelName is None:
            self.hierarchyLevelName = []
        else:
            self.hierarchyLevelName = hierarchyLevelName
        if contact is None:
            self.contact = []
        else:
            self.contact = contact
        self.dateStamp = dateStamp
        self.metadataStandardName = metadataStandardName
        self.metadataStandardVersion = metadataStandardVersion
        self.dataSetURI = dataSetURI
        if locale is None:
            self.locale = []
        else:
            self.locale = locale
        if spatialRepresentationInfo is None:
            self.spatialRepresentationInfo = []
        else:
            self.spatialRepresentationInfo = spatialRepresentationInfo
        if referenceSystemInfo is None:
            self.referenceSystemInfo = []
        else:
            self.referenceSystemInfo = referenceSystemInfo
        if metadataExtensionInfo is None:
            self.metadataExtensionInfo = []
        else:
            self.metadataExtensionInfo = metadataExtensionInfo
        if identificationInfo is None:
            self.identificationInfo = []
        else:
            self.identificationInfo = identificationInfo
        if contentInfo is None:
            self.contentInfo = []
        else:
            self.contentInfo = contentInfo
        self.distributionInfo = distributionInfo
        if dataQualityInfo is None:
            self.dataQualityInfo = []
        else:
            self.dataQualityInfo = dataQualityInfo
        if portrayalCatalogueInfo is None:
            self.portrayalCatalogueInfo = []
        else:
            self.portrayalCatalogueInfo = portrayalCatalogueInfo
        if metadataConstraints is None:
            self.metadataConstraints = []
        else:
            self.metadataConstraints = metadataConstraints
        if applicationSchemaInfo is None:
            self.applicationSchemaInfo = []
        else:
            self.applicationSchemaInfo = applicationSchemaInfo
        self.metadataMaintenance = metadataMaintenance
        if series is None:
            self.series = []
        else:
            self.series = series
        if describes is None:
            self.describes = []
        else:
            self.describes = describes
        if propertyType is None:
            self.propertyType = []
        else:
            self.propertyType = propertyType
        if featureType is None:
            self.featureType = []
        else:
            self.featureType = featureType
        if featureAttribute is None:
            self.featureAttribute = []
        else:
            self.featureAttribute = featureAttribute
    def factory(*args_, **kwargs_):
        if MD_Metadata_Type.subclass:
            return MD_Metadata_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Metadata_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_fileIdentifier(self): return self.fileIdentifier
    def set_fileIdentifier(self, fileIdentifier): self.fileIdentifier = fileIdentifier
    def get_language(self): return self.language
    def set_language(self, language): self.language = language
    def get_characterSet(self): return self.characterSet
    def set_characterSet(self, characterSet): self.characterSet = characterSet
    def get_parentIdentifier(self): return self.parentIdentifier
    def set_parentIdentifier(self, parentIdentifier): self.parentIdentifier = parentIdentifier
    def get_hierarchyLevel(self): return self.hierarchyLevel
    def set_hierarchyLevel(self, hierarchyLevel): self.hierarchyLevel = hierarchyLevel
    def add_hierarchyLevel(self, value): self.hierarchyLevel.append(value)
    def insert_hierarchyLevel_at(self, index, value): self.hierarchyLevel.insert(index, value)
    def replace_hierarchyLevel_at(self, index, value): self.hierarchyLevel[index] = value
    def get_hierarchyLevelName(self): return self.hierarchyLevelName
    def set_hierarchyLevelName(self, hierarchyLevelName): self.hierarchyLevelName = hierarchyLevelName
    def add_hierarchyLevelName(self, value): self.hierarchyLevelName.append(value)
    def insert_hierarchyLevelName_at(self, index, value): self.hierarchyLevelName.insert(index, value)
    def replace_hierarchyLevelName_at(self, index, value): self.hierarchyLevelName[index] = value
    def get_contact(self): return self.contact
    def set_contact(self, contact): self.contact = contact
    def add_contact(self, value): self.contact.append(value)
    def insert_contact_at(self, index, value): self.contact.insert(index, value)
    def replace_contact_at(self, index, value): self.contact[index] = value
    def get_dateStamp(self): return self.dateStamp
    def set_dateStamp(self, dateStamp): self.dateStamp = dateStamp
    def get_metadataStandardName(self): return self.metadataStandardName
    def set_metadataStandardName(self, metadataStandardName): self.metadataStandardName = metadataStandardName
    def get_metadataStandardVersion(self): return self.metadataStandardVersion
    def set_metadataStandardVersion(self, metadataStandardVersion): self.metadataStandardVersion = metadataStandardVersion
    def get_dataSetURI(self): return self.dataSetURI
    def set_dataSetURI(self, dataSetURI): self.dataSetURI = dataSetURI
    def get_locale(self): return self.locale
    def set_locale(self, locale): self.locale = locale
    def add_locale(self, value): self.locale.append(value)
    def insert_locale_at(self, index, value): self.locale.insert(index, value)
    def replace_locale_at(self, index, value): self.locale[index] = value
    def get_spatialRepresentationInfo(self): return self.spatialRepresentationInfo
    def set_spatialRepresentationInfo(self, spatialRepresentationInfo): self.spatialRepresentationInfo = spatialRepresentationInfo
    def add_spatialRepresentationInfo(self, value): self.spatialRepresentationInfo.append(value)
    def insert_spatialRepresentationInfo_at(self, index, value): self.spatialRepresentationInfo.insert(index, value)
    def replace_spatialRepresentationInfo_at(self, index, value): self.spatialRepresentationInfo[index] = value
    def get_referenceSystemInfo(self): return self.referenceSystemInfo
    def set_referenceSystemInfo(self, referenceSystemInfo): self.referenceSystemInfo = referenceSystemInfo
    def add_referenceSystemInfo(self, value): self.referenceSystemInfo.append(value)
    def insert_referenceSystemInfo_at(self, index, value): self.referenceSystemInfo.insert(index, value)
    def replace_referenceSystemInfo_at(self, index, value): self.referenceSystemInfo[index] = value
    def get_metadataExtensionInfo(self): return self.metadataExtensionInfo
    def set_metadataExtensionInfo(self, metadataExtensionInfo): self.metadataExtensionInfo = metadataExtensionInfo
    def add_metadataExtensionInfo(self, value): self.metadataExtensionInfo.append(value)
    def insert_metadataExtensionInfo_at(self, index, value): self.metadataExtensionInfo.insert(index, value)
    def replace_metadataExtensionInfo_at(self, index, value): self.metadataExtensionInfo[index] = value
    def get_identificationInfo(self): return self.identificationInfo
    def set_identificationInfo(self, identificationInfo): self.identificationInfo = identificationInfo
    def add_identificationInfo(self, value): self.identificationInfo.append(value)
    def insert_identificationInfo_at(self, index, value): self.identificationInfo.insert(index, value)
    def replace_identificationInfo_at(self, index, value): self.identificationInfo[index] = value
    def get_contentInfo(self): return self.contentInfo
    def set_contentInfo(self, contentInfo): self.contentInfo = contentInfo
    def add_contentInfo(self, value): self.contentInfo.append(value)
    def insert_contentInfo_at(self, index, value): self.contentInfo.insert(index, value)
    def replace_contentInfo_at(self, index, value): self.contentInfo[index] = value
    def get_distributionInfo(self): return self.distributionInfo
    def set_distributionInfo(self, distributionInfo): self.distributionInfo = distributionInfo
    def get_dataQualityInfo(self): return self.dataQualityInfo
    def set_dataQualityInfo(self, dataQualityInfo): self.dataQualityInfo = dataQualityInfo
    def add_dataQualityInfo(self, value): self.dataQualityInfo.append(value)
    def insert_dataQualityInfo_at(self, index, value): self.dataQualityInfo.insert(index, value)
    def replace_dataQualityInfo_at(self, index, value): self.dataQualityInfo[index] = value
    def get_portrayalCatalogueInfo(self): return self.portrayalCatalogueInfo
    def set_portrayalCatalogueInfo(self, portrayalCatalogueInfo): self.portrayalCatalogueInfo = portrayalCatalogueInfo
    def add_portrayalCatalogueInfo(self, value): self.portrayalCatalogueInfo.append(value)
    def insert_portrayalCatalogueInfo_at(self, index, value): self.portrayalCatalogueInfo.insert(index, value)
    def replace_portrayalCatalogueInfo_at(self, index, value): self.portrayalCatalogueInfo[index] = value
    def get_metadataConstraints(self): return self.metadataConstraints
    def set_metadataConstraints(self, metadataConstraints): self.metadataConstraints = metadataConstraints
    def add_metadataConstraints(self, value): self.metadataConstraints.append(value)
    def insert_metadataConstraints_at(self, index, value): self.metadataConstraints.insert(index, value)
    def replace_metadataConstraints_at(self, index, value): self.metadataConstraints[index] = value
    def get_applicationSchemaInfo(self): return self.applicationSchemaInfo
    def set_applicationSchemaInfo(self, applicationSchemaInfo): self.applicationSchemaInfo = applicationSchemaInfo
    def add_applicationSchemaInfo(self, value): self.applicationSchemaInfo.append(value)
    def insert_applicationSchemaInfo_at(self, index, value): self.applicationSchemaInfo.insert(index, value)
    def replace_applicationSchemaInfo_at(self, index, value): self.applicationSchemaInfo[index] = value
    def get_metadataMaintenance(self): return self.metadataMaintenance
    def set_metadataMaintenance(self, metadataMaintenance): self.metadataMaintenance = metadataMaintenance
    def get_series(self): return self.series
    def set_series(self, series): self.series = series
    def add_series(self, value): self.series.append(value)
    def insert_series_at(self, index, value): self.series.insert(index, value)
    def replace_series_at(self, index, value): self.series[index] = value
    def get_describes(self): return self.describes
    def set_describes(self, describes): self.describes = describes
    def add_describes(self, value): self.describes.append(value)
    def insert_describes_at(self, index, value): self.describes.insert(index, value)
    def replace_describes_at(self, index, value): self.describes[index] = value
    def get_propertyType(self): return self.propertyType
    def set_propertyType(self, propertyType): self.propertyType = propertyType
    def add_propertyType(self, value): self.propertyType.append(value)
    def insert_propertyType_at(self, index, value): self.propertyType.insert(index, value)
    def replace_propertyType_at(self, index, value): self.propertyType[index] = value
    def get_featureType(self): return self.featureType
    def set_featureType(self, featureType): self.featureType = featureType
    def add_featureType(self, value): self.featureType.append(value)
    def insert_featureType_at(self, index, value): self.featureType.insert(index, value)
    def replace_featureType_at(self, index, value): self.featureType[index] = value
    def get_featureAttribute(self): return self.featureAttribute
    def set_featureAttribute(self, featureAttribute): self.featureAttribute = featureAttribute
    def add_featureAttribute(self, value): self.featureAttribute.append(value)
    def insert_featureAttribute_at(self, index, value): self.featureAttribute.insert(index, value)
    def replace_featureAttribute_at(self, index, value): self.featureAttribute[index] = value
    def hasContent_(self):
        if (
            self.fileIdentifier is not None or
            self.language is not None or
            self.characterSet is not None or
            self.parentIdentifier is not None or
            self.hierarchyLevel or
            self.hierarchyLevelName or
            self.contact or
            self.dateStamp is not None or
            self.metadataStandardName is not None or
            self.metadataStandardVersion is not None or
            self.dataSetURI is not None or
            self.locale or
            self.spatialRepresentationInfo or
            self.referenceSystemInfo or
            self.metadataExtensionInfo or
            self.identificationInfo or
            self.contentInfo or
            self.distributionInfo is not None or
            self.dataQualityInfo or
            self.portrayalCatalogueInfo or
            self.metadataConstraints or
            self.applicationSchemaInfo or
            self.metadataMaintenance is not None or
            self.series or
            self.describes or
            self.propertyType or
            self.featureType or
            self.featureAttribute or
            super(MD_Metadata_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Metadata_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Metadata_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Metadata_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Metadata_Type'):
        super(MD_Metadata_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Metadata_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Metadata_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Metadata_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.fileIdentifier is not None:
            self.fileIdentifier.export(outfile, level, namespace_, name_='fileIdentifier', pretty_print=pretty_print)
        if self.language is not None:
            self.language.export(outfile, level, namespace_, name_='language', pretty_print=pretty_print)
        if self.characterSet is not None:
            self.characterSet.export(outfile, level, namespace_, name_='characterSet', pretty_print=pretty_print)
        if self.parentIdentifier is not None:
            self.parentIdentifier.export(outfile, level, namespace_, name_='parentIdentifier', pretty_print=pretty_print)
        for hierarchyLevel_ in self.hierarchyLevel:
            hierarchyLevel_.export(outfile, level, namespace_, name_='hierarchyLevel', pretty_print=pretty_print)
        for hierarchyLevelName_ in self.hierarchyLevelName:
            hierarchyLevelName_.export(outfile, level, namespace_, name_='hierarchyLevelName', pretty_print=pretty_print)
        for contact_ in self.contact:
            contact_.export(outfile, level, namespace_, name_='contact', pretty_print=pretty_print)
        if self.dateStamp is not None:
            self.dateStamp.export(outfile, level, namespace_, name_='dateStamp', pretty_print=pretty_print)
        if self.metadataStandardName is not None:
            self.metadataStandardName.export(outfile, level, namespace_, name_='metadataStandardName', pretty_print=pretty_print)
        if self.metadataStandardVersion is not None:
            self.metadataStandardVersion.export(outfile, level, namespace_, name_='metadataStandardVersion', pretty_print=pretty_print)
        if self.dataSetURI is not None:
            self.dataSetURI.export(outfile, level, namespace_, name_='dataSetURI', pretty_print=pretty_print)
        for locale_ in self.locale:
            locale_.export(outfile, level, namespace_, name_='locale', pretty_print=pretty_print)
        for spatialRepresentationInfo_ in self.spatialRepresentationInfo:
            spatialRepresentationInfo_.export(outfile, level, namespace_, name_='spatialRepresentationInfo', pretty_print=pretty_print)
        for referenceSystemInfo_ in self.referenceSystemInfo:
            referenceSystemInfo_.export(outfile, level, namespace_, name_='referenceSystemInfo', pretty_print=pretty_print)
        for metadataExtensionInfo_ in self.metadataExtensionInfo:
            metadataExtensionInfo_.export(outfile, level, namespace_, name_='metadataExtensionInfo', pretty_print=pretty_print)
        for identificationInfo_ in self.identificationInfo:
            identificationInfo_.export(outfile, level, namespace_, name_='identificationInfo', pretty_print=pretty_print)
        for contentInfo_ in self.contentInfo:
            contentInfo_.export(outfile, level, namespace_, name_='contentInfo', pretty_print=pretty_print)
        if self.distributionInfo is not None:
            self.distributionInfo.export(outfile, level, namespace_, name_='distributionInfo', pretty_print=pretty_print)
        for dataQualityInfo_ in self.dataQualityInfo:
            dataQualityInfo_.export(outfile, level, namespace_, name_='dataQualityInfo', pretty_print=pretty_print)
        for portrayalCatalogueInfo_ in self.portrayalCatalogueInfo:
            portrayalCatalogueInfo_.export(outfile, level, namespace_, name_='portrayalCatalogueInfo', pretty_print=pretty_print)
        for metadataConstraints_ in self.metadataConstraints:
            metadataConstraints_.export(outfile, level, namespace_, name_='metadataConstraints', pretty_print=pretty_print)
        for applicationSchemaInfo_ in self.applicationSchemaInfo:
            applicationSchemaInfo_.export(outfile, level, namespace_, name_='applicationSchemaInfo', pretty_print=pretty_print)
        if self.metadataMaintenance is not None:
            self.metadataMaintenance.export(outfile, level, namespace_, name_='metadataMaintenance', pretty_print=pretty_print)
        for series_ in self.series:
            series_.export(outfile, level, namespace_, name_='series', pretty_print=pretty_print)
        for describes_ in self.describes:
            describes_.export(outfile, level, namespace_, name_='describes', pretty_print=pretty_print)
        for propertyType_ in self.propertyType:
            propertyType_.export(outfile, level, namespace_, name_='propertyType', pretty_print=pretty_print)
        for featureType_ in self.featureType:
            featureType_.export(outfile, level, namespace_, name_='featureType', pretty_print=pretty_print)
        for featureAttribute_ in self.featureAttribute:
            featureAttribute_.export(outfile, level, namespace_, name_='featureAttribute', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Metadata_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Metadata_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Metadata_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.fileIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('fileIdentifier=model_.CharacterString_PropertyType(\n')
            self.fileIdentifier.exportLiteral(outfile, level, name_='fileIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.language is not None:
            showIndent(outfile, level)
            outfile.write('language=model_.CharacterString_PropertyType(\n')
            self.language.exportLiteral(outfile, level, name_='language')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.characterSet is not None:
            showIndent(outfile, level)
            outfile.write('characterSet=model_.MD_CharacterSetCode_PropertyType(\n')
            self.characterSet.exportLiteral(outfile, level, name_='characterSet')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.parentIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('parentIdentifier=model_.CharacterString_PropertyType(\n')
            self.parentIdentifier.exportLiteral(outfile, level, name_='parentIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('hierarchyLevel=[\n')
        level += 1
        for hierarchyLevel_ in self.hierarchyLevel:
            showIndent(outfile, level)
            outfile.write('model_.MD_ScopeCode_PropertyType(\n')
            hierarchyLevel_.exportLiteral(outfile, level, name_='MD_ScopeCode_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('hierarchyLevelName=[\n')
        level += 1
        for hierarchyLevelName_ in self.hierarchyLevelName:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            hierarchyLevelName_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('contact=[\n')
        level += 1
        for contact_ in self.contact:
            showIndent(outfile, level)
            outfile.write('model_.CI_ResponsibleParty_PropertyType(\n')
            contact_.exportLiteral(outfile, level, name_='CI_ResponsibleParty_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.dateStamp is not None:
            showIndent(outfile, level)
            outfile.write('dateStamp=model_.Date_PropertyType(\n')
            self.dateStamp.exportLiteral(outfile, level, name_='dateStamp')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.metadataStandardName is not None:
            showIndent(outfile, level)
            outfile.write('metadataStandardName=model_.CharacterString_PropertyType(\n')
            self.metadataStandardName.exportLiteral(outfile, level, name_='metadataStandardName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.metadataStandardVersion is not None:
            showIndent(outfile, level)
            outfile.write('metadataStandardVersion=model_.CharacterString_PropertyType(\n')
            self.metadataStandardVersion.exportLiteral(outfile, level, name_='metadataStandardVersion')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dataSetURI is not None:
            showIndent(outfile, level)
            outfile.write('dataSetURI=model_.CharacterString_PropertyType(\n')
            self.dataSetURI.exportLiteral(outfile, level, name_='dataSetURI')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('locale=[\n')
        level += 1
        for locale_ in self.locale:
            showIndent(outfile, level)
            outfile.write('model_.PT_Locale_PropertyType(\n')
            locale_.exportLiteral(outfile, level, name_='PT_Locale_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('spatialRepresentationInfo=[\n')
        level += 1
        for spatialRepresentationInfo_ in self.spatialRepresentationInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_SpatialRepresentation_PropertyType(\n')
            spatialRepresentationInfo_.exportLiteral(outfile, level, name_='MD_SpatialRepresentation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('referenceSystemInfo=[\n')
        level += 1
        for referenceSystemInfo_ in self.referenceSystemInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_ReferenceSystem_PropertyType(\n')
            referenceSystemInfo_.exportLiteral(outfile, level, name_='MD_ReferenceSystem_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('metadataExtensionInfo=[\n')
        level += 1
        for metadataExtensionInfo_ in self.metadataExtensionInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_MetadataExtensionInformation_PropertyType(\n')
            metadataExtensionInfo_.exportLiteral(outfile, level, name_='MD_MetadataExtensionInformation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('identificationInfo=[\n')
        level += 1
        for identificationInfo_ in self.identificationInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_Identification_PropertyType(\n')
            identificationInfo_.exportLiteral(outfile, level, name_='MD_Identification_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('contentInfo=[\n')
        level += 1
        for contentInfo_ in self.contentInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_ContentInformation_PropertyType(\n')
            contentInfo_.exportLiteral(outfile, level, name_='MD_ContentInformation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.distributionInfo is not None:
            showIndent(outfile, level)
            outfile.write('distributionInfo=model_.MD_Distribution_PropertyType(\n')
            self.distributionInfo.exportLiteral(outfile, level, name_='distributionInfo')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('dataQualityInfo=[\n')
        level += 1
        for dataQualityInfo_ in self.dataQualityInfo:
            showIndent(outfile, level)
            outfile.write('model_.DQ_DataQuality_PropertyType(\n')
            dataQualityInfo_.exportLiteral(outfile, level, name_='DQ_DataQuality_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('portrayalCatalogueInfo=[\n')
        level += 1
        for portrayalCatalogueInfo_ in self.portrayalCatalogueInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_PortrayalCatalogueReference_PropertyType(\n')
            portrayalCatalogueInfo_.exportLiteral(outfile, level, name_='MD_PortrayalCatalogueReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('metadataConstraints=[\n')
        level += 1
        for metadataConstraints_ in self.metadataConstraints:
            showIndent(outfile, level)
            outfile.write('model_.MD_Constraints_PropertyType(\n')
            metadataConstraints_.exportLiteral(outfile, level, name_='MD_Constraints_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('applicationSchemaInfo=[\n')
        level += 1
        for applicationSchemaInfo_ in self.applicationSchemaInfo:
            showIndent(outfile, level)
            outfile.write('model_.MD_ApplicationSchemaInformation_PropertyType(\n')
            applicationSchemaInfo_.exportLiteral(outfile, level, name_='MD_ApplicationSchemaInformation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.metadataMaintenance is not None:
            showIndent(outfile, level)
            outfile.write('metadataMaintenance=model_.MD_MaintenanceInformation_PropertyType(\n')
            self.metadataMaintenance.exportLiteral(outfile, level, name_='metadataMaintenance')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('series=[\n')
        level += 1
        for series_ in self.series:
            showIndent(outfile, level)
            outfile.write('model_.DS_Aggregate_PropertyType(\n')
            series_.exportLiteral(outfile, level, name_='DS_Aggregate_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('describes=[\n')
        level += 1
        for describes_ in self.describes:
            showIndent(outfile, level)
            outfile.write('model_.DS_DataSet_PropertyType(\n')
            describes_.exportLiteral(outfile, level, name_='DS_DataSet_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('propertyType=[\n')
        level += 1
        for propertyType_ in self.propertyType:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            propertyType_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('featureType=[\n')
        level += 1
        for featureType_ in self.featureType:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            featureType_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('featureAttribute=[\n')
        level += 1
        for featureAttribute_ in self.featureAttribute:
            showIndent(outfile, level)
            outfile.write('model_.ObjectReference_PropertyType(\n')
            featureAttribute_.exportLiteral(outfile, level, name_='ObjectReference_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Metadata_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'fileIdentifier':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.fileIdentifier = obj_
            obj_.original_tagname_ = 'fileIdentifier'
        elif nodeName_ == 'language':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.language = obj_
            obj_.original_tagname_ = 'language'
        elif nodeName_ == 'characterSet':
            obj_ = MD_CharacterSetCode_PropertyType.factory()
            obj_.build(child_)
            self.characterSet = obj_
            obj_.original_tagname_ = 'characterSet'
        elif nodeName_ == 'parentIdentifier':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.parentIdentifier = obj_
            obj_.original_tagname_ = 'parentIdentifier'
        elif nodeName_ == 'hierarchyLevel':
            obj_ = MD_ScopeCode_PropertyType.factory()
            obj_.build(child_)
            self.hierarchyLevel.append(obj_)
            obj_.original_tagname_ = 'hierarchyLevel'
        elif nodeName_ == 'hierarchyLevelName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.hierarchyLevelName.append(obj_)
            obj_.original_tagname_ = 'hierarchyLevelName'
        elif nodeName_ == 'contact':
            obj_ = CI_ResponsibleParty_PropertyType.factory()
            obj_.build(child_)
            self.contact.append(obj_)
            obj_.original_tagname_ = 'contact'
        elif nodeName_ == 'dateStamp':
            obj_ = Date_PropertyType.factory()
            obj_.build(child_)
            self.dateStamp = obj_
            obj_.original_tagname_ = 'dateStamp'
        elif nodeName_ == 'metadataStandardName':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.metadataStandardName = obj_
            obj_.original_tagname_ = 'metadataStandardName'
        elif nodeName_ == 'metadataStandardVersion':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.metadataStandardVersion = obj_
            obj_.original_tagname_ = 'metadataStandardVersion'
        elif nodeName_ == 'dataSetURI':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.dataSetURI = obj_
            obj_.original_tagname_ = 'dataSetURI'
        elif nodeName_ == 'locale':
            obj_ = PT_Locale_PropertyType.factory()
            obj_.build(child_)
            self.locale.append(obj_)
            obj_.original_tagname_ = 'locale'
        elif nodeName_ == 'spatialRepresentationInfo':
            obj_ = MD_SpatialRepresentation_PropertyType.factory()
            obj_.build(child_)
            self.spatialRepresentationInfo.append(obj_)
            obj_.original_tagname_ = 'spatialRepresentationInfo'
        elif nodeName_ == 'referenceSystemInfo':
            obj_ = MD_ReferenceSystem_PropertyType.factory()
            obj_.build(child_)
            self.referenceSystemInfo.append(obj_)
            obj_.original_tagname_ = 'referenceSystemInfo'
        elif nodeName_ == 'metadataExtensionInfo':
            obj_ = MD_MetadataExtensionInformation_PropertyType.factory()
            obj_.build(child_)
            self.metadataExtensionInfo.append(obj_)
            obj_.original_tagname_ = 'metadataExtensionInfo'
        elif nodeName_ == 'identificationInfo':
            obj_ = MD_Identification_PropertyType.factory()
            obj_.build(child_)
            self.identificationInfo.append(obj_)
            obj_.original_tagname_ = 'identificationInfo'
        elif nodeName_ == 'contentInfo':
            obj_ = MD_ContentInformation_PropertyType.factory()
            obj_.build(child_)
            self.contentInfo.append(obj_)
            obj_.original_tagname_ = 'contentInfo'
        elif nodeName_ == 'distributionInfo':
            obj_ = MD_Distribution_PropertyType.factory()
            obj_.build(child_)
            self.distributionInfo = obj_
            obj_.original_tagname_ = 'distributionInfo'
        elif nodeName_ == 'dataQualityInfo':
            obj_ = DQ_DataQuality_PropertyType.factory()
            obj_.build(child_)
            self.dataQualityInfo.append(obj_)
            obj_.original_tagname_ = 'dataQualityInfo'
        elif nodeName_ == 'portrayalCatalogueInfo':
            obj_ = MD_PortrayalCatalogueReference_PropertyType.factory()
            obj_.build(child_)
            self.portrayalCatalogueInfo.append(obj_)
            obj_.original_tagname_ = 'portrayalCatalogueInfo'
        elif nodeName_ == 'metadataConstraints':
            obj_ = MD_Constraints_PropertyType.factory()
            obj_.build(child_)
            self.metadataConstraints.append(obj_)
            obj_.original_tagname_ = 'metadataConstraints'
        elif nodeName_ == 'applicationSchemaInfo':
            obj_ = MD_ApplicationSchemaInformation_PropertyType.factory()
            obj_.build(child_)
            self.applicationSchemaInfo.append(obj_)
            obj_.original_tagname_ = 'applicationSchemaInfo'
        elif nodeName_ == 'metadataMaintenance':
            obj_ = MD_MaintenanceInformation_PropertyType.factory()
            obj_.build(child_)
            self.metadataMaintenance = obj_
            obj_.original_tagname_ = 'metadataMaintenance'
        elif nodeName_ == 'series':
            obj_ = DS_Aggregate_PropertyType.factory()
            obj_.build(child_)
            self.series.append(obj_)
            obj_.original_tagname_ = 'series'
        elif nodeName_ == 'describes':
            obj_ = DS_DataSet_PropertyType.factory()
            obj_.build(child_)
            self.describes.append(obj_)
            obj_.original_tagname_ = 'describes'
        elif nodeName_ == 'propertyType':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.propertyType.append(obj_)
            obj_.original_tagname_ = 'propertyType'
        elif nodeName_ == 'featureType':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.featureType.append(obj_)
            obj_.original_tagname_ = 'featureType'
        elif nodeName_ == 'featureAttribute':
            class_obj_ = self.get_class_obj_(child_, ObjectReference_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.featureAttribute.append(obj_)
            obj_.original_tagname_ = 'featureAttribute'
        super(MD_Metadata_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Metadata_Type


class DS_DataSet_Type(AbstractObject_Type):
    """Identifiable collection of data"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, has=None, partOf=None):
        self.original_tagname_ = None
        super(DS_DataSet_Type, self).__init__(id, uuid, )
        if has is None:
            self.has = []
        else:
            self.has = has
        if partOf is None:
            self.partOf = []
        else:
            self.partOf = partOf
    def factory(*args_, **kwargs_):
        if DS_DataSet_Type.subclass:
            return DS_DataSet_Type.subclass(*args_, **kwargs_)
        else:
            return DS_DataSet_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_has(self): return self.has
    def set_has(self, has): self.has = has
    def add_has(self, value): self.has.append(value)
    def insert_has_at(self, index, value): self.has.insert(index, value)
    def replace_has_at(self, index, value): self.has[index] = value
    def get_partOf(self): return self.partOf
    def set_partOf(self, partOf): self.partOf = partOf
    def add_partOf(self, value): self.partOf.append(value)
    def insert_partOf_at(self, index, value): self.partOf.insert(index, value)
    def replace_partOf_at(self, index, value): self.partOf[index] = value
    def hasContent_(self):
        if (
            self.has or
            self.partOf or
            super(DS_DataSet_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_DataSet_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_DataSet_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_DataSet_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_DataSet_Type'):
        super(DS_DataSet_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_DataSet_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_DataSet_Type', fromsubclass_=False, pretty_print=True):
        super(DS_DataSet_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for has_ in self.has:
            has_.export(outfile, level, namespace_, name_='has', pretty_print=pretty_print)
        for partOf_ in self.partOf:
            partOf_.export(outfile, level, namespace_, name_='partOf', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_DataSet_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_DataSet_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_DataSet_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('has=[\n')
        level += 1
        for has_ in self.has:
            showIndent(outfile, level)
            outfile.write('model_.MD_Metadata_PropertyType(\n')
            has_.exportLiteral(outfile, level, name_='MD_Metadata_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('partOf=[\n')
        level += 1
        for partOf_ in self.partOf:
            showIndent(outfile, level)
            outfile.write('model_.DS_Aggregate_PropertyType(\n')
            partOf_.exportLiteral(outfile, level, name_='DS_Aggregate_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_DataSet_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'has':
            obj_ = MD_Metadata_PropertyType.factory()
            obj_.build(child_)
            self.has.append(obj_)
            obj_.original_tagname_ = 'has'
        elif nodeName_ == 'partOf':
            obj_ = DS_Aggregate_PropertyType.factory()
            obj_.build(child_)
            self.partOf.append(obj_)
            obj_.original_tagname_ = 'partOf'
        super(DS_DataSet_Type, self).buildChildren(child_, node, nodeName_, True)
# end class DS_DataSet_Type


class AbstractDS_Aggregate_Type(AbstractObject_Type):
    """Identifiable collection of datasets"""
    subclass = None
    superclass = AbstractObject_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractDS_Aggregate_Type, self).__init__(id, uuid, extensiontype_, )
        if composedOf is None:
            self.composedOf = []
        else:
            self.composedOf = composedOf
        if seriesMetadata is None:
            self.seriesMetadata = []
        else:
            self.seriesMetadata = seriesMetadata
        if subset is None:
            self.subset = []
        else:
            self.subset = subset
        if superset is None:
            self.superset = []
        else:
            self.superset = superset
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractDS_Aggregate_Type.subclass:
            return AbstractDS_Aggregate_Type.subclass(*args_, **kwargs_)
        else:
            return AbstractDS_Aggregate_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_composedOf(self): return self.composedOf
    def set_composedOf(self, composedOf): self.composedOf = composedOf
    def add_composedOf(self, value): self.composedOf.append(value)
    def insert_composedOf_at(self, index, value): self.composedOf.insert(index, value)
    def replace_composedOf_at(self, index, value): self.composedOf[index] = value
    def get_seriesMetadata(self): return self.seriesMetadata
    def set_seriesMetadata(self, seriesMetadata): self.seriesMetadata = seriesMetadata
    def add_seriesMetadata(self, value): self.seriesMetadata.append(value)
    def insert_seriesMetadata_at(self, index, value): self.seriesMetadata.insert(index, value)
    def replace_seriesMetadata_at(self, index, value): self.seriesMetadata[index] = value
    def get_subset(self): return self.subset
    def set_subset(self, subset): self.subset = subset
    def add_subset(self, value): self.subset.append(value)
    def insert_subset_at(self, index, value): self.subset.insert(index, value)
    def replace_subset_at(self, index, value): self.subset[index] = value
    def get_superset(self): return self.superset
    def set_superset(self, superset): self.superset = superset
    def add_superset(self, value): self.superset.append(value)
    def insert_superset_at(self, index, value): self.superset.insert(index, value)
    def replace_superset_at(self, index, value): self.superset[index] = value
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.composedOf or
            self.seriesMetadata or
            self.subset or
            self.superset or
            super(AbstractDS_Aggregate_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractDS_Aggregate_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDS_Aggregate_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractDS_Aggregate_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractDS_Aggregate_Type'):
        super(AbstractDS_Aggregate_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractDS_Aggregate_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractDS_Aggregate_Type', fromsubclass_=False, pretty_print=True):
        super(AbstractDS_Aggregate_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for composedOf_ in self.composedOf:
            composedOf_.export(outfile, level, namespace_, name_='composedOf', pretty_print=pretty_print)
        for seriesMetadata_ in self.seriesMetadata:
            seriesMetadata_.export(outfile, level, namespace_, name_='seriesMetadata', pretty_print=pretty_print)
        for subset_ in self.subset:
            subset_.export(outfile, level, namespace_, name_='subset', pretty_print=pretty_print)
        for superset_ in self.superset:
            superset_.export(outfile, level, namespace_, name_='superset', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractDS_Aggregate_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractDS_Aggregate_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractDS_Aggregate_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('composedOf=[\n')
        level += 1
        for composedOf_ in self.composedOf:
            showIndent(outfile, level)
            outfile.write('model_.DS_DataSet_PropertyType(\n')
            composedOf_.exportLiteral(outfile, level, name_='DS_DataSet_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('seriesMetadata=[\n')
        level += 1
        for seriesMetadata_ in self.seriesMetadata:
            showIndent(outfile, level)
            outfile.write('model_.MD_Metadata_PropertyType(\n')
            seriesMetadata_.exportLiteral(outfile, level, name_='MD_Metadata_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('subset=[\n')
        level += 1
        for subset_ in self.subset:
            showIndent(outfile, level)
            outfile.write('model_.DS_Aggregate_PropertyType(\n')
            subset_.exportLiteral(outfile, level, name_='DS_Aggregate_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('superset=[\n')
        level += 1
        for superset_ in self.superset:
            showIndent(outfile, level)
            outfile.write('model_.DS_Aggregate_PropertyType(\n')
            superset_.exportLiteral(outfile, level, name_='DS_Aggregate_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractDS_Aggregate_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'composedOf':
            obj_ = DS_DataSet_PropertyType.factory()
            obj_.build(child_)
            self.composedOf.append(obj_)
            obj_.original_tagname_ = 'composedOf'
        elif nodeName_ == 'seriesMetadata':
            obj_ = MD_Metadata_PropertyType.factory()
            obj_.build(child_)
            self.seriesMetadata.append(obj_)
            obj_.original_tagname_ = 'seriesMetadata'
        elif nodeName_ == 'subset':
            obj_ = DS_Aggregate_PropertyType.factory()
            obj_.build(child_)
            self.subset.append(obj_)
            obj_.original_tagname_ = 'subset'
        elif nodeName_ == 'superset':
            obj_ = DS_Aggregate_PropertyType.factory()
            obj_.build(child_)
            self.superset.append(obj_)
            obj_.original_tagname_ = 'superset'
        super(AbstractDS_Aggregate_Type, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractDS_Aggregate_Type


class AbstractCoordinateSystemType(IdentifiedObjectType):
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractCoordinateSystemType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.aggregationType = _cast(None, aggregationType)
        if axis is None:
            self.axis = []
        else:
            self.axis = axis
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractCoordinateSystemType.subclass:
            return AbstractCoordinateSystemType.subclass(*args_, **kwargs_)
        else:
            return AbstractCoordinateSystemType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_axis(self): return self.axis
    def set_axis(self, axis): self.axis = axis
    def add_axis(self, value): self.axis.append(value)
    def insert_axis_at(self, index, value): self.axis.insert(index, value)
    def replace_axis_at(self, index, value): self.axis[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.axis or
            super(AbstractCoordinateSystemType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractCoordinateSystemType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCoordinateSystemType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractCoordinateSystemType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractCoordinateSystemType'):
        super(AbstractCoordinateSystemType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCoordinateSystemType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractCoordinateSystemType', fromsubclass_=False, pretty_print=True):
        super(AbstractCoordinateSystemType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for axis_ in self.axis:
            axis_.export(outfile, level, namespace_='gml:', name_='axis', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractCoordinateSystemType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(AbstractCoordinateSystemType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractCoordinateSystemType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('axis=[\n')
        level += 1
        for axis_ in self.axis:
            showIndent(outfile, level)
            outfile.write('model_.axis(\n')
            axis_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractCoordinateSystemType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'axis':
            obj_ = CoordinateSystemAxisPropertyType.factory()
            obj_.build(child_)
            self.axis.append(obj_)
            obj_.original_tagname_ = 'axis'
        elif nodeName_ == 'usesAxis':
            obj_ = CoordinateSystemAxisPropertyType.factory()
            obj_.build(child_)
            self.axis.append(obj_)
            obj_.original_tagname_ = 'usesAxis'
        super(AbstractCoordinateSystemType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractCoordinateSystemType


class CoordinateSystemAxisType(IdentifiedObjectType):
    """The uom attribute provides an identifier of the unit of measure used
    for this coordinate system axis. The value of this coordinate in
    a coordinate tuple shall be recorded using this unit of measure,
    whenever those coordinates use a coordinate reference system
    that uses a coordinate system that uses this axis."""
    subclass = None
    superclass = IdentifiedObjectType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, uom=None, axisAbbrev=None, axisDirection=None, minimumValue=None, maximumValue=None, rangeMeaning=None):
        self.original_tagname_ = None
        super(CoordinateSystemAxisType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, )
        self.uom = _cast(None, uom)
        self.axisAbbrev = axisAbbrev
        self.axisDirection = axisDirection
        self.minimumValue = minimumValue
        self.maximumValue = maximumValue
        self.rangeMeaning = rangeMeaning
    def factory(*args_, **kwargs_):
        if CoordinateSystemAxisType.subclass:
            return CoordinateSystemAxisType.subclass(*args_, **kwargs_)
        else:
            return CoordinateSystemAxisType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_axisAbbrev(self): return self.axisAbbrev
    def set_axisAbbrev(self, axisAbbrev): self.axisAbbrev = axisAbbrev
    def get_axisDirection(self): return self.axisDirection
    def set_axisDirection(self, axisDirection): self.axisDirection = axisDirection
    def get_minimumValue(self): return self.minimumValue
    def set_minimumValue(self, minimumValue): self.minimumValue = minimumValue
    def get_maximumValue(self): return self.maximumValue
    def set_maximumValue(self, maximumValue): self.maximumValue = maximumValue
    def get_rangeMeaning(self): return self.rangeMeaning
    def set_rangeMeaning(self, rangeMeaning): self.rangeMeaning = rangeMeaning
    def get_uom(self): return self.uom
    def set_uom(self, uom): self.uom = uom
    def hasContent_(self):
        if (
            self.axisAbbrev is not None or
            self.axisDirection is not None or
            self.minimumValue is not None or
            self.maximumValue is not None or
            self.rangeMeaning is not None or
            super(CoordinateSystemAxisType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CoordinateSystemAxisType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CoordinateSystemAxisType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CoordinateSystemAxisType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CoordinateSystemAxisType'):
        super(CoordinateSystemAxisType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CoordinateSystemAxisType')
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            outfile.write(' uom=%s' % (quote_attrib(self.uom), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CoordinateSystemAxisType', fromsubclass_=False, pretty_print=True):
        super(CoordinateSystemAxisType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.axisAbbrev is not None:
            self.axisAbbrev.export(outfile, level, namespace_='gml:', name_='axisAbbrev', pretty_print=pretty_print)
        if self.axisDirection is not None:
            self.axisDirection.export(outfile, level, namespace_='gml:', name_='axisDirection', pretty_print=pretty_print)
        if self.minimumValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sminimumValue>%s</%sminimumValue>%s' % (namespace_, self.gds_format_double(self.minimumValue, input_name='minimumValue'), namespace_, eol_))
        if self.maximumValue is not None:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smaximumValue>%s</%smaximumValue>%s' % (namespace_, self.gds_format_double(self.maximumValue, input_name='maximumValue'), namespace_, eol_))
        if self.rangeMeaning is not None:
            self.rangeMeaning.export(outfile, level, namespace_='gml:', name_='rangeMeaning', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CoordinateSystemAxisType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.uom is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            showIndent(outfile, level)
            outfile.write('uom=%s,\n' % (self.uom,))
        super(CoordinateSystemAxisType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CoordinateSystemAxisType, self).exportLiteralChildren(outfile, level, name_)
        if self.axisAbbrev is not None:
            showIndent(outfile, level)
            outfile.write('axisAbbrev=model_.axisAbbrev(\n')
            self.axisAbbrev.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.axisDirection is not None:
            showIndent(outfile, level)
            outfile.write('axisDirection=model_.axisDirection(\n')
            self.axisDirection.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.minimumValue is not None:
            showIndent(outfile, level)
            outfile.write('minimumValue=%e,\n' % self.minimumValue)
        if self.maximumValue is not None:
            showIndent(outfile, level)
            outfile.write('maximumValue=%e,\n' % self.maximumValue)
        if self.rangeMeaning is not None:
            showIndent(outfile, level)
            outfile.write('rangeMeaning=model_.rangeMeaning(\n')
            self.rangeMeaning.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('uom', node)
        if value is not None and 'uom' not in already_processed:
            already_processed.add('uom')
            self.uom = value
        super(CoordinateSystemAxisType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'axisAbbrev':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.axisAbbrev = obj_
            obj_.original_tagname_ = 'axisAbbrev'
        elif nodeName_ == 'axisDirection':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.axisDirection = obj_
            obj_.original_tagname_ = 'axisDirection'
        elif nodeName_ == 'minimumValue':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'minimumValue')
            self.minimumValue = fval_
        elif nodeName_ == 'maximumValue':
            sval_ = child_.text
            try:
                fval_ = float(sval_)
            except (TypeError, ValueError) as exp:
                raise_parse_error(child_, 'requires float or double: %s' % exp)
            fval_ = self.gds_validate_float(fval_, node, 'maximumValue')
            self.maximumValue = fval_
        elif nodeName_ == 'rangeMeaning':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.rangeMeaning = obj_
            obj_.original_tagname_ = 'rangeMeaning'
        super(CoordinateSystemAxisType, self).buildChildren(child_, node, nodeName_, True)
# end class CoordinateSystemAxisType


class TemporalCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, timeCS=None, usesTemporalCS=None, temporalDatum=None):
        self.original_tagname_ = None
        super(TemporalCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.timeCS = timeCS
        self.usesTemporalCS = usesTemporalCS
        self.temporalDatum = temporalDatum
    def factory(*args_, **kwargs_):
        if TemporalCRSType.subclass:
            return TemporalCRSType.subclass(*args_, **kwargs_)
        else:
            return TemporalCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_timeCS(self): return self.timeCS
    def set_timeCS(self, timeCS): self.timeCS = timeCS
    def get_usesTemporalCS(self): return self.usesTemporalCS
    def set_usesTemporalCS(self, usesTemporalCS): self.usesTemporalCS = usesTemporalCS
    def get_temporalDatum(self): return self.temporalDatum
    def set_temporalDatum(self, temporalDatum): self.temporalDatum = temporalDatum
    def hasContent_(self):
        if (
            self.timeCS is not None or
            self.usesTemporalCS is not None or
            self.temporalDatum is not None or
            super(TemporalCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalCRSType'):
        super(TemporalCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalCRSType', fromsubclass_=False, pretty_print=True):
        super(TemporalCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.timeCS is not None:
            self.timeCS.export(outfile, level, namespace_='gml:', name_='timeCS', pretty_print=pretty_print)
        if self.usesTemporalCS is not None:
            self.usesTemporalCS.export(outfile, level, namespace_='gml:', name_='usesTemporalCS', pretty_print=pretty_print)
        if self.temporalDatum is not None:
            self.temporalDatum.export(outfile, level, namespace_='gml:', name_='temporalDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TemporalCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TemporalCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.timeCS is not None:
            showIndent(outfile, level)
            outfile.write('timeCS=model_.timeCS(\n')
            self.timeCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.usesTemporalCS is not None:
            showIndent(outfile, level)
            outfile.write('usesTemporalCS=model_.usesTemporalCS(\n')
            self.usesTemporalCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.temporalDatum is not None:
            showIndent(outfile, level)
            outfile.write('temporalDatum=model_.temporalDatum(\n')
            self.temporalDatum.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TemporalCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'timeCS':
            obj_ = TimeCSPropertyType.factory()
            obj_.build(child_)
            self.timeCS = obj_
            obj_.original_tagname_ = 'timeCS'
        elif nodeName_ == 'usesTimeCS':
            obj_ = TimeCSPropertyType.factory()
            obj_.build(child_)
            self.usesTimeCS = obj_
            obj_.original_tagname_ = 'usesTimeCS'
        elif nodeName_ == 'usesTemporalCS':
            obj_ = TemporalCSPropertyType.factory()
            obj_.build(child_)
            self.usesTemporalCS = obj_
            obj_.original_tagname_ = 'usesTemporalCS'
        elif nodeName_ == 'temporalDatum':
            obj_ = TemporalDatumPropertyType.factory()
            obj_.build(child_)
            self.temporalDatum = obj_
            obj_.original_tagname_ = 'temporalDatum'
        elif nodeName_ == 'usesTemporalDatum':
            obj_ = TemporalDatumPropertyType.factory()
            obj_.build(child_)
            self.usesTemporalDatum = obj_
            obj_.original_tagname_ = 'usesTemporalDatum'
        super(TemporalCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class TemporalCRSType


class ImageCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, cartesianCS=None, affineCS=None, usesObliqueCartesianCS=None, imageDatum=None):
        self.original_tagname_ = None
        super(ImageCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.cartesianCS = cartesianCS
        self.affineCS = affineCS
        self.usesObliqueCartesianCS = usesObliqueCartesianCS
        self.imageDatum = imageDatum
    def factory(*args_, **kwargs_):
        if ImageCRSType.subclass:
            return ImageCRSType.subclass(*args_, **kwargs_)
        else:
            return ImageCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_cartesianCS(self): return self.cartesianCS
    def set_cartesianCS(self, cartesianCS): self.cartesianCS = cartesianCS
    def get_affineCS(self): return self.affineCS
    def set_affineCS(self, affineCS): self.affineCS = affineCS
    def get_usesObliqueCartesianCS(self): return self.usesObliqueCartesianCS
    def set_usesObliqueCartesianCS(self, usesObliqueCartesianCS): self.usesObliqueCartesianCS = usesObliqueCartesianCS
    def get_imageDatum(self): return self.imageDatum
    def set_imageDatum(self, imageDatum): self.imageDatum = imageDatum
    def hasContent_(self):
        if (
            self.cartesianCS is not None or
            self.affineCS is not None or
            self.usesObliqueCartesianCS is not None or
            self.imageDatum is not None or
            super(ImageCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ImageCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ImageCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ImageCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ImageCRSType'):
        super(ImageCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ImageCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ImageCRSType', fromsubclass_=False, pretty_print=True):
        super(ImageCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.cartesianCS is not None:
            self.cartesianCS.export(outfile, level, namespace_='gml:', name_='cartesianCS', pretty_print=pretty_print)
        if self.affineCS is not None:
            self.affineCS.export(outfile, level, namespace_='gml:', name_='affineCS', pretty_print=pretty_print)
        if self.usesObliqueCartesianCS is not None:
            self.usesObliqueCartesianCS.export(outfile, level, namespace_='gml:', name_='usesObliqueCartesianCS', pretty_print=pretty_print)
        if self.imageDatum is not None:
            self.imageDatum.export(outfile, level, namespace_='gml:', name_='imageDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ImageCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ImageCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ImageCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.cartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('cartesianCS=model_.CartesianCSPropertyType(\n')
            self.cartesianCS.exportLiteral(outfile, level, name_='cartesianCS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.affineCS is not None:
            showIndent(outfile, level)
            outfile.write('affineCS=model_.affineCS(\n')
            self.affineCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.usesObliqueCartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('usesObliqueCartesianCS=model_.usesObliqueCartesianCS(\n')
            self.usesObliqueCartesianCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.imageDatum is not None:
            showIndent(outfile, level)
            outfile.write('imageDatum=model_.imageDatum(\n')
            self.imageDatum.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ImageCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'cartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.cartesianCS = obj_
            obj_.original_tagname_ = 'cartesianCS'
        elif nodeName_ == 'usesCartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.usesCartesianCS = obj_
            obj_.original_tagname_ = 'usesCartesianCS'
        elif nodeName_ == 'affineCS':
            obj_ = AffineCSPropertyType.factory()
            obj_.build(child_)
            self.affineCS = obj_
            obj_.original_tagname_ = 'affineCS'
        elif nodeName_ == 'usesAffineCS':
            obj_ = AffineCSPropertyType.factory()
            obj_.build(child_)
            self.usesAffineCS = obj_
            obj_.original_tagname_ = 'usesAffineCS'
        elif nodeName_ == 'usesObliqueCartesianCS':
            obj_ = ObliqueCartesianCSPropertyType.factory()
            obj_.build(child_)
            self.usesObliqueCartesianCS = obj_
            obj_.original_tagname_ = 'usesObliqueCartesianCS'
        elif nodeName_ == 'imageDatum':
            obj_ = ImageDatumPropertyType.factory()
            obj_.build(child_)
            self.imageDatum = obj_
            obj_.original_tagname_ = 'imageDatum'
        elif nodeName_ == 'usesImageDatum':
            obj_ = ImageDatumPropertyType.factory()
            obj_.build(child_)
            self.usesImageDatum = obj_
            obj_.original_tagname_ = 'usesImageDatum'
        super(ImageCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class ImageCRSType


class EngineeringCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, affineCS=None, cartesianCS=None, cylindricalCS=None, linearCS=None, polarCS=None, sphericalCS=None, userDefinedCS=None, coordinateSystem=None, engineeringDatum=None):
        self.original_tagname_ = None
        super(EngineeringCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.affineCS = affineCS
        self.cartesianCS = cartesianCS
        self.cylindricalCS = cylindricalCS
        self.linearCS = linearCS
        self.polarCS = polarCS
        self.sphericalCS = sphericalCS
        self.userDefinedCS = userDefinedCS
        self.coordinateSystem = coordinateSystem
        self.engineeringDatum = engineeringDatum
    def factory(*args_, **kwargs_):
        if EngineeringCRSType.subclass:
            return EngineeringCRSType.subclass(*args_, **kwargs_)
        else:
            return EngineeringCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_affineCS(self): return self.affineCS
    def set_affineCS(self, affineCS): self.affineCS = affineCS
    def get_cartesianCS(self): return self.cartesianCS
    def set_cartesianCS(self, cartesianCS): self.cartesianCS = cartesianCS
    def get_cylindricalCS(self): return self.cylindricalCS
    def set_cylindricalCS(self, cylindricalCS): self.cylindricalCS = cylindricalCS
    def get_linearCS(self): return self.linearCS
    def set_linearCS(self, linearCS): self.linearCS = linearCS
    def get_polarCS(self): return self.polarCS
    def set_polarCS(self, polarCS): self.polarCS = polarCS
    def get_sphericalCS(self): return self.sphericalCS
    def set_sphericalCS(self, sphericalCS): self.sphericalCS = sphericalCS
    def get_userDefinedCS(self): return self.userDefinedCS
    def set_userDefinedCS(self, userDefinedCS): self.userDefinedCS = userDefinedCS
    def get_coordinateSystem(self): return self.coordinateSystem
    def set_coordinateSystem(self, coordinateSystem): self.coordinateSystem = coordinateSystem
    def get_engineeringDatum(self): return self.engineeringDatum
    def set_engineeringDatum(self, engineeringDatum): self.engineeringDatum = engineeringDatum
    def hasContent_(self):
        if (
            self.affineCS is not None or
            self.cartesianCS is not None or
            self.cylindricalCS is not None or
            self.linearCS is not None or
            self.polarCS is not None or
            self.sphericalCS is not None or
            self.userDefinedCS is not None or
            self.coordinateSystem is not None or
            self.engineeringDatum is not None or
            super(EngineeringCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EngineeringCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EngineeringCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EngineeringCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EngineeringCRSType'):
        super(EngineeringCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EngineeringCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EngineeringCRSType', fromsubclass_=False, pretty_print=True):
        super(EngineeringCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.affineCS is not None:
            self.affineCS.export(outfile, level, namespace_='gml:', name_='affineCS', pretty_print=pretty_print)
        if self.cartesianCS is not None:
            self.cartesianCS.export(outfile, level, namespace_='gml:', name_='cartesianCS', pretty_print=pretty_print)
        if self.cylindricalCS is not None:
            self.cylindricalCS.export(outfile, level, namespace_='gml:', name_='cylindricalCS', pretty_print=pretty_print)
        if self.linearCS is not None:
            self.linearCS.export(outfile, level, namespace_='gml:', name_='linearCS', pretty_print=pretty_print)
        if self.polarCS is not None:
            self.polarCS.export(outfile, level, namespace_='gml:', name_='polarCS', pretty_print=pretty_print)
        if self.sphericalCS is not None:
            self.sphericalCS.export(outfile, level, namespace_='gml:', name_='sphericalCS', pretty_print=pretty_print)
        if self.userDefinedCS is not None:
            self.userDefinedCS.export(outfile, level, namespace_='gml:', name_='userDefinedCS', pretty_print=pretty_print)
        if self.coordinateSystem is not None:
            self.coordinateSystem.export(outfile, level, namespace_='gml:', name_='coordinateSystem', pretty_print=pretty_print)
        if self.engineeringDatum is not None:
            self.engineeringDatum.export(outfile, level, namespace_='gml:', name_='engineeringDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EngineeringCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EngineeringCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EngineeringCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.affineCS is not None:
            showIndent(outfile, level)
            outfile.write('affineCS=model_.affineCS(\n')
            self.affineCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('cartesianCS=model_.CartesianCSPropertyType(\n')
            self.cartesianCS.exportLiteral(outfile, level, name_='cartesianCS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cylindricalCS is not None:
            showIndent(outfile, level)
            outfile.write('cylindricalCS=model_.cylindricalCS(\n')
            self.cylindricalCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.linearCS is not None:
            showIndent(outfile, level)
            outfile.write('linearCS=model_.linearCS(\n')
            self.linearCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.polarCS is not None:
            showIndent(outfile, level)
            outfile.write('polarCS=model_.polarCS(\n')
            self.polarCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.sphericalCS is not None:
            showIndent(outfile, level)
            outfile.write('sphericalCS=model_.SphericalCSPropertyType(\n')
            self.sphericalCS.exportLiteral(outfile, level, name_='sphericalCS')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.userDefinedCS is not None:
            showIndent(outfile, level)
            outfile.write('userDefinedCS=model_.userDefinedCS(\n')
            self.userDefinedCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinateSystem is not None:
            showIndent(outfile, level)
            outfile.write('coordinateSystem=model_.CoordinateSystemPropertyType(\n')
            self.coordinateSystem.exportLiteral(outfile, level, name_='coordinateSystem')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.engineeringDatum is not None:
            showIndent(outfile, level)
            outfile.write('engineeringDatum=model_.engineeringDatum(\n')
            self.engineeringDatum.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EngineeringCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'affineCS':
            obj_ = AffineCSPropertyType.factory()
            obj_.build(child_)
            self.affineCS = obj_
            obj_.original_tagname_ = 'affineCS'
        elif nodeName_ == 'usesAffineCS':
            obj_ = AffineCSPropertyType.factory()
            obj_.build(child_)
            self.usesAffineCS = obj_
            obj_.original_tagname_ = 'usesAffineCS'
        elif nodeName_ == 'cartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.cartesianCS = obj_
            obj_.original_tagname_ = 'cartesianCS'
        elif nodeName_ == 'usesCartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.usesCartesianCS = obj_
            obj_.original_tagname_ = 'usesCartesianCS'
        elif nodeName_ == 'cylindricalCS':
            obj_ = CylindricalCSPropertyType.factory()
            obj_.build(child_)
            self.cylindricalCS = obj_
            obj_.original_tagname_ = 'cylindricalCS'
        elif nodeName_ == 'linearCS':
            obj_ = LinearCSPropertyType.factory()
            obj_.build(child_)
            self.linearCS = obj_
            obj_.original_tagname_ = 'linearCS'
        elif nodeName_ == 'polarCS':
            obj_ = PolarCSPropertyType.factory()
            obj_.build(child_)
            self.polarCS = obj_
            obj_.original_tagname_ = 'polarCS'
        elif nodeName_ == 'sphericalCS':
            obj_ = SphericalCSPropertyType.factory()
            obj_.build(child_)
            self.sphericalCS = obj_
            obj_.original_tagname_ = 'sphericalCS'
        elif nodeName_ == 'usesSphericalCS':
            obj_ = SphericalCSPropertyType.factory()
            obj_.build(child_)
            self.usesSphericalCS = obj_
            obj_.original_tagname_ = 'usesSphericalCS'
        elif nodeName_ == 'userDefinedCS':
            obj_ = UserDefinedCSPropertyType.factory()
            obj_.build(child_)
            self.userDefinedCS = obj_
            obj_.original_tagname_ = 'userDefinedCS'
        elif nodeName_ == 'coordinateSystem':
            obj_ = CoordinateSystemPropertyType.factory()
            obj_.build(child_)
            self.coordinateSystem = obj_
            obj_.original_tagname_ = 'coordinateSystem'
        elif nodeName_ == 'usesCS':
            obj_ = CoordinateSystemPropertyType.factory()
            obj_.build(child_)
            self.usesCS = obj_
            obj_.original_tagname_ = 'usesCS'
        elif nodeName_ == 'engineeringDatum':
            obj_ = EngineeringDatumPropertyType.factory()
            obj_.build(child_)
            self.engineeringDatum = obj_
            obj_.original_tagname_ = 'engineeringDatum'
        elif nodeName_ == 'usesEngineeringDatum':
            obj_ = EngineeringDatumPropertyType.factory()
            obj_.build(child_)
            self.usesEngineeringDatum = obj_
            obj_.original_tagname_ = 'usesEngineeringDatum'
        super(EngineeringCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class EngineeringCRSType


class VerticalCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, verticalCS=None, verticalDatum=None):
        self.original_tagname_ = None
        super(VerticalCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.verticalCS = verticalCS
        self.verticalDatum = verticalDatum
    def factory(*args_, **kwargs_):
        if VerticalCRSType.subclass:
            return VerticalCRSType.subclass(*args_, **kwargs_)
        else:
            return VerticalCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_verticalCS(self): return self.verticalCS
    def set_verticalCS(self, verticalCS): self.verticalCS = verticalCS
    def get_verticalDatum(self): return self.verticalDatum
    def set_verticalDatum(self, verticalDatum): self.verticalDatum = verticalDatum
    def hasContent_(self):
        if (
            self.verticalCS is not None or
            self.verticalDatum is not None or
            super(VerticalCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VerticalCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VerticalCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VerticalCRSType'):
        super(VerticalCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VerticalCRSType', fromsubclass_=False, pretty_print=True):
        super(VerticalCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.verticalCS is not None:
            self.verticalCS.export(outfile, level, namespace_='gml:', name_='verticalCS', pretty_print=pretty_print)
        if self.verticalDatum is not None:
            self.verticalDatum.export(outfile, level, namespace_='gml:', name_='verticalDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='VerticalCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(VerticalCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(VerticalCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.verticalCS is not None:
            showIndent(outfile, level)
            outfile.write('verticalCS=model_.verticalCS(\n')
            self.verticalCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.verticalDatum is not None:
            showIndent(outfile, level)
            outfile.write('verticalDatum=model_.verticalDatum(\n')
            self.verticalDatum.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(VerticalCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'verticalCS':
            obj_ = VerticalCSPropertyType.factory()
            obj_.build(child_)
            self.verticalCS = obj_
            obj_.original_tagname_ = 'verticalCS'
        elif nodeName_ == 'usesVerticalCS':
            obj_ = VerticalCSPropertyType.factory()
            obj_.build(child_)
            self.usesVerticalCS = obj_
            obj_.original_tagname_ = 'usesVerticalCS'
        elif nodeName_ == 'verticalDatum':
            obj_ = VerticalDatumPropertyType.factory()
            obj_.build(child_)
            self.verticalDatum = obj_
            obj_.original_tagname_ = 'verticalDatum'
        elif nodeName_ == 'usesVerticalDatum':
            obj_ = VerticalDatumPropertyType.factory()
            obj_.build(child_)
            self.usesVerticalDatum = obj_
            obj_.original_tagname_ = 'usesVerticalDatum'
        super(VerticalCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class VerticalCRSType


class GeodeticCRSType(AbstractCRSType):
    """gml:GeodeticCRS is a coordinate reference system based on a geodetic
    datum."""
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, ellipsoidalCS=None, cartesianCS=None, sphericalCS=None, geodeticDatum=None):
        self.original_tagname_ = None
        super(GeodeticCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.ellipsoidalCS = ellipsoidalCS
        self.cartesianCS = cartesianCS
        self.sphericalCS = sphericalCS
        self.geodeticDatum = geodeticDatum
    def factory(*args_, **kwargs_):
        if GeodeticCRSType.subclass:
            return GeodeticCRSType.subclass(*args_, **kwargs_)
        else:
            return GeodeticCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ellipsoidalCS(self): return self.ellipsoidalCS
    def set_ellipsoidalCS(self, ellipsoidalCS): self.ellipsoidalCS = ellipsoidalCS
    def get_cartesianCS(self): return self.cartesianCS
    def set_cartesianCS(self, cartesianCS): self.cartesianCS = cartesianCS
    def get_sphericalCS(self): return self.sphericalCS
    def set_sphericalCS(self, sphericalCS): self.sphericalCS = sphericalCS
    def get_geodeticDatum(self): return self.geodeticDatum
    def set_geodeticDatum(self, geodeticDatum): self.geodeticDatum = geodeticDatum
    def hasContent_(self):
        if (
            self.ellipsoidalCS is not None or
            self.cartesianCS is not None or
            self.sphericalCS is not None or
            self.geodeticDatum is not None or
            super(GeodeticCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeodeticCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeodeticCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeodeticCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeodeticCRSType'):
        super(GeodeticCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeodeticCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeodeticCRSType', fromsubclass_=False, pretty_print=True):
        super(GeodeticCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.ellipsoidalCS is not None:
            self.ellipsoidalCS.export(outfile, level, namespace_='gml:', name_='ellipsoidalCS', pretty_print=pretty_print)
        if self.cartesianCS is not None:
            self.cartesianCS.export(outfile, level, namespace_='gml:', name_='cartesianCS', pretty_print=pretty_print)
        if self.sphericalCS is not None:
            self.sphericalCS.export(outfile, level, namespace_='gml:', name_='sphericalCS', pretty_print=pretty_print)
        if self.geodeticDatum is not None:
            self.geodeticDatum.export(outfile, level, namespace_='gml:', name_='geodeticDatum', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeodeticCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GeodeticCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeodeticCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.ellipsoidalCS is not None:
            showIndent(outfile, level)
            outfile.write('ellipsoidalCS=model_.ellipsoidalCS(\n')
            self.ellipsoidalCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('cartesianCS=model_.cartesianCS(\n')
            self.cartesianCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.sphericalCS is not None:
            showIndent(outfile, level)
            outfile.write('sphericalCS=model_.sphericalCS(\n')
            self.sphericalCS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.geodeticDatum is not None:
            showIndent(outfile, level)
            outfile.write('geodeticDatum=model_.geodeticDatum(\n')
            self.geodeticDatum.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GeodeticCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'ellipsoidalCS':
            obj_ = EllipsoidalCSPropertyType.factory()
            obj_.build(child_)
            self.ellipsoidalCS = obj_
            obj_.original_tagname_ = 'ellipsoidalCS'
        elif nodeName_ == 'usesEllipsoidalCS':
            obj_ = EllipsoidalCSPropertyType.factory()
            obj_.build(child_)
            self.usesEllipsoidalCS = obj_
            obj_.original_tagname_ = 'usesEllipsoidalCS'
        elif nodeName_ == 'cartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.cartesianCS = obj_
            obj_.original_tagname_ = 'cartesianCS'
        elif nodeName_ == 'usesCartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.usesCartesianCS = obj_
            obj_.original_tagname_ = 'usesCartesianCS'
        elif nodeName_ == 'sphericalCS':
            obj_ = SphericalCSPropertyType.factory()
            obj_.build(child_)
            self.sphericalCS = obj_
            obj_.original_tagname_ = 'sphericalCS'
        elif nodeName_ == 'usesSphericalCS':
            obj_ = SphericalCSPropertyType.factory()
            obj_.build(child_)
            self.usesSphericalCS = obj_
            obj_.original_tagname_ = 'usesSphericalCS'
        elif nodeName_ == 'geodeticDatum':
            obj_ = GeodeticDatumPropertyType.factory()
            obj_.build(child_)
            self.geodeticDatum = obj_
            obj_.original_tagname_ = 'geodeticDatum'
        elif nodeName_ == 'usesGeodeticDatum':
            obj_ = GeodeticDatumPropertyType.factory()
            obj_.build(child_)
            self.usesGeodeticDatum = obj_
            obj_.original_tagname_ = 'usesGeodeticDatum'
        super(GeodeticCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class GeodeticCRSType


class CompoundCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, aggregationType=None, componentReferenceSystem=None):
        self.original_tagname_ = None
        super(CompoundCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, )
        self.aggregationType = _cast(None, aggregationType)
        if componentReferenceSystem is None:
            self.componentReferenceSystem = []
        else:
            self.componentReferenceSystem = componentReferenceSystem
    def factory(*args_, **kwargs_):
        if CompoundCRSType.subclass:
            return CompoundCRSType.subclass(*args_, **kwargs_)
        else:
            return CompoundCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_componentReferenceSystem(self): return self.componentReferenceSystem
    def set_componentReferenceSystem(self, componentReferenceSystem): self.componentReferenceSystem = componentReferenceSystem
    def add_componentReferenceSystem(self, value): self.componentReferenceSystem.append(value)
    def insert_componentReferenceSystem_at(self, index, value): self.componentReferenceSystem.insert(index, value)
    def replace_componentReferenceSystem_at(self, index, value): self.componentReferenceSystem[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.componentReferenceSystem or
            super(CompoundCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CompoundCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CompoundCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CompoundCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CompoundCRSType'):
        super(CompoundCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CompoundCRSType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CompoundCRSType', fromsubclass_=False, pretty_print=True):
        super(CompoundCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for componentReferenceSystem_ in self.componentReferenceSystem:
            componentReferenceSystem_.export(outfile, level, namespace_='gml:', name_='componentReferenceSystem', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CompoundCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(CompoundCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CompoundCRSType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('componentReferenceSystem=[\n')
        level += 1
        for componentReferenceSystem_ in self.componentReferenceSystem:
            showIndent(outfile, level)
            outfile.write('model_.componentReferenceSystem(\n')
            componentReferenceSystem_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(CompoundCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'componentReferenceSystem':
            obj_ = SingleCRSPropertyType.factory()
            obj_.build(child_)
            self.componentReferenceSystem.append(obj_)
            obj_.original_tagname_ = 'componentReferenceSystem'
        elif nodeName_ == 'includesSingleCRS':
            obj_ = SingleCRSPropertyType.factory()
            obj_.build(child_)
            self.componentReferenceSystem.append(obj_)
            obj_.original_tagname_ = 'includesSingleCRS'
        super(CompoundCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class CompoundCRSType


class AbstractGeneralDerivedCRSType(AbstractCRSType):
    subclass = None
    superclass = AbstractCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, conversion=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractGeneralDerivedCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, extensiontype_, )
        self.conversion = conversion
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeneralDerivedCRSType.subclass:
            return AbstractGeneralDerivedCRSType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeneralDerivedCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_conversion(self): return self.conversion
    def set_conversion(self, conversion): self.conversion = conversion
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.conversion is not None or
            super(AbstractGeneralDerivedCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeneralDerivedCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralDerivedCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeneralDerivedCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeneralDerivedCRSType'):
        super(AbstractGeneralDerivedCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeneralDerivedCRSType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeneralDerivedCRSType', fromsubclass_=False, pretty_print=True):
        super(AbstractGeneralDerivedCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.conversion is not None:
            self.conversion.export(outfile, level, namespace_='gml:', name_='conversion', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeneralDerivedCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractGeneralDerivedCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractGeneralDerivedCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.conversion is not None:
            showIndent(outfile, level)
            outfile.write('conversion=model_.conversion(\n')
            self.conversion.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractGeneralDerivedCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'conversion':
            obj_ = GeneralConversionPropertyType.factory()
            obj_.build(child_)
            self.conversion = obj_
            obj_.original_tagname_ = 'conversion'
        elif nodeName_ == 'definedByConversion':
            obj_ = GeneralConversionPropertyType.factory()
            obj_.build(child_)
            self.definedByConversion = obj_
            obj_.original_tagname_ = 'definedByConversion'
        super(AbstractGeneralDerivedCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractGeneralDerivedCRSType


class AbstractCoverageType(AbstractFeatureType):
    """The base type for coverages is gml:AbstractCoverageType. The basic
    elements of a coverage can be seen in this content model: the
    coverage contains gml:domainSet and gml:rangeSet properties. The
    gml:domainSet property describes the domain of the coverage and
    the gml:rangeSet property describes the range of the coverage."""
    subclass = None
    superclass = AbstractFeatureType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, domainSet=None, rangeSet=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractCoverageType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, extensiontype_, )
        self.domainSet = domainSet
        self.rangeSet = rangeSet
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractCoverageType.subclass:
            return AbstractCoverageType.subclass(*args_, **kwargs_)
        else:
            return AbstractCoverageType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_domainSet(self): return self.domainSet
    def set_domainSet(self, domainSet): self.domainSet = domainSet
    def get_rangeSet(self): return self.rangeSet
    def set_rangeSet(self, rangeSet): self.rangeSet = rangeSet
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.domainSet is not None or
            self.rangeSet is not None or
            super(AbstractCoverageType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractCoverageType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCoverageType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractCoverageType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractCoverageType'):
        super(AbstractCoverageType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCoverageType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractCoverageType', fromsubclass_=False, pretty_print=True):
        super(AbstractCoverageType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.domainSet is not None:
            self.domainSet.export(outfile, level, namespace_='gml:', name_='domainSet', pretty_print=pretty_print)
        if self.rangeSet is not None:
            self.rangeSet.export(outfile, level, namespace_='gml:', name_='rangeSet', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractCoverageType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractCoverageType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractCoverageType, self).exportLiteralChildren(outfile, level, name_)
        if self.domainSet is not None:
            showIndent(outfile, level)
            outfile.write('domainSet=model_.domainSet(\n')
            self.domainSet.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.rangeSet is not None:
            showIndent(outfile, level)
            outfile.write('rangeSet=model_.rangeSet(\n')
            self.rangeSet.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractCoverageType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'domainSet':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.domainSet = obj_
            obj_.original_tagname_ = 'domainSet'
        elif nodeName_ == 'multiPointDomain':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.multiPointDomain = obj_
            obj_.original_tagname_ = 'multiPointDomain'
        elif nodeName_ == 'multiCurveDomain':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.multiCurveDomain = obj_
            obj_.original_tagname_ = 'multiCurveDomain'
        elif nodeName_ == 'multiSurfaceDomain':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.multiSurfaceDomain = obj_
            obj_.original_tagname_ = 'multiSurfaceDomain'
        elif nodeName_ == 'multiSolidDomain':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.multiSolidDomain = obj_
            obj_.original_tagname_ = 'multiSolidDomain'
        elif nodeName_ == 'gridDomain':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.gridDomain = obj_
            obj_.original_tagname_ = 'gridDomain'
        elif nodeName_ == 'rectifiedGridDomain':
            obj_ = DomainSetType.factory()
            obj_.build(child_)
            self.rectifiedGridDomain = obj_
            obj_.original_tagname_ = 'rectifiedGridDomain'
        elif nodeName_ == 'rangeSet':
            obj_ = RangeSetType.factory()
            obj_.build(child_)
            self.rangeSet = obj_
            obj_.original_tagname_ = 'rangeSet'
        super(AbstractCoverageType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractCoverageType


class DictionaryEntryType(AbstractMemberType):
    subclass = None
    superclass = AbstractMemberType
    def __init__(self, owns=False, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, Definition=None):
        self.original_tagname_ = None
        super(DictionaryEntryType, self).__init__(owns, )
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        self.Definition = Definition
    def factory(*args_, **kwargs_):
        if DictionaryEntryType.subclass:
            return DictionaryEntryType.subclass(*args_, **kwargs_)
        else:
            return DictionaryEntryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_Definition(self): return self.Definition
    def set_Definition(self, Definition): self.Definition = Definition
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.Definition is not None or
            super(DictionaryEntryType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DictionaryEntryType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DictionaryEntryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DictionaryEntryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DictionaryEntryType'):
        super(DictionaryEntryType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DictionaryEntryType')
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DictionaryEntryType', fromsubclass_=False, pretty_print=True):
        super(DictionaryEntryType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.Definition is not None:
            self.Definition.export(outfile, level, namespace_='gml:', name_='Definition', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DictionaryEntryType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
        super(DictionaryEntryType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DictionaryEntryType, self).exportLiteralChildren(outfile, level, name_)
        if self.Definition is not None:
            showIndent(outfile, level)
            outfile.write('Definition=model_.DefinitionType(\n')
            self.Definition.exportLiteral(outfile, level, name_='Definition')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        super(DictionaryEntryType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Definition':
            class_obj_ = self.get_class_obj_(child_, DefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.Definition = obj_
            obj_.original_tagname_ = 'Definition'
        elif nodeName_ == 'UnitDefinition':
            class_obj_ = self.get_class_obj_(child_, UnitDefinitionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.UnitDefinition = obj_
            obj_.original_tagname_ = 'UnitDefinition'
        elif nodeName_ == 'Dictionary':
            obj_ = DictionaryType.factory()
            obj_.build(child_)
            self.Dictionary = obj_
            obj_.original_tagname_ = 'Dictionary'
        elif nodeName_ == 'CoordinateSystemAxis':
            obj_ = CoordinateSystemAxisType.factory()
            obj_.build(child_)
            self.CoordinateSystemAxis = obj_
            obj_.original_tagname_ = 'CoordinateSystemAxis'
        elif nodeName_ == 'AbstractCoordinateSystem':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoordinateSystem> element')
            self.AbstractCoordinateSystem = obj_
            obj_.original_tagname_ = 'AbstractCoordinateSystem'
        elif nodeName_ == 'AbstractCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCRS> element')
            self.AbstractCRS = obj_
            obj_.original_tagname_ = 'AbstractCRS'
        elif nodeName_ == 'AbstractDatum':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractDatum> element')
            self.AbstractDatum = obj_
            obj_.original_tagname_ = 'AbstractDatum'
        elif nodeName_ == 'Ellipsoid':
            obj_ = EllipsoidType.factory()
            obj_.build(child_)
            self.Ellipsoid = obj_
            obj_.original_tagname_ = 'Ellipsoid'
        elif nodeName_ == 'PrimeMeridian':
            obj_ = PrimeMeridianType.factory()
            obj_.build(child_)
            self.PrimeMeridian = obj_
            obj_.original_tagname_ = 'PrimeMeridian'
        elif nodeName_ == 'AbstractCoordinateOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractCoordinateOperation> element')
            self.AbstractCoordinateOperation = obj_
            obj_.original_tagname_ = 'AbstractCoordinateOperation'
        elif nodeName_ == 'OperationMethod':
            obj_ = OperationMethodType.factory()
            obj_.build(child_)
            self.OperationMethod = obj_
            obj_.original_tagname_ = 'OperationMethod'
        elif nodeName_ == 'AbstractGeneralOperationParameter':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralOperationParameter> element')
            self.AbstractGeneralOperationParameter = obj_
            obj_.original_tagname_ = 'AbstractGeneralOperationParameter'
        elif nodeName_ == 'TimeReferenceSystem':
            class_obj_ = self.get_class_obj_(child_, TimeReferenceSystemType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.TimeReferenceSystem = obj_
            obj_.original_tagname_ = 'TimeReferenceSystem'
        elif nodeName_ == 'DefinitionCollection':
            obj_ = DictionaryType.factory()
            obj_.build(child_)
            self.DefinitionCollection = obj_
            obj_.original_tagname_ = 'DefinitionCollection'
        elif nodeName_ == 'DefinitionProxy':
            obj_ = DefinitionProxyType.factory()
            obj_.build(child_)
            self.DefinitionProxy = obj_
            obj_.original_tagname_ = 'DefinitionProxy'
        elif nodeName_ == 'BaseUnit':
            obj_ = BaseUnitType.factory()
            obj_.build(child_)
            self.BaseUnit = obj_
            obj_.original_tagname_ = 'BaseUnit'
        elif nodeName_ == 'DerivedUnit':
            obj_ = DerivedUnitType.factory()
            obj_.build(child_)
            self.DerivedUnit = obj_
            obj_.original_tagname_ = 'DerivedUnit'
        elif nodeName_ == 'ConventionalUnit':
            obj_ = ConventionalUnitType.factory()
            obj_.build(child_)
            self.ConventionalUnit = obj_
            obj_.original_tagname_ = 'ConventionalUnit'
        elif nodeName_ == 'EllipsoidalCS':
            obj_ = EllipsoidalCSType.factory()
            obj_.build(child_)
            self.EllipsoidalCS = obj_
            obj_.original_tagname_ = 'EllipsoidalCS'
        elif nodeName_ == 'CartesianCS':
            obj_ = CartesianCSType.factory()
            obj_.build(child_)
            self.CartesianCS = obj_
            obj_.original_tagname_ = 'CartesianCS'
        elif nodeName_ == 'VerticalCS':
            obj_ = VerticalCSType.factory()
            obj_.build(child_)
            self.VerticalCS = obj_
            obj_.original_tagname_ = 'VerticalCS'
        elif nodeName_ == 'TimeCS':
            obj_ = TimeCSType.factory()
            obj_.build(child_)
            self.TimeCS = obj_
            obj_.original_tagname_ = 'TimeCS'
        elif nodeName_ == 'LinearCS':
            obj_ = LinearCSType.factory()
            obj_.build(child_)
            self.LinearCS = obj_
            obj_.original_tagname_ = 'LinearCS'
        elif nodeName_ == 'UserDefinedCS':
            obj_ = UserDefinedCSType.factory()
            obj_.build(child_)
            self.UserDefinedCS = obj_
            obj_.original_tagname_ = 'UserDefinedCS'
        elif nodeName_ == 'SphericalCS':
            obj_ = SphericalCSType.factory()
            obj_.build(child_)
            self.SphericalCS = obj_
            obj_.original_tagname_ = 'SphericalCS'
        elif nodeName_ == 'PolarCS':
            obj_ = PolarCSType.factory()
            obj_.build(child_)
            self.PolarCS = obj_
            obj_.original_tagname_ = 'PolarCS'
        elif nodeName_ == 'CylindricalCS':
            obj_ = CylindricalCSType.factory()
            obj_.build(child_)
            self.CylindricalCS = obj_
            obj_.original_tagname_ = 'CylindricalCS'
        elif nodeName_ == 'AffineCS':
            obj_ = AffineCSType.factory()
            obj_.build(child_)
            self.AffineCS = obj_
            obj_.original_tagname_ = 'AffineCS'
        elif nodeName_ == 'TemporalCS':
            obj_ = TemporalCSType.factory()
            obj_.build(child_)
            self.TemporalCS = obj_
            obj_.original_tagname_ = 'TemporalCS'
        elif nodeName_ == 'ObliqueCartesianCS':
            obj_ = ObliqueCartesianCSType.factory()
            obj_.build(child_)
            self.ObliqueCartesianCS = obj_
            obj_.original_tagname_ = 'ObliqueCartesianCS'
        elif nodeName_ == 'AbstractSingleCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleCRS> element')
            self.AbstractSingleCRS = obj_
            obj_.original_tagname_ = 'AbstractSingleCRS'
        elif nodeName_ == 'CompoundCRS':
            obj_ = CompoundCRSType.factory()
            obj_.build(child_)
            self.CompoundCRS = obj_
            obj_.original_tagname_ = 'CompoundCRS'
        elif nodeName_ == 'AbstractGeneralDerivedCRS':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralDerivedCRS> element')
            self.AbstractGeneralDerivedCRS = obj_
            obj_.original_tagname_ = 'AbstractGeneralDerivedCRS'
        elif nodeName_ == 'GeodeticCRS':
            obj_ = GeodeticCRSType.factory()
            obj_.build(child_)
            self.GeodeticCRS = obj_
            obj_.original_tagname_ = 'GeodeticCRS'
        elif nodeName_ == 'VerticalCRS':
            obj_ = VerticalCRSType.factory()
            obj_.build(child_)
            self.VerticalCRS = obj_
            obj_.original_tagname_ = 'VerticalCRS'
        elif nodeName_ == 'EngineeringCRS':
            obj_ = EngineeringCRSType.factory()
            obj_.build(child_)
            self.EngineeringCRS = obj_
            obj_.original_tagname_ = 'EngineeringCRS'
        elif nodeName_ == 'ImageCRS':
            obj_ = ImageCRSType.factory()
            obj_.build(child_)
            self.ImageCRS = obj_
            obj_.original_tagname_ = 'ImageCRS'
        elif nodeName_ == 'TemporalCRS':
            obj_ = TemporalCRSType.factory()
            obj_.build(child_)
            self.TemporalCRS = obj_
            obj_.original_tagname_ = 'TemporalCRS'
        elif nodeName_ == 'GeographicCRS':
            obj_ = GeographicCRSType.factory()
            obj_.build(child_)
            self.GeographicCRS = obj_
            obj_.original_tagname_ = 'GeographicCRS'
        elif nodeName_ == 'GeocentricCRS':
            obj_ = GeocentricCRSType.factory()
            obj_.build(child_)
            self.GeocentricCRS = obj_
            obj_.original_tagname_ = 'GeocentricCRS'
        elif nodeName_ == 'ProjectedCRS':
            obj_ = ProjectedCRSType.factory()
            obj_.build(child_)
            self.ProjectedCRS = obj_
            obj_.original_tagname_ = 'ProjectedCRS'
        elif nodeName_ == 'DerivedCRS':
            obj_ = DerivedCRSType.factory()
            obj_.build(child_)
            self.DerivedCRS = obj_
            obj_.original_tagname_ = 'DerivedCRS'
        elif nodeName_ == 'GeodeticDatum':
            obj_ = GeodeticDatumType.factory()
            obj_.build(child_)
            self.GeodeticDatum = obj_
            obj_.original_tagname_ = 'GeodeticDatum'
        elif nodeName_ == 'EngineeringDatum':
            obj_ = EngineeringDatumType.factory()
            obj_.build(child_)
            self.EngineeringDatum = obj_
            obj_.original_tagname_ = 'EngineeringDatum'
        elif nodeName_ == 'ImageDatum':
            obj_ = ImageDatumType.factory()
            obj_.build(child_)
            self.ImageDatum = obj_
            obj_.original_tagname_ = 'ImageDatum'
        elif nodeName_ == 'VerticalDatum':
            obj_ = VerticalDatumType.factory()
            obj_.build(child_)
            self.VerticalDatum = obj_
            obj_.original_tagname_ = 'VerticalDatum'
        elif nodeName_ == 'TemporalDatum':
            obj_ = TemporalDatumType.factory()
            obj_.build(child_)
            self.TemporalDatum = obj_
            obj_.original_tagname_ = 'TemporalDatum'
        elif nodeName_ == 'AbstractSingleOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractSingleOperation> element')
            self.AbstractSingleOperation = obj_
            obj_.original_tagname_ = 'AbstractSingleOperation'
        elif nodeName_ == 'ConcatenatedOperation':
            obj_ = ConcatenatedOperationType.factory()
            obj_.build(child_)
            self.ConcatenatedOperation = obj_
            obj_.original_tagname_ = 'ConcatenatedOperation'
        elif nodeName_ == 'PassThroughOperation':
            obj_ = PassThroughOperationType.factory()
            obj_.build(child_)
            self.PassThroughOperation = obj_
            obj_.original_tagname_ = 'PassThroughOperation'
        elif nodeName_ == 'AbstractOperation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractOperation> element')
            self.AbstractOperation = obj_
            obj_.original_tagname_ = 'AbstractOperation'
        elif nodeName_ == 'AbstractGeneralConversion':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralConversion> element')
            self.AbstractGeneralConversion = obj_
            obj_.original_tagname_ = 'AbstractGeneralConversion'
        elif nodeName_ == 'AbstractGeneralTransformation':
            type_name_ = child_.attrib.get(
                '{http://www.w3.org/2001/XMLSchema-instance}type')
            if type_name_ is None:
                type_name_ = child_.attrib.get('type')
            if type_name_ is not None:
                type_names_ = type_name_.split(':')
                if len(type_names_) == 1:
                    type_name_ = type_names_[0]
                else:
                    type_name_ = type_names_[1]
                class_ = globals()[type_name_]
                obj_ = class_.factory()
                obj_.build(child_)
            else:
                raise NotImplementedError(
                    'Class not implemented for <AbstractGeneralTransformation> element')
            self.AbstractGeneralTransformation = obj_
            obj_.original_tagname_ = 'AbstractGeneralTransformation'
        elif nodeName_ == 'Conversion':
            obj_ = ConversionType.factory()
            obj_.build(child_)
            self.Conversion = obj_
            obj_.original_tagname_ = 'Conversion'
        elif nodeName_ == 'Transformation':
            obj_ = TransformationType.factory()
            obj_.build(child_)
            self.Transformation = obj_
            obj_.original_tagname_ = 'Transformation'
        elif nodeName_ == 'OperationParameter':
            obj_ = OperationParameterType.factory()
            obj_.build(child_)
            self.OperationParameter = obj_
            obj_.original_tagname_ = 'OperationParameter'
        elif nodeName_ == 'OperationParameterGroup':
            obj_ = OperationParameterGroupType.factory()
            obj_.build(child_)
            self.OperationParameterGroup = obj_
            obj_.original_tagname_ = 'OperationParameterGroup'
        elif nodeName_ == 'TimeCoordinateSystem':
            obj_ = TimeCoordinateSystemType.factory()
            obj_.build(child_)
            self.TimeCoordinateSystem = obj_
            obj_.original_tagname_ = 'TimeCoordinateSystem'
        elif nodeName_ == 'TimeCalendar':
            obj_ = TimeCalendarType.factory()
            obj_.build(child_)
            self.TimeCalendar = obj_
            obj_.original_tagname_ = 'TimeCalendar'
        elif nodeName_ == 'TimeClock':
            obj_ = TimeClockType.factory()
            obj_.build(child_)
            self.TimeClock = obj_
            obj_.original_tagname_ = 'TimeClock'
        elif nodeName_ == 'TimeOrdinalReferenceSystem':
            obj_ = TimeOrdinalReferenceSystemType.factory()
            obj_.build(child_)
            self.TimeOrdinalReferenceSystem = obj_
            obj_.original_tagname_ = 'TimeOrdinalReferenceSystem'
        super(DictionaryEntryType, self).buildChildren(child_, node, nodeName_, True)
# end class DictionaryEntryType


class UnitDefinitionType(DefinitionType):
    subclass = None
    superclass = DefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, quantityType=None, quantityTypeReference=None, catalogSymbol=None, extensiontype_=None):
        self.original_tagname_ = None
        super(UnitDefinitionType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, extensiontype_, )
        self.quantityType = quantityType
        self.quantityTypeReference = quantityTypeReference
        self.catalogSymbol = catalogSymbol
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if UnitDefinitionType.subclass:
            return UnitDefinitionType.subclass(*args_, **kwargs_)
        else:
            return UnitDefinitionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_quantityType(self): return self.quantityType
    def set_quantityType(self, quantityType): self.quantityType = quantityType
    def get_quantityTypeReference(self): return self.quantityTypeReference
    def set_quantityTypeReference(self, quantityTypeReference): self.quantityTypeReference = quantityTypeReference
    def get_catalogSymbol(self): return self.catalogSymbol
    def set_catalogSymbol(self, catalogSymbol): self.catalogSymbol = catalogSymbol
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.quantityType is not None or
            self.quantityTypeReference is not None or
            self.catalogSymbol is not None or
            super(UnitDefinitionType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UnitDefinitionType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UnitDefinitionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UnitDefinitionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UnitDefinitionType'):
        super(UnitDefinitionType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='UnitDefinitionType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UnitDefinitionType', fromsubclass_=False, pretty_print=True):
        super(UnitDefinitionType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.quantityType is not None:
            self.quantityType.export(outfile, level, namespace_='gml:', name_='quantityType', pretty_print=pretty_print)
        if self.quantityTypeReference is not None:
            self.quantityTypeReference.export(outfile, level, namespace_='gml:', name_='quantityTypeReference', pretty_print=pretty_print)
        if self.catalogSymbol is not None:
            self.catalogSymbol.export(outfile, level, namespace_='gml:', name_='catalogSymbol', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UnitDefinitionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(UnitDefinitionType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(UnitDefinitionType, self).exportLiteralChildren(outfile, level, name_)
        if self.quantityType is not None:
            showIndent(outfile, level)
            outfile.write('quantityType=model_.quantityType(\n')
            self.quantityType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.quantityTypeReference is not None:
            showIndent(outfile, level)
            outfile.write('quantityTypeReference=model_.quantityTypeReference(\n')
            self.quantityTypeReference.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.catalogSymbol is not None:
            showIndent(outfile, level)
            outfile.write('catalogSymbol=model_.catalogSymbol(\n')
            self.catalogSymbol.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(UnitDefinitionType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'quantityType':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.quantityType = obj_
            obj_.original_tagname_ = 'quantityType'
        elif nodeName_ == 'quantityTypeReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.quantityTypeReference = obj_
            obj_.original_tagname_ = 'quantityTypeReference'
        elif nodeName_ == 'catalogSymbol':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.catalogSymbol = obj_
            obj_.original_tagname_ = 'catalogSymbol'
        super(UnitDefinitionType, self).buildChildren(child_, node, nodeName_, True)
# end class UnitDefinitionType


class AngleType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(AngleType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if AngleType.subclass:
            return AngleType.subclass(*args_, **kwargs_)
        else:
            return AngleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(AngleType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AngleType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AngleType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AngleType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AngleType'):
        super(AngleType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AngleType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AngleType', fromsubclass_=False, pretty_print=True):
        super(AngleType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='AngleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AngleType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AngleType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(AngleType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AngleType


class SpeedType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(SpeedType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if SpeedType.subclass:
            return SpeedType.subclass(*args_, **kwargs_)
        else:
            return SpeedType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(SpeedType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SpeedType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SpeedType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SpeedType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SpeedType'):
        super(SpeedType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SpeedType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SpeedType', fromsubclass_=False, pretty_print=True):
        super(SpeedType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='SpeedType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(SpeedType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(SpeedType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(SpeedType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class SpeedType


class VolumeType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(VolumeType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if VolumeType.subclass:
            return VolumeType.subclass(*args_, **kwargs_)
        else:
            return VolumeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(VolumeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VolumeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VolumeType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VolumeType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VolumeType'):
        super(VolumeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='VolumeType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VolumeType', fromsubclass_=False, pretty_print=True):
        super(VolumeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='VolumeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(VolumeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(VolumeType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(VolumeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class VolumeType


class AreaType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(AreaType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if AreaType.subclass:
            return AreaType.subclass(*args_, **kwargs_)
        else:
            return AreaType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(AreaType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AreaType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AreaType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AreaType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AreaType'):
        super(AreaType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AreaType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AreaType', fromsubclass_=False, pretty_print=True):
        super(AreaType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='AreaType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AreaType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AreaType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(AreaType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class AreaType


class GridLengthType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(GridLengthType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if GridLengthType.subclass:
            return GridLengthType.subclass(*args_, **kwargs_)
        else:
            return GridLengthType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(GridLengthType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GridLengthType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GridLengthType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GridLengthType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GridLengthType'):
        super(GridLengthType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GridLengthType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GridLengthType', fromsubclass_=False, pretty_print=True):
        super(GridLengthType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='GridLengthType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(GridLengthType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GridLengthType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(GridLengthType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class GridLengthType


class TimeType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(TimeType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if TimeType.subclass:
            return TimeType.subclass(*args_, **kwargs_)
        else:
            return TimeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(TimeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeType'):
        super(TimeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeType', fromsubclass_=False, pretty_print=True):
        super(TimeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='TimeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class TimeType


class ScaleType(MeasureType):
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(ScaleType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if ScaleType.subclass:
            return ScaleType.subclass(*args_, **kwargs_)
        else:
            return ScaleType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(ScaleType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ScaleType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ScaleType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ScaleType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ScaleType'):
        super(ScaleType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ScaleType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ScaleType', fromsubclass_=False, pretty_print=True):
        super(ScaleType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='ScaleType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ScaleType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ScaleType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ScaleType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class ScaleType


class LengthType(MeasureType):
    """This is a prototypical definition for a specific measure type
    defined as a vacuous extension (i.e. aliases) of
    gml:MeasureType. In this case, the content model supports the
    description of a length (or distance) quantity, with its units.
    The unit of measure referenced by uom shall be suitable for a
    length, such as metres or feet."""
    subclass = None
    superclass = MeasureType
    def __init__(self, uom=None, valueOf_=None):
        self.original_tagname_ = None
        super(LengthType, self).__init__(uom, valueOf_, )
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if LengthType.subclass:
            return LengthType.subclass(*args_, **kwargs_)
        else:
            return LengthType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_valueOf_(self): return self.valueOf_
    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
    def hasContent_(self):
        if (
            self.valueOf_ or
            super(LengthType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LengthType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LengthType')
        if self.hasContent_():
            outfile.write('>')
            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LengthType', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LengthType'):
        super(LengthType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LengthType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LengthType', fromsubclass_=False, pretty_print=True):
        super(LengthType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        pass
    def exportLiteral(self, outfile, level, name_='LengthType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LengthType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LengthType, self).exportLiteralChildren(outfile, level, name_)
        pass
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        self.valueOf_ = get_all_text_(node)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LengthType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class LengthType


class AbstractGeometryType(AbstractGMLType):
    """All geometry elements are derived directly or indirectly from this
    abstract supertype. A geometry element may have an identifying
    attribute (gml:id), one or more names (elements identifier and
    name) and a description (elements description and
    descriptionReference) . It may be associated with a spatial
    reference system (attribute group gml:SRSReferenceGroup). The
    following rules shall be adhered to: - Every geometry type shall
    derive from this abstract type. - Every geometry element (i.e.
    an element of a geometry type) shall be directly or indirectly
    in the substitution group of AbstractGeometry."""
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractGeometryType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.srsName = _cast(None, srsName)
        self.axisLabels = _cast(None, axisLabels)
        self.uomLabels = _cast(None, uomLabels)
        self.srsDimension = _cast(int, srsDimension)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeometryType.subclass:
            return AbstractGeometryType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeometryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_srsName(self): return self.srsName
    def set_srsName(self, srsName): self.srsName = srsName
    def get_axisLabels(self): return self.axisLabels
    def set_axisLabels(self, axisLabels): self.axisLabels = axisLabels
    def get_uomLabels(self): return self.uomLabels
    def set_uomLabels(self, uomLabels): self.uomLabels = uomLabels
    def get_srsDimension(self): return self.srsDimension
    def set_srsDimension(self, srsDimension): self.srsDimension = srsDimension
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractGeometryType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeometryType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeometryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeometryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeometryType'):
        super(AbstractGeometryType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeometryType')
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            outfile.write(' srsName=%s' % (self.gds_format_string(quote_attrib(self.srsName).encode(ExternalEncoding), input_name='srsName'), ))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            outfile.write(' axisLabels=%s' % (quote_attrib(self.axisLabels), ))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            outfile.write(' uomLabels=%s' % (quote_attrib(self.uomLabels), ))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            outfile.write(' srsDimension="%s"' % self.gds_format_integer(self.srsDimension, input_name='srsDimension'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeometryType', fromsubclass_=False, pretty_print=True):
        super(AbstractGeometryType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeometryType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.srsName is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            showIndent(outfile, level)
            outfile.write('srsName="%s",\n' % (self.srsName,))
        if self.axisLabels is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            showIndent(outfile, level)
            outfile.write('axisLabels=%s,\n' % (self.axisLabels,))
        if self.uomLabels is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            showIndent(outfile, level)
            outfile.write('uomLabels=%s,\n' % (self.uomLabels,))
        if self.srsDimension is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            showIndent(outfile, level)
            outfile.write('srsDimension=%d,\n' % (self.srsDimension,))
        super(AbstractGeometryType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractGeometryType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('srsName', node)
        if value is not None and 'srsName' not in already_processed:
            already_processed.add('srsName')
            self.srsName = value
        value = find_attr_value_('axisLabels', node)
        if value is not None and 'axisLabels' not in already_processed:
            already_processed.add('axisLabels')
            self.axisLabels = value
        value = find_attr_value_('uomLabels', node)
        if value is not None and 'uomLabels' not in already_processed:
            already_processed.add('uomLabels')
            self.uomLabels = value
        value = find_attr_value_('srsDimension', node)
        if value is not None and 'srsDimension' not in already_processed:
            already_processed.add('srsDimension')
            try:
                self.srsDimension = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.srsDimension <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractGeometryType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractGeometryType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractGeometryType


class RingType(AbstractRingType):
    subclass = None
    superclass = AbstractRingType
    def __init__(self, aggregationType=None, curveMember=None):
        self.original_tagname_ = None
        super(RingType, self).__init__()
        self.aggregationType = _cast(None, aggregationType)
        if curveMember is None:
            self.curveMember = []
        else:
            self.curveMember = curveMember
    def factory(*args_, **kwargs_):
        if RingType.subclass:
            return RingType.subclass(*args_, **kwargs_)
        else:
            return RingType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_curveMember(self): return self.curveMember
    def set_curveMember(self, curveMember): self.curveMember = curveMember
    def add_curveMember(self, value): self.curveMember.append(value)
    def insert_curveMember_at(self, index, value): self.curveMember.insert(index, value)
    def replace_curveMember_at(self, index, value): self.curveMember[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.curveMember or
            super(RingType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RingType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RingType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RingType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RingType'):
        super(RingType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RingType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RingType', fromsubclass_=False, pretty_print=True):
        super(RingType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for curveMember_ in self.curveMember:
            curveMember_.export(outfile, level, namespace_='gml:', name_='curveMember', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RingType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(RingType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(RingType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('curveMember=[\n')
        level += 1
        for curveMember_ in self.curveMember:
            showIndent(outfile, level)
            outfile.write('model_.curveMember(\n')
            curveMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(RingType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'curveMember':
            obj_ = CurvePropertyType.factory()
            obj_.build(child_)
            self.curveMember.append(obj_)
            obj_.original_tagname_ = 'curveMember'
        super(RingType, self).buildChildren(child_, node, nodeName_, True)
# end class RingType


class AbstractGeometricAggregateType(AbstractGeometryType):
    subclass = None
    superclass = AbstractGeometryType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractGeometricAggregateType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.aggregationType = _cast(None, aggregationType)
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeometricAggregateType.subclass:
            return AbstractGeometricAggregateType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeometricAggregateType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractGeometricAggregateType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeometricAggregateType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeometricAggregateType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeometricAggregateType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeometricAggregateType'):
        super(AbstractGeometricAggregateType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeometricAggregateType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeometricAggregateType', fromsubclass_=False, pretty_print=True):
        super(AbstractGeometricAggregateType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeometricAggregateType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(AbstractGeometricAggregateType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractGeometricAggregateType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractGeometricAggregateType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractGeometricAggregateType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractGeometricAggregateType


class GeometricComplexType(AbstractGeometryType):
    subclass = None
    superclass = AbstractGeometryType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, element=None):
        self.original_tagname_ = None
        super(GeometricComplexType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.aggregationType = _cast(None, aggregationType)
        if element is None:
            self.element = []
        else:
            self.element = element
    def factory(*args_, **kwargs_):
        if GeometricComplexType.subclass:
            return GeometricComplexType.subclass(*args_, **kwargs_)
        else:
            return GeometricComplexType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_element(self): return self.element
    def set_element(self, element): self.element = element
    def add_element(self, value): self.element.append(value)
    def insert_element_at(self, index, value): self.element.insert(index, value)
    def replace_element_at(self, index, value): self.element[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.element or
            super(GeometricComplexType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GeometricComplexType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GeometricComplexType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GeometricComplexType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GeometricComplexType'):
        super(GeometricComplexType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GeometricComplexType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GeometricComplexType', fromsubclass_=False, pretty_print=True):
        super(GeometricComplexType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for element_ in self.element:
            element_.export(outfile, level, namespace_, name_='element', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='GeometricComplexType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(GeometricComplexType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GeometricComplexType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('element=[\n')
        level += 1
        for element_ in self.element:
            showIndent(outfile, level)
            outfile.write('model_.GeometricPrimitivePropertyType(\n')
            element_.exportLiteral(outfile, level, name_='GeometricPrimitivePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(GeometricComplexType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'element':
            obj_ = GeometricPrimitivePropertyType.factory()
            obj_.build(child_)
            self.element.append(obj_)
            obj_.original_tagname_ = 'element'
        super(GeometricComplexType, self).buildChildren(child_, node, nodeName_, True)
# end class GeometricComplexType


class AbstractTopologyType(AbstractGMLType):
    """This abstract type supplies the root or base type for all
    topological elements including primitives and complexes. It
    inherits AbstractGMLType and hence can be identified using the
    gml:id attribute."""
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTopologyType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTopologyType.subclass:
            return AbstractTopologyType.subclass(*args_, **kwargs_)
        else:
            return AbstractTopologyType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractTopologyType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTopologyType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTopologyType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTopologyType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTopologyType'):
        super(AbstractTopologyType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTopologyType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTopologyType', fromsubclass_=False, pretty_print=True):
        super(AbstractTopologyType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTopologyType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTopologyType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTopologyType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTopologyType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractTopologyType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractTopologyType


class AbstractTimeSliceType(AbstractGMLType):
    subclass = None
    superclass = AbstractGMLType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, validTime=None, dataSource=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTimeSliceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.validTime = validTime
        self.dataSource = dataSource
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTimeSliceType.subclass:
            return AbstractTimeSliceType.subclass(*args_, **kwargs_)
        else:
            return AbstractTimeSliceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_validTime(self): return self.validTime
    def set_validTime(self, validTime): self.validTime = validTime
    def get_dataSource(self): return self.dataSource
    def set_dataSource(self, dataSource): self.dataSource = dataSource
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.validTime is not None or
            self.dataSource is not None or
            super(AbstractTimeSliceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTimeSliceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeSliceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTimeSliceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTimeSliceType'):
        super(AbstractTimeSliceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTimeSliceType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTimeSliceType', fromsubclass_=False, pretty_print=True):
        super(AbstractTimeSliceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.validTime is not None:
            self.validTime.export(outfile, level, namespace_='gml:', name_='validTime', pretty_print=pretty_print)
        if self.dataSource is not None:
            self.dataSource.export(outfile, level, namespace_='gml:', name_='dataSource', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTimeSliceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTimeSliceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTimeSliceType, self).exportLiteralChildren(outfile, level, name_)
        if self.validTime is not None:
            showIndent(outfile, level)
            outfile.write('validTime=model_.validTime(\n')
            self.validTime.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dataSource is not None:
            showIndent(outfile, level)
            outfile.write('dataSource=model_.StringOrRefType(\n')
            self.dataSource.exportLiteral(outfile, level, name_='dataSource')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTimeSliceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'validTime':
            class_obj_ = self.get_class_obj_(child_, TimePrimitivePropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.validTime = obj_
            obj_.original_tagname_ = 'validTime'
        elif nodeName_ == 'dataSource':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.dataSource = obj_
            obj_.original_tagname_ = 'dataSource'
        super(AbstractTimeSliceType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractTimeSliceType


class DynamicFeatureMemberType(AbstractFeatureMemberType):
    subclass = None
    superclass = AbstractFeatureMemberType
    def __init__(self, owns=False, nilReason=None, title=None, show=None, actuate=None, href=None, role=None, arcrole=None, remoteSchema=None, type_=None, DynamicFeature=None):
        self.original_tagname_ = None
        super(DynamicFeatureMemberType, self).__init__(owns, )
        self.nilReason = _cast(None, nilReason)
        self.title = _cast(None, title)
        self.show = _cast(None, show)
        self.actuate = _cast(None, actuate)
        self.href = _cast(None, href)
        self.role = _cast(None, role)
        self.arcrole = _cast(None, arcrole)
        self.remoteSchema = _cast(None, remoteSchema)
        self.type_ = _cast(None, type_)
        if DynamicFeature is None:
            self.DynamicFeature = []
        else:
            self.DynamicFeature = DynamicFeature
    def factory(*args_, **kwargs_):
        if DynamicFeatureMemberType.subclass:
            return DynamicFeatureMemberType.subclass(*args_, **kwargs_)
        else:
            return DynamicFeatureMemberType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_DynamicFeature(self): return self.DynamicFeature
    def set_DynamicFeature(self, DynamicFeature): self.DynamicFeature = DynamicFeature
    def add_DynamicFeature(self, value): self.DynamicFeature.append(value)
    def insert_DynamicFeature_at(self, index, value): self.DynamicFeature.insert(index, value)
    def replace_DynamicFeature_at(self, index, value): self.DynamicFeature[index] = value
    def get_nilReason(self): return self.nilReason
    def set_nilReason(self, nilReason): self.nilReason = nilReason
    def get_title(self): return self.title
    def set_title(self, title): self.title = title
    def get_show(self): return self.show
    def set_show(self, show): self.show = show
    def get_actuate(self): return self.actuate
    def set_actuate(self, actuate): self.actuate = actuate
    def get_href(self): return self.href
    def set_href(self, href): self.href = href
    def get_role(self): return self.role
    def set_role(self, role): self.role = role
    def get_arcrole(self): return self.arcrole
    def set_arcrole(self, arcrole): self.arcrole = arcrole
    def get_remoteSchema(self): return self.remoteSchema
    def set_remoteSchema(self, remoteSchema): self.remoteSchema = remoteSchema
    def get_type(self): return self.type_
    def set_type(self, type_): self.type_ = type_
    def hasContent_(self):
        if (
            self.DynamicFeature or
            super(DynamicFeatureMemberType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DynamicFeatureMemberType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DynamicFeatureMemberType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DynamicFeatureMemberType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DynamicFeatureMemberType'):
        super(DynamicFeatureMemberType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DynamicFeatureMemberType')
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            outfile.write(' nilReason=%s' % (quote_attrib(self.nilReason), ))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            outfile.write(' show=%s' % (self.gds_format_string(quote_attrib(self.show).encode(ExternalEncoding), input_name='show'), ))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            outfile.write(' actuate=%s' % (self.gds_format_string(quote_attrib(self.actuate).encode(ExternalEncoding), input_name='actuate'), ))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            outfile.write(' href=%s' % (self.gds_format_string(quote_attrib(self.href).encode(ExternalEncoding), input_name='href'), ))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            outfile.write(' role=%s' % (self.gds_format_string(quote_attrib(self.role).encode(ExternalEncoding), input_name='role'), ))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            outfile.write(' arcrole=%s' % (self.gds_format_string(quote_attrib(self.arcrole).encode(ExternalEncoding), input_name='arcrole'), ))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            outfile.write(' remoteSchema=%s' % (self.gds_format_string(quote_attrib(self.remoteSchema).encode(ExternalEncoding), input_name='remoteSchema'), ))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            outfile.write(' type=%s' % (self.gds_format_string(quote_attrib(self.type_).encode(ExternalEncoding), input_name='type'), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DynamicFeatureMemberType', fromsubclass_=False, pretty_print=True):
        super(DynamicFeatureMemberType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for DynamicFeature_ in self.DynamicFeature:
            DynamicFeature_.export(outfile, level, namespace_='gml:', name_='DynamicFeature', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DynamicFeatureMemberType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.nilReason is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            showIndent(outfile, level)
            outfile.write('nilReason=%s,\n' % (self.nilReason,))
        if self.title is not None and 'title' not in already_processed:
            already_processed.add('title')
            showIndent(outfile, level)
            outfile.write('title="%s",\n' % (self.title,))
        if self.show is not None and 'show' not in already_processed:
            already_processed.add('show')
            showIndent(outfile, level)
            outfile.write('show="%s",\n' % (self.show,))
        if self.actuate is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            showIndent(outfile, level)
            outfile.write('actuate="%s",\n' % (self.actuate,))
        if self.href is not None and 'href' not in already_processed:
            already_processed.add('href')
            showIndent(outfile, level)
            outfile.write('href="%s",\n' % (self.href,))
        if self.role is not None and 'role' not in already_processed:
            already_processed.add('role')
            showIndent(outfile, level)
            outfile.write('role="%s",\n' % (self.role,))
        if self.arcrole is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            showIndent(outfile, level)
            outfile.write('arcrole="%s",\n' % (self.arcrole,))
        if self.remoteSchema is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            showIndent(outfile, level)
            outfile.write('remoteSchema="%s",\n' % (self.remoteSchema,))
        if self.type_ is not None and 'type_' not in already_processed:
            already_processed.add('type_')
            showIndent(outfile, level)
            outfile.write('type_="%s",\n' % (self.type_,))
        super(DynamicFeatureMemberType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DynamicFeatureMemberType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('DynamicFeature=[\n')
        level += 1
        for DynamicFeature_ in self.DynamicFeature:
            showIndent(outfile, level)
            outfile.write('model_.DynamicFeatureType(\n')
            DynamicFeature_.exportLiteral(outfile, level, name_='DynamicFeatureType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('nilReason', node)
        if value is not None and 'nilReason' not in already_processed:
            already_processed.add('nilReason')
            self.nilReason = value
        value = find_attr_value_('title', node)
        if value is not None and 'title' not in already_processed:
            already_processed.add('title')
            self.title = value
        value = find_attr_value_('show', node)
        if value is not None and 'show' not in already_processed:
            already_processed.add('show')
            self.show = value
        value = find_attr_value_('actuate', node)
        if value is not None and 'actuate' not in already_processed:
            already_processed.add('actuate')
            self.actuate = value
        value = find_attr_value_('href', node)
        if value is not None and 'href' not in already_processed:
            already_processed.add('href')
            self.href = value
        value = find_attr_value_('role', node)
        if value is not None and 'role' not in already_processed:
            already_processed.add('role')
            self.role = value
        value = find_attr_value_('arcrole', node)
        if value is not None and 'arcrole' not in already_processed:
            already_processed.add('arcrole')
            self.arcrole = value
        value = find_attr_value_('remoteSchema', node)
        if value is not None and 'remoteSchema' not in already_processed:
            already_processed.add('remoteSchema')
            self.remoteSchema = value
        value = find_attr_value_('type', node)
        if value is not None and 'type' not in already_processed:
            already_processed.add('type')
            self.type_ = value
        super(DynamicFeatureMemberType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'DynamicFeature':
            class_obj_ = self.get_class_obj_(child_, DynamicFeatureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.DynamicFeature.append(obj_)
            obj_.original_tagname_ = 'DynamicFeature'
        elif nodeName_ == 'DynamicFeatureCollection':
            obj_ = DynamicFeatureCollectionType.factory()
            obj_.build(child_)
            self.DynamicFeature.append(obj_)
            obj_.original_tagname_ = 'DynamicFeatureCollection'
        super(DynamicFeatureMemberType, self).buildChildren(child_, node, nodeName_, True)
# end class DynamicFeatureMemberType


class DynamicFeatureType(AbstractFeatureType):
    subclass = None
    superclass = AbstractFeatureType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, validTime=None, history=None, dataSource=None, dataSourceReference=None, extensiontype_=None):
        self.original_tagname_ = None
        super(DynamicFeatureType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, extensiontype_, )
        self.validTime = validTime
        self.history = history
        self.dataSource = dataSource
        self.dataSourceReference = dataSourceReference
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DynamicFeatureType.subclass:
            return DynamicFeatureType.subclass(*args_, **kwargs_)
        else:
            return DynamicFeatureType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_validTime(self): return self.validTime
    def set_validTime(self, validTime): self.validTime = validTime
    def get_history(self): return self.history
    def set_history(self, history): self.history = history
    def get_dataSource(self): return self.dataSource
    def set_dataSource(self, dataSource): self.dataSource = dataSource
    def get_dataSourceReference(self): return self.dataSourceReference
    def set_dataSourceReference(self, dataSourceReference): self.dataSourceReference = dataSourceReference
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.validTime is not None or
            self.history is not None or
            self.dataSource is not None or
            self.dataSourceReference is not None or
            super(DynamicFeatureType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DynamicFeatureType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DynamicFeatureType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DynamicFeatureType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DynamicFeatureType'):
        super(DynamicFeatureType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DynamicFeatureType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DynamicFeatureType', fromsubclass_=False, pretty_print=True):
        super(DynamicFeatureType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.validTime is not None:
            self.validTime.export(outfile, level, namespace_='gml:', name_='validTime', pretty_print=pretty_print)
        if self.history is not None:
            self.history.export(outfile, level, namespace_='gml:', name_='history', pretty_print=pretty_print)
        if self.dataSource is not None:
            self.dataSource.export(outfile, level, namespace_='gml:', name_='dataSource', pretty_print=pretty_print)
        if self.dataSourceReference is not None:
            self.dataSourceReference.export(outfile, level, namespace_='gml:', name_='dataSourceReference', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DynamicFeatureType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DynamicFeatureType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DynamicFeatureType, self).exportLiteralChildren(outfile, level, name_)
        if self.validTime is not None:
            showIndent(outfile, level)
            outfile.write('validTime=model_.validTime(\n')
            self.validTime.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.history is not None:
            showIndent(outfile, level)
            outfile.write('history=model_.history(\n')
            self.history.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dataSource is not None:
            showIndent(outfile, level)
            outfile.write('dataSource=model_.StringOrRefType(\n')
            self.dataSource.exportLiteral(outfile, level, name_='dataSource')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.dataSourceReference is not None:
            showIndent(outfile, level)
            outfile.write('dataSourceReference=model_.ReferenceType(\n')
            self.dataSourceReference.exportLiteral(outfile, level, name_='dataSourceReference')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(DynamicFeatureType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'validTime':
            class_obj_ = self.get_class_obj_(child_, TimePrimitivePropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.validTime = obj_
            obj_.original_tagname_ = 'validTime'
        elif nodeName_ == 'history':
            obj_ = HistoryPropertyType.factory()
            obj_.build(child_)
            self.history = obj_
            obj_.original_tagname_ = 'history'
        elif nodeName_ == 'track':
            obj_ = HistoryPropertyType.factory()
            obj_.build(child_)
            self.track = obj_
            obj_.original_tagname_ = 'track'
        elif nodeName_ == 'dataSource':
            obj_ = StringOrRefType.factory()
            obj_.build(child_)
            self.dataSource = obj_
            obj_.original_tagname_ = 'dataSource'
        elif nodeName_ == 'dataSourceReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.dataSourceReference = obj_
            obj_.original_tagname_ = 'dataSourceReference'
        super(DynamicFeatureType, self).buildChildren(child_, node, nodeName_, True)
# end class DynamicFeatureType


class MovingObjectStatusType(AbstractTimeSliceType):
    subclass = None
    superclass = AbstractTimeSliceType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, validTime=None, dataSource=None, position=None, pos=None, locationName=None, locationReference=None, location=None, speed=None, bearing=None, acceleration=None, elevation=None, status=None, statusReference=None):
        self.original_tagname_ = None
        super(MovingObjectStatusType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, validTime, dataSource, )
        self.position = position
        self.pos = pos
        self.locationName = locationName
        self.locationReference = locationReference
        self.location = location
        self.speed = speed
        self.bearing = bearing
        self.acceleration = acceleration
        self.elevation = elevation
        self.status = status
        self.statusReference = statusReference
    def factory(*args_, **kwargs_):
        if MovingObjectStatusType.subclass:
            return MovingObjectStatusType.subclass(*args_, **kwargs_)
        else:
            return MovingObjectStatusType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_position(self): return self.position
    def set_position(self, position): self.position = position
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_locationName(self): return self.locationName
    def set_locationName(self, locationName): self.locationName = locationName
    def get_locationReference(self): return self.locationReference
    def set_locationReference(self, locationReference): self.locationReference = locationReference
    def get_location(self): return self.location
    def set_location(self, location): self.location = location
    def get_speed(self): return self.speed
    def set_speed(self, speed): self.speed = speed
    def get_bearing(self): return self.bearing
    def set_bearing(self, bearing): self.bearing = bearing
    def get_acceleration(self): return self.acceleration
    def set_acceleration(self, acceleration): self.acceleration = acceleration
    def get_elevation(self): return self.elevation
    def set_elevation(self, elevation): self.elevation = elevation
    def get_status(self): return self.status
    def set_status(self, status): self.status = status
    def get_statusReference(self): return self.statusReference
    def set_statusReference(self, statusReference): self.statusReference = statusReference
    def hasContent_(self):
        if (
            self.position is not None or
            self.pos is not None or
            self.locationName is not None or
            self.locationReference is not None or
            self.location is not None or
            self.speed is not None or
            self.bearing is not None or
            self.acceleration is not None or
            self.elevation is not None or
            self.status is not None or
            self.statusReference is not None or
            super(MovingObjectStatusType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MovingObjectStatusType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MovingObjectStatusType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MovingObjectStatusType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MovingObjectStatusType'):
        super(MovingObjectStatusType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MovingObjectStatusType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MovingObjectStatusType', fromsubclass_=False, pretty_print=True):
        super(MovingObjectStatusType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.position is not None:
            self.position.export(outfile, level, namespace_, name_='position', pretty_print=pretty_print)
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.locationName is not None:
            self.locationName.export(outfile, level, namespace_='gml:', name_='locationName', pretty_print=pretty_print)
        if self.locationReference is not None:
            self.locationReference.export(outfile, level, namespace_='gml:', name_='locationReference', pretty_print=pretty_print)
        if self.location is not None:
            self.location.export(outfile, level, namespace_='gml:', name_='location', pretty_print=pretty_print)
        if self.speed is not None:
            self.speed.export(outfile, level, namespace_, name_='speed', pretty_print=pretty_print)
        if self.bearing is not None:
            self.bearing.export(outfile, level, namespace_, name_='bearing', pretty_print=pretty_print)
        if self.acceleration is not None:
            self.acceleration.export(outfile, level, namespace_, name_='acceleration', pretty_print=pretty_print)
        if self.elevation is not None:
            self.elevation.export(outfile, level, namespace_, name_='elevation', pretty_print=pretty_print)
        if self.status is not None:
            self.status.export(outfile, level, namespace_='gml:', name_='status', pretty_print=pretty_print)
        if self.statusReference is not None:
            self.statusReference.export(outfile, level, namespace_='gml:', name_='statusReference', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MovingObjectStatusType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MovingObjectStatusType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MovingObjectStatusType, self).exportLiteralChildren(outfile, level, name_)
        if self.position is not None:
            showIndent(outfile, level)
            outfile.write('position=model_.GeometryPropertyType(\n')
            self.position.exportLiteral(outfile, level, name_='position')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.DirectPositionType(\n')
            self.pos.exportLiteral(outfile, level, name_='pos')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.locationName is not None:
            showIndent(outfile, level)
            outfile.write('locationName=model_.CodeType(\n')
            self.locationName.exportLiteral(outfile, level, name_='locationName')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.locationReference is not None:
            showIndent(outfile, level)
            outfile.write('locationReference=model_.ReferenceType(\n')
            self.locationReference.exportLiteral(outfile, level, name_='locationReference')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.location is not None:
            showIndent(outfile, level)
            outfile.write('location=model_.LocationPropertyType(\n')
            self.location.exportLiteral(outfile, level, name_='location')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.speed is not None:
            showIndent(outfile, level)
            outfile.write('speed=model_.MeasureType(\n')
            self.speed.exportLiteral(outfile, level, name_='speed')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.bearing is not None:
            showIndent(outfile, level)
            outfile.write('bearing=model_.DirectionPropertyType(\n')
            self.bearing.exportLiteral(outfile, level, name_='bearing')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.acceleration is not None:
            showIndent(outfile, level)
            outfile.write('acceleration=model_.MeasureType(\n')
            self.acceleration.exportLiteral(outfile, level, name_='acceleration')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.elevation is not None:
            showIndent(outfile, level)
            outfile.write('elevation=model_.MeasureType(\n')
            self.elevation.exportLiteral(outfile, level, name_='elevation')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.status is not None:
            showIndent(outfile, level)
            outfile.write('status=model_.MD_ProgressCode_PropertyType(\n')
            self.status.exportLiteral(outfile, level, name_='status')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.statusReference is not None:
            showIndent(outfile, level)
            outfile.write('statusReference=model_.statusReference(\n')
            self.statusReference.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MovingObjectStatusType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'position':
            obj_ = GeometryPropertyType.factory()
            obj_.build(child_)
            self.position = obj_
            obj_.original_tagname_ = 'position'
        elif nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'locationName':
            class_obj_ = self.get_class_obj_(child_, CodeType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.locationName = obj_
            obj_.original_tagname_ = 'locationName'
        elif nodeName_ == 'locationReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.locationReference = obj_
            obj_.original_tagname_ = 'locationReference'
        elif nodeName_ == 'location':
            class_obj_ = self.get_class_obj_(child_, LocationPropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'priorityLocation':
            obj_ = PriorityLocationPropertyType.factory()
            obj_.build(child_)
            self.priorityLocation = obj_
            obj_.original_tagname_ = 'priorityLocation'
        elif nodeName_ == 'speed':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.speed = obj_
            obj_.original_tagname_ = 'speed'
        elif nodeName_ == 'bearing':
            obj_ = DirectionPropertyType.factory()
            obj_.build(child_)
            self.bearing = obj_
            obj_.original_tagname_ = 'bearing'
        elif nodeName_ == 'acceleration':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.acceleration = obj_
            obj_.original_tagname_ = 'acceleration'
        elif nodeName_ == 'elevation':
            class_obj_ = self.get_class_obj_(child_, MeasureType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.elevation = obj_
            obj_.original_tagname_ = 'elevation'
        elif nodeName_ == 'status':
            obj_ = MD_ProgressCode_PropertyType.factory()
            obj_.build(child_)
            self.status = obj_
            obj_.original_tagname_ = 'status'
        elif nodeName_ == 'statusReference':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.statusReference = obj_
            obj_.original_tagname_ = 'statusReference'
        super(MovingObjectStatusType, self).buildChildren(child_, node, nodeName_, True)
# end class MovingObjectStatusType


class ObliqueCartesianCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(ObliqueCartesianCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if ObliqueCartesianCSType.subclass:
            return ObliqueCartesianCSType.subclass(*args_, **kwargs_)
        else:
            return ObliqueCartesianCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(ObliqueCartesianCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ObliqueCartesianCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ObliqueCartesianCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ObliqueCartesianCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ObliqueCartesianCSType'):
        super(ObliqueCartesianCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ObliqueCartesianCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ObliqueCartesianCSType', fromsubclass_=False, pretty_print=True):
        super(ObliqueCartesianCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ObliqueCartesianCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ObliqueCartesianCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ObliqueCartesianCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ObliqueCartesianCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(ObliqueCartesianCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class ObliqueCartesianCSType


class TemporalCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(TemporalCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if TemporalCSType.subclass:
            return TemporalCSType.subclass(*args_, **kwargs_)
        else:
            return TemporalCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(TemporalCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TemporalCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TemporalCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TemporalCSType'):
        super(TemporalCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TemporalCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TemporalCSType', fromsubclass_=False, pretty_print=True):
        super(TemporalCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TemporalCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TemporalCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TemporalCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TemporalCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(TemporalCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class TemporalCSType


class MD_ImageDescription_Type(MD_CoverageDescription_Type):
    """Information about an image's suitability for use"""
    subclass = None
    superclass = MD_CoverageDescription_Type
    def __init__(self, id=None, uuid=None, attributeDescription=None, contentType=None, dimension=None, illuminationElevationAngle=None, illuminationAzimuthAngle=None, imagingCondition=None, imageQualityCode=None, cloudCoverPercentage=None, processingLevelCode=None, compressionGenerationQuantity=None, triangulationIndicator=None, radiometricCalibrationDataAvailability=None, cameraCalibrationInformationAvailability=None, filmDistortionInformationAvailability=None, lensDistortionInformationAvailability=None):
        self.original_tagname_ = None
        super(MD_ImageDescription_Type, self).__init__(id, uuid, attributeDescription, contentType, dimension, )
        self.illuminationElevationAngle = illuminationElevationAngle
        self.illuminationAzimuthAngle = illuminationAzimuthAngle
        self.imagingCondition = imagingCondition
        self.imageQualityCode = imageQualityCode
        self.cloudCoverPercentage = cloudCoverPercentage
        self.processingLevelCode = processingLevelCode
        self.compressionGenerationQuantity = compressionGenerationQuantity
        self.triangulationIndicator = triangulationIndicator
        self.radiometricCalibrationDataAvailability = radiometricCalibrationDataAvailability
        self.cameraCalibrationInformationAvailability = cameraCalibrationInformationAvailability
        self.filmDistortionInformationAvailability = filmDistortionInformationAvailability
        self.lensDistortionInformationAvailability = lensDistortionInformationAvailability
    def factory(*args_, **kwargs_):
        if MD_ImageDescription_Type.subclass:
            return MD_ImageDescription_Type.subclass(*args_, **kwargs_)
        else:
            return MD_ImageDescription_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_illuminationElevationAngle(self): return self.illuminationElevationAngle
    def set_illuminationElevationAngle(self, illuminationElevationAngle): self.illuminationElevationAngle = illuminationElevationAngle
    def get_illuminationAzimuthAngle(self): return self.illuminationAzimuthAngle
    def set_illuminationAzimuthAngle(self, illuminationAzimuthAngle): self.illuminationAzimuthAngle = illuminationAzimuthAngle
    def get_imagingCondition(self): return self.imagingCondition
    def set_imagingCondition(self, imagingCondition): self.imagingCondition = imagingCondition
    def get_imageQualityCode(self): return self.imageQualityCode
    def set_imageQualityCode(self, imageQualityCode): self.imageQualityCode = imageQualityCode
    def get_cloudCoverPercentage(self): return self.cloudCoverPercentage
    def set_cloudCoverPercentage(self, cloudCoverPercentage): self.cloudCoverPercentage = cloudCoverPercentage
    def get_processingLevelCode(self): return self.processingLevelCode
    def set_processingLevelCode(self, processingLevelCode): self.processingLevelCode = processingLevelCode
    def get_compressionGenerationQuantity(self): return self.compressionGenerationQuantity
    def set_compressionGenerationQuantity(self, compressionGenerationQuantity): self.compressionGenerationQuantity = compressionGenerationQuantity
    def get_triangulationIndicator(self): return self.triangulationIndicator
    def set_triangulationIndicator(self, triangulationIndicator): self.triangulationIndicator = triangulationIndicator
    def get_radiometricCalibrationDataAvailability(self): return self.radiometricCalibrationDataAvailability
    def set_radiometricCalibrationDataAvailability(self, radiometricCalibrationDataAvailability): self.radiometricCalibrationDataAvailability = radiometricCalibrationDataAvailability
    def get_cameraCalibrationInformationAvailability(self): return self.cameraCalibrationInformationAvailability
    def set_cameraCalibrationInformationAvailability(self, cameraCalibrationInformationAvailability): self.cameraCalibrationInformationAvailability = cameraCalibrationInformationAvailability
    def get_filmDistortionInformationAvailability(self): return self.filmDistortionInformationAvailability
    def set_filmDistortionInformationAvailability(self, filmDistortionInformationAvailability): self.filmDistortionInformationAvailability = filmDistortionInformationAvailability
    def get_lensDistortionInformationAvailability(self): return self.lensDistortionInformationAvailability
    def set_lensDistortionInformationAvailability(self, lensDistortionInformationAvailability): self.lensDistortionInformationAvailability = lensDistortionInformationAvailability
    def hasContent_(self):
        if (
            self.illuminationElevationAngle is not None or
            self.illuminationAzimuthAngle is not None or
            self.imagingCondition is not None or
            self.imageQualityCode is not None or
            self.cloudCoverPercentage is not None or
            self.processingLevelCode is not None or
            self.compressionGenerationQuantity is not None or
            self.triangulationIndicator is not None or
            self.radiometricCalibrationDataAvailability is not None or
            self.cameraCalibrationInformationAvailability is not None or
            self.filmDistortionInformationAvailability is not None or
            self.lensDistortionInformationAvailability is not None or
            super(MD_ImageDescription_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_ImageDescription_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ImageDescription_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_ImageDescription_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_ImageDescription_Type'):
        super(MD_ImageDescription_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_ImageDescription_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_ImageDescription_Type', fromsubclass_=False, pretty_print=True):
        super(MD_ImageDescription_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.illuminationElevationAngle is not None:
            self.illuminationElevationAngle.export(outfile, level, namespace_, name_='illuminationElevationAngle', pretty_print=pretty_print)
        if self.illuminationAzimuthAngle is not None:
            self.illuminationAzimuthAngle.export(outfile, level, namespace_, name_='illuminationAzimuthAngle', pretty_print=pretty_print)
        if self.imagingCondition is not None:
            self.imagingCondition.export(outfile, level, namespace_, name_='imagingCondition', pretty_print=pretty_print)
        if self.imageQualityCode is not None:
            self.imageQualityCode.export(outfile, level, namespace_, name_='imageQualityCode', pretty_print=pretty_print)
        if self.cloudCoverPercentage is not None:
            self.cloudCoverPercentage.export(outfile, level, namespace_, name_='cloudCoverPercentage', pretty_print=pretty_print)
        if self.processingLevelCode is not None:
            self.processingLevelCode.export(outfile, level, namespace_, name_='processingLevelCode', pretty_print=pretty_print)
        if self.compressionGenerationQuantity is not None:
            self.compressionGenerationQuantity.export(outfile, level, namespace_, name_='compressionGenerationQuantity', pretty_print=pretty_print)
        if self.triangulationIndicator is not None:
            self.triangulationIndicator.export(outfile, level, namespace_, name_='triangulationIndicator', pretty_print=pretty_print)
        if self.radiometricCalibrationDataAvailability is not None:
            self.radiometricCalibrationDataAvailability.export(outfile, level, namespace_, name_='radiometricCalibrationDataAvailability', pretty_print=pretty_print)
        if self.cameraCalibrationInformationAvailability is not None:
            self.cameraCalibrationInformationAvailability.export(outfile, level, namespace_, name_='cameraCalibrationInformationAvailability', pretty_print=pretty_print)
        if self.filmDistortionInformationAvailability is not None:
            self.filmDistortionInformationAvailability.export(outfile, level, namespace_, name_='filmDistortionInformationAvailability', pretty_print=pretty_print)
        if self.lensDistortionInformationAvailability is not None:
            self.lensDistortionInformationAvailability.export(outfile, level, namespace_, name_='lensDistortionInformationAvailability', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_ImageDescription_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_ImageDescription_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_ImageDescription_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.illuminationElevationAngle is not None:
            showIndent(outfile, level)
            outfile.write('illuminationElevationAngle=model_.Real_PropertyType(\n')
            self.illuminationElevationAngle.exportLiteral(outfile, level, name_='illuminationElevationAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.illuminationAzimuthAngle is not None:
            showIndent(outfile, level)
            outfile.write('illuminationAzimuthAngle=model_.Real_PropertyType(\n')
            self.illuminationAzimuthAngle.exportLiteral(outfile, level, name_='illuminationAzimuthAngle')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.imagingCondition is not None:
            showIndent(outfile, level)
            outfile.write('imagingCondition=model_.MD_ImagingConditionCode_PropertyType(\n')
            self.imagingCondition.exportLiteral(outfile, level, name_='imagingCondition')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.imageQualityCode is not None:
            showIndent(outfile, level)
            outfile.write('imageQualityCode=model_.MD_Identifier_PropertyType(\n')
            self.imageQualityCode.exportLiteral(outfile, level, name_='imageQualityCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cloudCoverPercentage is not None:
            showIndent(outfile, level)
            outfile.write('cloudCoverPercentage=model_.Real_PropertyType(\n')
            self.cloudCoverPercentage.exportLiteral(outfile, level, name_='cloudCoverPercentage')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.processingLevelCode is not None:
            showIndent(outfile, level)
            outfile.write('processingLevelCode=model_.MD_Identifier_PropertyType(\n')
            self.processingLevelCode.exportLiteral(outfile, level, name_='processingLevelCode')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.compressionGenerationQuantity is not None:
            showIndent(outfile, level)
            outfile.write('compressionGenerationQuantity=model_.Integer_PropertyType(\n')
            self.compressionGenerationQuantity.exportLiteral(outfile, level, name_='compressionGenerationQuantity')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.triangulationIndicator is not None:
            showIndent(outfile, level)
            outfile.write('triangulationIndicator=model_.Boolean_PropertyType(\n')
            self.triangulationIndicator.exportLiteral(outfile, level, name_='triangulationIndicator')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.radiometricCalibrationDataAvailability is not None:
            showIndent(outfile, level)
            outfile.write('radiometricCalibrationDataAvailability=model_.Boolean_PropertyType(\n')
            self.radiometricCalibrationDataAvailability.exportLiteral(outfile, level, name_='radiometricCalibrationDataAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cameraCalibrationInformationAvailability is not None:
            showIndent(outfile, level)
            outfile.write('cameraCalibrationInformationAvailability=model_.Boolean_PropertyType(\n')
            self.cameraCalibrationInformationAvailability.exportLiteral(outfile, level, name_='cameraCalibrationInformationAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.filmDistortionInformationAvailability is not None:
            showIndent(outfile, level)
            outfile.write('filmDistortionInformationAvailability=model_.Boolean_PropertyType(\n')
            self.filmDistortionInformationAvailability.exportLiteral(outfile, level, name_='filmDistortionInformationAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.lensDistortionInformationAvailability is not None:
            showIndent(outfile, level)
            outfile.write('lensDistortionInformationAvailability=model_.Boolean_PropertyType(\n')
            self.lensDistortionInformationAvailability.exportLiteral(outfile, level, name_='lensDistortionInformationAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_ImageDescription_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'illuminationElevationAngle':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.illuminationElevationAngle = obj_
            obj_.original_tagname_ = 'illuminationElevationAngle'
        elif nodeName_ == 'illuminationAzimuthAngle':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.illuminationAzimuthAngle = obj_
            obj_.original_tagname_ = 'illuminationAzimuthAngle'
        elif nodeName_ == 'imagingCondition':
            obj_ = MD_ImagingConditionCode_PropertyType.factory()
            obj_.build(child_)
            self.imagingCondition = obj_
            obj_.original_tagname_ = 'imagingCondition'
        elif nodeName_ == 'imageQualityCode':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.imageQualityCode = obj_
            obj_.original_tagname_ = 'imageQualityCode'
        elif nodeName_ == 'cloudCoverPercentage':
            obj_ = Real_PropertyType.factory()
            obj_.build(child_)
            self.cloudCoverPercentage = obj_
            obj_.original_tagname_ = 'cloudCoverPercentage'
        elif nodeName_ == 'processingLevelCode':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.processingLevelCode = obj_
            obj_.original_tagname_ = 'processingLevelCode'
        elif nodeName_ == 'compressionGenerationQuantity':
            obj_ = Integer_PropertyType.factory()
            obj_.build(child_)
            self.compressionGenerationQuantity = obj_
            obj_.original_tagname_ = 'compressionGenerationQuantity'
        elif nodeName_ == 'triangulationIndicator':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.triangulationIndicator = obj_
            obj_.original_tagname_ = 'triangulationIndicator'
        elif nodeName_ == 'radiometricCalibrationDataAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.radiometricCalibrationDataAvailability = obj_
            obj_.original_tagname_ = 'radiometricCalibrationDataAvailability'
        elif nodeName_ == 'cameraCalibrationInformationAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.cameraCalibrationInformationAvailability = obj_
            obj_.original_tagname_ = 'cameraCalibrationInformationAvailability'
        elif nodeName_ == 'filmDistortionInformationAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.filmDistortionInformationAvailability = obj_
            obj_.original_tagname_ = 'filmDistortionInformationAvailability'
        elif nodeName_ == 'lensDistortionInformationAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.lensDistortionInformationAvailability = obj_
            obj_.original_tagname_ = 'lensDistortionInformationAvailability'
        super(MD_ImageDescription_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_ImageDescription_Type


class EX_GeographicDescription_Type(AbstractEX_GeographicExtent_Type):
    subclass = None
    superclass = AbstractEX_GeographicExtent_Type
    def __init__(self, id=None, uuid=None, extentTypeCode=None, geographicIdentifier=None):
        self.original_tagname_ = None
        super(EX_GeographicDescription_Type, self).__init__(id, uuid, extentTypeCode, )
        self.geographicIdentifier = geographicIdentifier
    def factory(*args_, **kwargs_):
        if EX_GeographicDescription_Type.subclass:
            return EX_GeographicDescription_Type.subclass(*args_, **kwargs_)
        else:
            return EX_GeographicDescription_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_geographicIdentifier(self): return self.geographicIdentifier
    def set_geographicIdentifier(self, geographicIdentifier): self.geographicIdentifier = geographicIdentifier
    def hasContent_(self):
        if (
            self.geographicIdentifier is not None or
            super(EX_GeographicDescription_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_GeographicDescription_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicDescription_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_GeographicDescription_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_GeographicDescription_Type'):
        super(EX_GeographicDescription_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicDescription_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_GeographicDescription_Type', fromsubclass_=False, pretty_print=True):
        super(EX_GeographicDescription_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.geographicIdentifier is not None:
            self.geographicIdentifier.export(outfile, level, namespace_, name_='geographicIdentifier', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_GeographicDescription_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_GeographicDescription_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_GeographicDescription_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.geographicIdentifier is not None:
            showIndent(outfile, level)
            outfile.write('geographicIdentifier=model_.MD_Identifier_PropertyType(\n')
            self.geographicIdentifier.exportLiteral(outfile, level, name_='geographicIdentifier')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EX_GeographicDescription_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'geographicIdentifier':
            obj_ = MD_Identifier_PropertyType.factory()
            obj_.build(child_)
            self.geographicIdentifier = obj_
            obj_.original_tagname_ = 'geographicIdentifier'
        super(EX_GeographicDescription_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_GeographicDescription_Type


class EX_SpatialTemporalExtent_Type(EX_TemporalExtent_Type):
    """Extent with respect to date and time"""
    subclass = None
    superclass = EX_TemporalExtent_Type
    def __init__(self, id=None, uuid=None, extent=None, spatialExtent=None):
        self.original_tagname_ = None
        super(EX_SpatialTemporalExtent_Type, self).__init__(id, uuid, extent, )
        if spatialExtent is None:
            self.spatialExtent = []
        else:
            self.spatialExtent = spatialExtent
    def factory(*args_, **kwargs_):
        if EX_SpatialTemporalExtent_Type.subclass:
            return EX_SpatialTemporalExtent_Type.subclass(*args_, **kwargs_)
        else:
            return EX_SpatialTemporalExtent_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_spatialExtent(self): return self.spatialExtent
    def set_spatialExtent(self, spatialExtent): self.spatialExtent = spatialExtent
    def add_spatialExtent(self, value): self.spatialExtent.append(value)
    def insert_spatialExtent_at(self, index, value): self.spatialExtent.insert(index, value)
    def replace_spatialExtent_at(self, index, value): self.spatialExtent[index] = value
    def hasContent_(self):
        if (
            self.spatialExtent or
            super(EX_SpatialTemporalExtent_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_SpatialTemporalExtent_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_SpatialTemporalExtent_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_SpatialTemporalExtent_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_SpatialTemporalExtent_Type'):
        super(EX_SpatialTemporalExtent_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_SpatialTemporalExtent_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_SpatialTemporalExtent_Type', fromsubclass_=False, pretty_print=True):
        super(EX_SpatialTemporalExtent_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for spatialExtent_ in self.spatialExtent:
            spatialExtent_.export(outfile, level, namespace_, name_='spatialExtent', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_SpatialTemporalExtent_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_SpatialTemporalExtent_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_SpatialTemporalExtent_Type, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('spatialExtent=[\n')
        level += 1
        for spatialExtent_ in self.spatialExtent:
            showIndent(outfile, level)
            outfile.write('model_.EX_GeographicExtent_PropertyType(\n')
            spatialExtent_.exportLiteral(outfile, level, name_='EX_GeographicExtent_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EX_SpatialTemporalExtent_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'spatialExtent':
            obj_ = EX_GeographicExtent_PropertyType.factory()
            obj_.build(child_)
            self.spatialExtent.append(obj_)
            obj_.original_tagname_ = 'spatialExtent'
        super(EX_SpatialTemporalExtent_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_SpatialTemporalExtent_Type


class EX_GeographicBoundingBox_Type(AbstractEX_GeographicExtent_Type):
    """Geographic area of the entire dataset referenced to WGS 84"""
    subclass = None
    superclass = AbstractEX_GeographicExtent_Type
    def __init__(self, id=None, uuid=None, extentTypeCode=None, westBoundLongitude=None, eastBoundLongitude=None, southBoundLatitude=None, northBoundLatitude=None):
        self.original_tagname_ = None
        super(EX_GeographicBoundingBox_Type, self).__init__(id, uuid, extentTypeCode, )
        self.westBoundLongitude = westBoundLongitude
        self.eastBoundLongitude = eastBoundLongitude
        self.southBoundLatitude = southBoundLatitude
        self.northBoundLatitude = northBoundLatitude
    def factory(*args_, **kwargs_):
        if EX_GeographicBoundingBox_Type.subclass:
            return EX_GeographicBoundingBox_Type.subclass(*args_, **kwargs_)
        else:
            return EX_GeographicBoundingBox_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_westBoundLongitude(self): return self.westBoundLongitude
    def set_westBoundLongitude(self, westBoundLongitude): self.westBoundLongitude = westBoundLongitude
    def get_eastBoundLongitude(self): return self.eastBoundLongitude
    def set_eastBoundLongitude(self, eastBoundLongitude): self.eastBoundLongitude = eastBoundLongitude
    def get_southBoundLatitude(self): return self.southBoundLatitude
    def set_southBoundLatitude(self, southBoundLatitude): self.southBoundLatitude = southBoundLatitude
    def get_northBoundLatitude(self): return self.northBoundLatitude
    def set_northBoundLatitude(self, northBoundLatitude): self.northBoundLatitude = northBoundLatitude
    def hasContent_(self):
        if (
            self.westBoundLongitude is not None or
            self.eastBoundLongitude is not None or
            self.southBoundLatitude is not None or
            self.northBoundLatitude is not None or
            super(EX_GeographicBoundingBox_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EX_GeographicBoundingBox_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicBoundingBox_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EX_GeographicBoundingBox_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EX_GeographicBoundingBox_Type'):
        super(EX_GeographicBoundingBox_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EX_GeographicBoundingBox_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EX_GeographicBoundingBox_Type', fromsubclass_=False, pretty_print=True):
        super(EX_GeographicBoundingBox_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.westBoundLongitude is not None:
            self.westBoundLongitude.export(outfile, level, namespace_, name_='westBoundLongitude', pretty_print=pretty_print)
        if self.eastBoundLongitude is not None:
            self.eastBoundLongitude.export(outfile, level, namespace_, name_='eastBoundLongitude', pretty_print=pretty_print)
        if self.southBoundLatitude is not None:
            self.southBoundLatitude.export(outfile, level, namespace_, name_='southBoundLatitude', pretty_print=pretty_print)
        if self.northBoundLatitude is not None:
            self.northBoundLatitude.export(outfile, level, namespace_, name_='northBoundLatitude', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EX_GeographicBoundingBox_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EX_GeographicBoundingBox_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EX_GeographicBoundingBox_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.westBoundLongitude is not None:
            showIndent(outfile, level)
            outfile.write('westBoundLongitude=model_.Decimal_PropertyType(\n')
            self.westBoundLongitude.exportLiteral(outfile, level, name_='westBoundLongitude')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.eastBoundLongitude is not None:
            showIndent(outfile, level)
            outfile.write('eastBoundLongitude=model_.Decimal_PropertyType(\n')
            self.eastBoundLongitude.exportLiteral(outfile, level, name_='eastBoundLongitude')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.southBoundLatitude is not None:
            showIndent(outfile, level)
            outfile.write('southBoundLatitude=model_.Decimal_PropertyType(\n')
            self.southBoundLatitude.exportLiteral(outfile, level, name_='southBoundLatitude')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.northBoundLatitude is not None:
            showIndent(outfile, level)
            outfile.write('northBoundLatitude=model_.Decimal_PropertyType(\n')
            self.northBoundLatitude.exportLiteral(outfile, level, name_='northBoundLatitude')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EX_GeographicBoundingBox_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'westBoundLongitude':
            obj_ = Decimal_PropertyType.factory()
            obj_.build(child_)
            self.westBoundLongitude = obj_
            obj_.original_tagname_ = 'westBoundLongitude'
        elif nodeName_ == 'eastBoundLongitude':
            obj_ = Decimal_PropertyType.factory()
            obj_.build(child_)
            self.eastBoundLongitude = obj_
            obj_.original_tagname_ = 'eastBoundLongitude'
        elif nodeName_ == 'southBoundLatitude':
            obj_ = Decimal_PropertyType.factory()
            obj_.build(child_)
            self.southBoundLatitude = obj_
            obj_.original_tagname_ = 'southBoundLatitude'
        elif nodeName_ == 'northBoundLatitude':
            obj_ = Decimal_PropertyType.factory()
            obj_.build(child_)
            self.northBoundLatitude = obj_
            obj_.original_tagname_ = 'northBoundLatitude'
        super(EX_GeographicBoundingBox_Type, self).buildChildren(child_, node, nodeName_, True)
# end class EX_GeographicBoundingBox_Type


class MD_Georectified_Type(MD_GridSpatialRepresentation_Type):
    subclass = None
    superclass = MD_GridSpatialRepresentation_Type
    def __init__(self, id=None, uuid=None, numberOfDimensions=None, axisDimensionProperties=None, cellGeometry=None, transformationParameterAvailability=None, checkPointAvailability=None, checkPointDescription=None, cornerPoints=None, centerPoint=None, pointInPixel=None, transformationDimensionDescription=None, transformationDimensionMapping=None):
        self.original_tagname_ = None
        super(MD_Georectified_Type, self).__init__(id, uuid, numberOfDimensions, axisDimensionProperties, cellGeometry, transformationParameterAvailability, )
        self.checkPointAvailability = checkPointAvailability
        self.checkPointDescription = checkPointDescription
        if cornerPoints is None:
            self.cornerPoints = []
        else:
            self.cornerPoints = cornerPoints
        self.centerPoint = centerPoint
        self.pointInPixel = pointInPixel
        self.transformationDimensionDescription = transformationDimensionDescription
        if transformationDimensionMapping is None:
            self.transformationDimensionMapping = []
        else:
            self.transformationDimensionMapping = transformationDimensionMapping
    def factory(*args_, **kwargs_):
        if MD_Georectified_Type.subclass:
            return MD_Georectified_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Georectified_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_checkPointAvailability(self): return self.checkPointAvailability
    def set_checkPointAvailability(self, checkPointAvailability): self.checkPointAvailability = checkPointAvailability
    def get_checkPointDescription(self): return self.checkPointDescription
    def set_checkPointDescription(self, checkPointDescription): self.checkPointDescription = checkPointDescription
    def get_cornerPoints(self): return self.cornerPoints
    def set_cornerPoints(self, cornerPoints): self.cornerPoints = cornerPoints
    def add_cornerPoints(self, value): self.cornerPoints.append(value)
    def insert_cornerPoints_at(self, index, value): self.cornerPoints.insert(index, value)
    def replace_cornerPoints_at(self, index, value): self.cornerPoints[index] = value
    def get_centerPoint(self): return self.centerPoint
    def set_centerPoint(self, centerPoint): self.centerPoint = centerPoint
    def get_pointInPixel(self): return self.pointInPixel
    def set_pointInPixel(self, pointInPixel): self.pointInPixel = pointInPixel
    def get_transformationDimensionDescription(self): return self.transformationDimensionDescription
    def set_transformationDimensionDescription(self, transformationDimensionDescription): self.transformationDimensionDescription = transformationDimensionDescription
    def get_transformationDimensionMapping(self): return self.transformationDimensionMapping
    def set_transformationDimensionMapping(self, transformationDimensionMapping): self.transformationDimensionMapping = transformationDimensionMapping
    def add_transformationDimensionMapping(self, value): self.transformationDimensionMapping.append(value)
    def insert_transformationDimensionMapping_at(self, index, value): self.transformationDimensionMapping.insert(index, value)
    def replace_transformationDimensionMapping_at(self, index, value): self.transformationDimensionMapping[index] = value
    def hasContent_(self):
        if (
            self.checkPointAvailability is not None or
            self.checkPointDescription is not None or
            self.cornerPoints or
            self.centerPoint is not None or
            self.pointInPixel is not None or
            self.transformationDimensionDescription is not None or
            self.transformationDimensionMapping or
            super(MD_Georectified_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Georectified_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Georectified_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Georectified_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Georectified_Type'):
        super(MD_Georectified_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Georectified_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Georectified_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Georectified_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.checkPointAvailability is not None:
            self.checkPointAvailability.export(outfile, level, namespace_, name_='checkPointAvailability', pretty_print=pretty_print)
        if self.checkPointDescription is not None:
            self.checkPointDescription.export(outfile, level, namespace_, name_='checkPointDescription', pretty_print=pretty_print)
        for cornerPoints_ in self.cornerPoints:
            cornerPoints_.export(outfile, level, namespace_, name_='cornerPoints', pretty_print=pretty_print)
        if self.centerPoint is not None:
            self.centerPoint.export(outfile, level, namespace_, name_='centerPoint', pretty_print=pretty_print)
        if self.pointInPixel is not None:
            self.pointInPixel.export(outfile, level, namespace_, name_='pointInPixel', pretty_print=pretty_print)
        if self.transformationDimensionDescription is not None:
            self.transformationDimensionDescription.export(outfile, level, namespace_, name_='transformationDimensionDescription', pretty_print=pretty_print)
        for transformationDimensionMapping_ in self.transformationDimensionMapping:
            transformationDimensionMapping_.export(outfile, level, namespace_, name_='transformationDimensionMapping', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Georectified_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Georectified_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Georectified_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.checkPointAvailability is not None:
            showIndent(outfile, level)
            outfile.write('checkPointAvailability=model_.Boolean_PropertyType(\n')
            self.checkPointAvailability.exportLiteral(outfile, level, name_='checkPointAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.checkPointDescription is not None:
            showIndent(outfile, level)
            outfile.write('checkPointDescription=model_.CharacterString_PropertyType(\n')
            self.checkPointDescription.exportLiteral(outfile, level, name_='checkPointDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('cornerPoints=[\n')
        level += 1
        for cornerPoints_ in self.cornerPoints:
            showIndent(outfile, level)
            outfile.write('model_.GM_Point_PropertyType(\n')
            cornerPoints_.exportLiteral(outfile, level, name_='GM_Point_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.centerPoint is not None:
            showIndent(outfile, level)
            outfile.write('centerPoint=model_.GM_Point_PropertyType(\n')
            self.centerPoint.exportLiteral(outfile, level, name_='centerPoint')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pointInPixel is not None:
            showIndent(outfile, level)
            outfile.write('pointInPixel=model_.MD_PixelOrientationCode_PropertyType(\n')
            self.pointInPixel.exportLiteral(outfile, level, name_='pointInPixel')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.transformationDimensionDescription is not None:
            showIndent(outfile, level)
            outfile.write('transformationDimensionDescription=model_.CharacterString_PropertyType(\n')
            self.transformationDimensionDescription.exportLiteral(outfile, level, name_='transformationDimensionDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('transformationDimensionMapping=[\n')
        level += 1
        for transformationDimensionMapping_ in self.transformationDimensionMapping:
            showIndent(outfile, level)
            outfile.write('model_.CharacterString_PropertyType(\n')
            transformationDimensionMapping_.exportLiteral(outfile, level, name_='CharacterString_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Georectified_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'checkPointAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.checkPointAvailability = obj_
            obj_.original_tagname_ = 'checkPointAvailability'
        elif nodeName_ == 'checkPointDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.checkPointDescription = obj_
            obj_.original_tagname_ = 'checkPointDescription'
        elif nodeName_ == 'cornerPoints':
            obj_ = GM_Point_PropertyType.factory()
            obj_.build(child_)
            self.cornerPoints.append(obj_)
            obj_.original_tagname_ = 'cornerPoints'
        elif nodeName_ == 'centerPoint':
            obj_ = GM_Point_PropertyType.factory()
            obj_.build(child_)
            self.centerPoint = obj_
            obj_.original_tagname_ = 'centerPoint'
        elif nodeName_ == 'pointInPixel':
            obj_ = MD_PixelOrientationCode_PropertyType.factory()
            obj_.build(child_)
            self.pointInPixel = obj_
            obj_.original_tagname_ = 'pointInPixel'
        elif nodeName_ == 'transformationDimensionDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.transformationDimensionDescription = obj_
            obj_.original_tagname_ = 'transformationDimensionDescription'
        elif nodeName_ == 'transformationDimensionMapping':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.transformationDimensionMapping.append(obj_)
            obj_.original_tagname_ = 'transformationDimensionMapping'
        super(MD_Georectified_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Georectified_Type


class MD_Georeferenceable_Type(MD_GridSpatialRepresentation_Type):
    subclass = None
    superclass = MD_GridSpatialRepresentation_Type
    def __init__(self, id=None, uuid=None, numberOfDimensions=None, axisDimensionProperties=None, cellGeometry=None, transformationParameterAvailability=None, controlPointAvailability=None, orientationParameterAvailability=None, orientationParameterDescription=None, georeferencedParameters=None, parameterCitation=None):
        self.original_tagname_ = None
        super(MD_Georeferenceable_Type, self).__init__(id, uuid, numberOfDimensions, axisDimensionProperties, cellGeometry, transformationParameterAvailability, )
        self.controlPointAvailability = controlPointAvailability
        self.orientationParameterAvailability = orientationParameterAvailability
        self.orientationParameterDescription = orientationParameterDescription
        self.georeferencedParameters = georeferencedParameters
        if parameterCitation is None:
            self.parameterCitation = []
        else:
            self.parameterCitation = parameterCitation
    def factory(*args_, **kwargs_):
        if MD_Georeferenceable_Type.subclass:
            return MD_Georeferenceable_Type.subclass(*args_, **kwargs_)
        else:
            return MD_Georeferenceable_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_controlPointAvailability(self): return self.controlPointAvailability
    def set_controlPointAvailability(self, controlPointAvailability): self.controlPointAvailability = controlPointAvailability
    def get_orientationParameterAvailability(self): return self.orientationParameterAvailability
    def set_orientationParameterAvailability(self, orientationParameterAvailability): self.orientationParameterAvailability = orientationParameterAvailability
    def get_orientationParameterDescription(self): return self.orientationParameterDescription
    def set_orientationParameterDescription(self, orientationParameterDescription): self.orientationParameterDescription = orientationParameterDescription
    def get_georeferencedParameters(self): return self.georeferencedParameters
    def set_georeferencedParameters(self, georeferencedParameters): self.georeferencedParameters = georeferencedParameters
    def get_parameterCitation(self): return self.parameterCitation
    def set_parameterCitation(self, parameterCitation): self.parameterCitation = parameterCitation
    def add_parameterCitation(self, value): self.parameterCitation.append(value)
    def insert_parameterCitation_at(self, index, value): self.parameterCitation.insert(index, value)
    def replace_parameterCitation_at(self, index, value): self.parameterCitation[index] = value
    def hasContent_(self):
        if (
            self.controlPointAvailability is not None or
            self.orientationParameterAvailability is not None or
            self.orientationParameterDescription is not None or
            self.georeferencedParameters is not None or
            self.parameterCitation or
            super(MD_Georeferenceable_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MD_Georeferenceable_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Georeferenceable_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MD_Georeferenceable_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MD_Georeferenceable_Type'):
        super(MD_Georeferenceable_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MD_Georeferenceable_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MD_Georeferenceable_Type', fromsubclass_=False, pretty_print=True):
        super(MD_Georeferenceable_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.controlPointAvailability is not None:
            self.controlPointAvailability.export(outfile, level, namespace_, name_='controlPointAvailability', pretty_print=pretty_print)
        if self.orientationParameterAvailability is not None:
            self.orientationParameterAvailability.export(outfile, level, namespace_, name_='orientationParameterAvailability', pretty_print=pretty_print)
        if self.orientationParameterDescription is not None:
            self.orientationParameterDescription.export(outfile, level, namespace_, name_='orientationParameterDescription', pretty_print=pretty_print)
        if self.georeferencedParameters is not None:
            self.georeferencedParameters.export(outfile, level, namespace_, name_='georeferencedParameters', pretty_print=pretty_print)
        for parameterCitation_ in self.parameterCitation:
            parameterCitation_.export(outfile, level, namespace_, name_='parameterCitation', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MD_Georeferenceable_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MD_Georeferenceable_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MD_Georeferenceable_Type, self).exportLiteralChildren(outfile, level, name_)
        if self.controlPointAvailability is not None:
            showIndent(outfile, level)
            outfile.write('controlPointAvailability=model_.Boolean_PropertyType(\n')
            self.controlPointAvailability.exportLiteral(outfile, level, name_='controlPointAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.orientationParameterAvailability is not None:
            showIndent(outfile, level)
            outfile.write('orientationParameterAvailability=model_.Boolean_PropertyType(\n')
            self.orientationParameterAvailability.exportLiteral(outfile, level, name_='orientationParameterAvailability')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.orientationParameterDescription is not None:
            showIndent(outfile, level)
            outfile.write('orientationParameterDescription=model_.CharacterString_PropertyType(\n')
            self.orientationParameterDescription.exportLiteral(outfile, level, name_='orientationParameterDescription')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.georeferencedParameters is not None:
            showIndent(outfile, level)
            outfile.write('georeferencedParameters=model_.Record_PropertyType(\n')
            self.georeferencedParameters.exportLiteral(outfile, level, name_='georeferencedParameters')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('parameterCitation=[\n')
        level += 1
        for parameterCitation_ in self.parameterCitation:
            showIndent(outfile, level)
            outfile.write('model_.CI_Citation_PropertyType(\n')
            parameterCitation_.exportLiteral(outfile, level, name_='CI_Citation_PropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MD_Georeferenceable_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'controlPointAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.controlPointAvailability = obj_
            obj_.original_tagname_ = 'controlPointAvailability'
        elif nodeName_ == 'orientationParameterAvailability':
            obj_ = Boolean_PropertyType.factory()
            obj_.build(child_)
            self.orientationParameterAvailability = obj_
            obj_.original_tagname_ = 'orientationParameterAvailability'
        elif nodeName_ == 'orientationParameterDescription':
            class_obj_ = self.get_class_obj_(child_, CharacterString_PropertyType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.orientationParameterDescription = obj_
            obj_.original_tagname_ = 'orientationParameterDescription'
        elif nodeName_ == 'georeferencedParameters':
            obj_ = Record_PropertyType.factory()
            obj_.build(child_)
            self.georeferencedParameters = obj_
            obj_.original_tagname_ = 'georeferencedParameters'
        elif nodeName_ == 'parameterCitation':
            obj_ = CI_Citation_PropertyType.factory()
            obj_.build(child_)
            self.parameterCitation.append(obj_)
            obj_.original_tagname_ = 'parameterCitation'
        super(MD_Georeferenceable_Type, self).buildChildren(child_, node, nodeName_, True)
# end class MD_Georeferenceable_Type


class DS_Initiative_Type(AbstractDS_Aggregate_Type):
    subclass = None
    superclass = AbstractDS_Aggregate_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None):
        self.original_tagname_ = None
        super(DS_Initiative_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, )
    def factory(*args_, **kwargs_):
        if DS_Initiative_Type.subclass:
            return DS_Initiative_Type.subclass(*args_, **kwargs_)
        else:
            return DS_Initiative_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DS_Initiative_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Initiative_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Initiative_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Initiative_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Initiative_Type'):
        super(DS_Initiative_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Initiative_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Initiative_Type', fromsubclass_=False, pretty_print=True):
        super(DS_Initiative_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Initiative_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_Initiative_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_Initiative_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_Initiative_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_Initiative_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_Initiative_Type


class DS_Series_Type(AbstractDS_Aggregate_Type):
    subclass = None
    superclass = AbstractDS_Aggregate_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None, extensiontype_=None):
        self.original_tagname_ = None
        super(DS_Series_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DS_Series_Type.subclass:
            return DS_Series_Type.subclass(*args_, **kwargs_)
        else:
            return DS_Series_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(DS_Series_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Series_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Series_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Series_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Series_Type'):
        super(DS_Series_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Series_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Series_Type', fromsubclass_=False, pretty_print=True):
        super(DS_Series_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Series_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_Series_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_Series_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(DS_Series_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_Series_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_Series_Type


class DS_OtherAggregate_Type(AbstractDS_Aggregate_Type):
    subclass = None
    superclass = AbstractDS_Aggregate_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None, extensiontype_=None):
        self.original_tagname_ = None
        super(DS_OtherAggregate_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if DS_OtherAggregate_Type.subclass:
            return DS_OtherAggregate_Type.subclass(*args_, **kwargs_)
        else:
            return DS_OtherAggregate_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(DS_OtherAggregate_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_OtherAggregate_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_OtherAggregate_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_OtherAggregate_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_OtherAggregate_Type'):
        super(DS_OtherAggregate_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_OtherAggregate_Type')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_OtherAggregate_Type', fromsubclass_=False, pretty_print=True):
        super(DS_OtherAggregate_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_OtherAggregate_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_OtherAggregate_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_OtherAggregate_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(DS_OtherAggregate_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_OtherAggregate_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_OtherAggregate_Type


class AffineCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(AffineCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if AffineCSType.subclass:
            return AffineCSType.subclass(*args_, **kwargs_)
        else:
            return AffineCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(AffineCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AffineCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AffineCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AffineCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AffineCSType'):
        super(AffineCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AffineCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AffineCSType', fromsubclass_=False, pretty_print=True):
        super(AffineCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AffineCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AffineCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AffineCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(AffineCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AffineCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AffineCSType


class CylindricalCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(CylindricalCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if CylindricalCSType.subclass:
            return CylindricalCSType.subclass(*args_, **kwargs_)
        else:
            return CylindricalCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(CylindricalCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CylindricalCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CylindricalCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CylindricalCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CylindricalCSType'):
        super(CylindricalCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CylindricalCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CylindricalCSType', fromsubclass_=False, pretty_print=True):
        super(CylindricalCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CylindricalCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CylindricalCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CylindricalCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CylindricalCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(CylindricalCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class CylindricalCSType


class PolarCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(PolarCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if PolarCSType.subclass:
            return PolarCSType.subclass(*args_, **kwargs_)
        else:
            return PolarCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(PolarCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PolarCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PolarCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PolarCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PolarCSType'):
        super(PolarCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PolarCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PolarCSType', fromsubclass_=False, pretty_print=True):
        super(PolarCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PolarCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PolarCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PolarCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PolarCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(PolarCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class PolarCSType


class SphericalCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(SphericalCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if SphericalCSType.subclass:
            return SphericalCSType.subclass(*args_, **kwargs_)
        else:
            return SphericalCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(SphericalCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SphericalCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SphericalCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SphericalCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SphericalCSType'):
        super(SphericalCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SphericalCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SphericalCSType', fromsubclass_=False, pretty_print=True):
        super(SphericalCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SphericalCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(SphericalCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(SphericalCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(SphericalCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(SphericalCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class SphericalCSType


class UserDefinedCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(UserDefinedCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if UserDefinedCSType.subclass:
            return UserDefinedCSType.subclass(*args_, **kwargs_)
        else:
            return UserDefinedCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(UserDefinedCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='UserDefinedCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='UserDefinedCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='UserDefinedCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='UserDefinedCSType'):
        super(UserDefinedCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='UserDefinedCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='UserDefinedCSType', fromsubclass_=False, pretty_print=True):
        super(UserDefinedCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='UserDefinedCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(UserDefinedCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(UserDefinedCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(UserDefinedCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(UserDefinedCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class UserDefinedCSType


class LinearCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(LinearCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if LinearCSType.subclass:
            return LinearCSType.subclass(*args_, **kwargs_)
        else:
            return LinearCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(LinearCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LinearCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LinearCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LinearCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LinearCSType'):
        super(LinearCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LinearCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LinearCSType', fromsubclass_=False, pretty_print=True):
        super(LinearCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LinearCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LinearCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LinearCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LinearCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(LinearCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class LinearCSType


class TimeCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(TimeCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if TimeCSType.subclass:
            return TimeCSType.subclass(*args_, **kwargs_)
        else:
            return TimeCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(TimeCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TimeCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TimeCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TimeCSType'):
        super(TimeCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TimeCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TimeCSType', fromsubclass_=False, pretty_print=True):
        super(TimeCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TimeCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TimeCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TimeCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TimeCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(TimeCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class TimeCSType


class VerticalCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(VerticalCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if VerticalCSType.subclass:
            return VerticalCSType.subclass(*args_, **kwargs_)
        else:
            return VerticalCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(VerticalCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='VerticalCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='VerticalCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='VerticalCSType'):
        super(VerticalCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='VerticalCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='VerticalCSType', fromsubclass_=False, pretty_print=True):
        super(VerticalCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='VerticalCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(VerticalCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(VerticalCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(VerticalCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(VerticalCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class VerticalCSType


class CartesianCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(CartesianCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if CartesianCSType.subclass:
            return CartesianCSType.subclass(*args_, **kwargs_)
        else:
            return CartesianCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(CartesianCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CartesianCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CartesianCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CartesianCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CartesianCSType'):
        super(CartesianCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CartesianCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CartesianCSType', fromsubclass_=False, pretty_print=True):
        super(CartesianCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CartesianCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CartesianCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CartesianCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CartesianCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(CartesianCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class CartesianCSType


class EllipsoidalCSType(AbstractCoordinateSystemType):
    subclass = None
    superclass = AbstractCoordinateSystemType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, aggregationType=None, axis=None):
        self.original_tagname_ = None
        super(EllipsoidalCSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, aggregationType, axis, )
    def factory(*args_, **kwargs_):
        if EllipsoidalCSType.subclass:
            return EllipsoidalCSType.subclass(*args_, **kwargs_)
        else:
            return EllipsoidalCSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(EllipsoidalCSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EllipsoidalCSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EllipsoidalCSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EllipsoidalCSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EllipsoidalCSType'):
        super(EllipsoidalCSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EllipsoidalCSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EllipsoidalCSType', fromsubclass_=False, pretty_print=True):
        super(EllipsoidalCSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EllipsoidalCSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(EllipsoidalCSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EllipsoidalCSType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(EllipsoidalCSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(EllipsoidalCSType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class EllipsoidalCSType


class DerivedCRSType(AbstractGeneralDerivedCRSType):
    subclass = None
    superclass = AbstractGeneralDerivedCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, conversion=None, baseCRS=None, derivedCRSType=None, coordinateSystem=None):
        self.original_tagname_ = None
        super(DerivedCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, conversion, )
        self.baseCRS = baseCRS
        self.derivedCRSType = derivedCRSType
        self.coordinateSystem = coordinateSystem
    def factory(*args_, **kwargs_):
        if DerivedCRSType.subclass:
            return DerivedCRSType.subclass(*args_, **kwargs_)
        else:
            return DerivedCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_baseCRS(self): return self.baseCRS
    def set_baseCRS(self, baseCRS): self.baseCRS = baseCRS
    def get_derivedCRSType(self): return self.derivedCRSType
    def set_derivedCRSType(self, derivedCRSType): self.derivedCRSType = derivedCRSType
    def get_coordinateSystem(self): return self.coordinateSystem
    def set_coordinateSystem(self, coordinateSystem): self.coordinateSystem = coordinateSystem
    def hasContent_(self):
        if (
            self.baseCRS is not None or
            self.derivedCRSType is not None or
            self.coordinateSystem is not None or
            super(DerivedCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DerivedCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DerivedCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DerivedCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DerivedCRSType'):
        super(DerivedCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DerivedCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DerivedCRSType', fromsubclass_=False, pretty_print=True):
        super(DerivedCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.baseCRS is not None:
            self.baseCRS.export(outfile, level, namespace_='gml:', name_='baseCRS', pretty_print=pretty_print)
        if self.derivedCRSType is not None:
            self.derivedCRSType.export(outfile, level, namespace_='gml:', name_='derivedCRSType', pretty_print=pretty_print)
        if self.coordinateSystem is not None:
            self.coordinateSystem.export(outfile, level, namespace_='gml:', name_='coordinateSystem', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DerivedCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DerivedCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DerivedCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.baseCRS is not None:
            showIndent(outfile, level)
            outfile.write('baseCRS=model_.baseCRS(\n')
            self.baseCRS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.derivedCRSType is not None:
            showIndent(outfile, level)
            outfile.write('derivedCRSType=model_.derivedCRSType(\n')
            self.derivedCRSType.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinateSystem is not None:
            showIndent(outfile, level)
            outfile.write('coordinateSystem=model_.coordinateSystem(\n')
            self.coordinateSystem.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DerivedCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'baseCRS':
            obj_ = SingleCRSPropertyType.factory()
            obj_.build(child_)
            self.baseCRS = obj_
            obj_.original_tagname_ = 'baseCRS'
        elif nodeName_ == 'derivedCRSType':
            obj_ = CodeWithAuthorityType.factory()
            obj_.build(child_)
            self.derivedCRSType = obj_
            obj_.original_tagname_ = 'derivedCRSType'
        elif nodeName_ == 'coordinateSystem':
            obj_ = CoordinateSystemPropertyType.factory()
            obj_.build(child_)
            self.coordinateSystem = obj_
            obj_.original_tagname_ = 'coordinateSystem'
        elif nodeName_ == 'usesCS':
            obj_ = CoordinateSystemPropertyType.factory()
            obj_.build(child_)
            self.usesCS = obj_
            obj_.original_tagname_ = 'usesCS'
        super(DerivedCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class DerivedCRSType


class ProjectedCRSType(AbstractGeneralDerivedCRSType):
    subclass = None
    superclass = AbstractGeneralDerivedCRSType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, domainOfValidity=None, scope=None, conversion=None, baseGeodeticCRS=None, baseGeographicCRS=None, cartesianCS=None):
        self.original_tagname_ = None
        super(ProjectedCRSType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, domainOfValidity, scope, conversion, )
        self.baseGeodeticCRS = baseGeodeticCRS
        self.baseGeographicCRS = baseGeographicCRS
        self.cartesianCS = cartesianCS
    def factory(*args_, **kwargs_):
        if ProjectedCRSType.subclass:
            return ProjectedCRSType.subclass(*args_, **kwargs_)
        else:
            return ProjectedCRSType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_baseGeodeticCRS(self): return self.baseGeodeticCRS
    def set_baseGeodeticCRS(self, baseGeodeticCRS): self.baseGeodeticCRS = baseGeodeticCRS
    def get_baseGeographicCRS(self): return self.baseGeographicCRS
    def set_baseGeographicCRS(self, baseGeographicCRS): self.baseGeographicCRS = baseGeographicCRS
    def get_cartesianCS(self): return self.cartesianCS
    def set_cartesianCS(self, cartesianCS): self.cartesianCS = cartesianCS
    def hasContent_(self):
        if (
            self.baseGeodeticCRS is not None or
            self.baseGeographicCRS is not None or
            self.cartesianCS is not None or
            super(ProjectedCRSType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ProjectedCRSType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ProjectedCRSType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ProjectedCRSType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ProjectedCRSType'):
        super(ProjectedCRSType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ProjectedCRSType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ProjectedCRSType', fromsubclass_=False, pretty_print=True):
        super(ProjectedCRSType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.baseGeodeticCRS is not None:
            self.baseGeodeticCRS.export(outfile, level, namespace_='gml:', name_='baseGeodeticCRS', pretty_print=pretty_print)
        if self.baseGeographicCRS is not None:
            self.baseGeographicCRS.export(outfile, level, namespace_='gml:', name_='baseGeographicCRS', pretty_print=pretty_print)
        if self.cartesianCS is not None:
            self.cartesianCS.export(outfile, level, namespace_='gml:', name_='cartesianCS', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ProjectedCRSType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ProjectedCRSType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ProjectedCRSType, self).exportLiteralChildren(outfile, level, name_)
        if self.baseGeodeticCRS is not None:
            showIndent(outfile, level)
            outfile.write('baseGeodeticCRS=model_.baseGeodeticCRS(\n')
            self.baseGeodeticCRS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.baseGeographicCRS is not None:
            showIndent(outfile, level)
            outfile.write('baseGeographicCRS=model_.baseGeographicCRS(\n')
            self.baseGeographicCRS.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cartesianCS is not None:
            showIndent(outfile, level)
            outfile.write('cartesianCS=model_.CartesianCSPropertyType(\n')
            self.cartesianCS.exportLiteral(outfile, level, name_='cartesianCS')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ProjectedCRSType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'baseGeodeticCRS':
            obj_ = GeodeticCRSPropertyType.factory()
            obj_.build(child_)
            self.baseGeodeticCRS = obj_
            obj_.original_tagname_ = 'baseGeodeticCRS'
        elif nodeName_ == 'baseGeographicCRS':
            obj_ = GeographicCRSPropertyType.factory()
            obj_.build(child_)
            self.baseGeographicCRS = obj_
            obj_.original_tagname_ = 'baseGeographicCRS'
        elif nodeName_ == 'cartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.cartesianCS = obj_
            obj_.original_tagname_ = 'cartesianCS'
        elif nodeName_ == 'usesCartesianCS':
            obj_ = CartesianCSPropertyType.factory()
            obj_.build(child_)
            self.usesCartesianCS = obj_
            obj_.original_tagname_ = 'usesCartesianCS'
        super(ProjectedCRSType, self).buildChildren(child_, node, nodeName_, True)
# end class ProjectedCRSType


class GridType(AbstractGeometryType):
    subclass = None
    superclass = AbstractGeometryType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, dimension=None, limits=None, axisName=None, extensiontype_=None):
        self.original_tagname_ = None
        super(GridType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.dimension = _cast(int, dimension)
        self.limits = limits
        self.axisLabels = axisLabels
        if axisName is None:
            self.axisName = []
        else:
            self.axisName = axisName
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if GridType.subclass:
            return GridType.subclass(*args_, **kwargs_)
        else:
            return GridType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_limits(self): return self.limits
    def set_limits(self, limits): self.limits = limits
    def get_axisLabels(self): return self.axisLabels
    def set_axisLabels(self, axisLabels): self.axisLabels = axisLabels
    def get_axisName(self): return self.axisName
    def set_axisName(self, axisName): self.axisName = axisName
    def add_axisName(self, value): self.axisName.append(value)
    def insert_axisName_at(self, index, value): self.axisName.insert(index, value)
    def replace_axisName_at(self, index, value): self.axisName[index] = value
    def get_dimension(self): return self.dimension
    def set_dimension(self, dimension): self.dimension = dimension
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def validate_NCNameList(self, value):
        # Validate type NCNameList, a restriction on NCName.
        pass
    def hasContent_(self):
        if (
            self.limits is not None or
            self.axisLabels is not None or
            self.axisName or
            super(GridType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='GridType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GridType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='GridType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='GridType'):
        super(GridType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GridType')
        if self.dimension is not None and 'dimension' not in already_processed:
            already_processed.add('dimension')
            outfile.write(' dimension="%s"' % self.gds_format_integer(self.dimension, input_name='dimension'))
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='GridType', fromsubclass_=False, pretty_print=True):
        super(GridType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.limits is not None:
            self.limits.export(outfile, level, namespace_, name_='limits', pretty_print=pretty_print)
        if self.axisLabels is not None:
            self.axisLabels.export(outfile, level, namespace_, name_='axisLabels', pretty_print=pretty_print)
        for axisName_ in self.axisName:
            showIndent(outfile, level, pretty_print)
            outfile.write('<%saxisName>%s</%saxisName>%s' % (namespace_, self.gds_format_string(quote_xml(axisName_).encode(ExternalEncoding), input_name='axisName'), namespace_, eol_))
    def exportLiteral(self, outfile, level, name_='GridType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.dimension is not None and 'dimension' not in already_processed:
            already_processed.add('dimension')
            showIndent(outfile, level)
            outfile.write('dimension=%d,\n' % (self.dimension,))
        super(GridType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(GridType, self).exportLiteralChildren(outfile, level, name_)
        if self.limits is not None:
            showIndent(outfile, level)
            outfile.write('limits=model_.GridLimitsType(\n')
            self.limits.exportLiteral(outfile, level, name_='limits')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.axisLabels is not None:
            showIndent(outfile, level)
            outfile.write('axisLabels=model_.NCName(\n')
            self.axisLabels.exportLiteral(outfile, level, name_='axisLabels')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('axisName=[\n')
        level += 1
        for axisName_ in self.axisName:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(axisName_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('dimension', node)
        if value is not None and 'dimension' not in already_processed:
            already_processed.add('dimension')
            try:
                self.dimension = int(value)
            except ValueError as exp:
                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
            if self.dimension <= 0:
                raise_parse_error(node, 'Invalid PositiveInteger')
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(GridType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'limits':
            obj_ = GridLimitsType.factory()
            obj_.build(child_)
            self.limits = obj_
            obj_.original_tagname_ = 'limits'
        elif nodeName_ == 'axisLabels':
            axisLabels_ = child_.text
            self.axisLabels = axisLabels_
            self.axisLabels = self.axisLabels.split()
            self.validate_NCNameList(self.axisLabels)    # validate type NCNameList
        elif nodeName_ == 'axisName':
            axisName_ = child_.text
            axisName_ = self.gds_validate_string(axisName_, node, 'axisName')
            self.axisName.append(axisName_)
        super(GridType, self).buildChildren(child_, node, nodeName_, True)
# end class GridType


class AbstractContinuousCoverageType(AbstractCoverageType):
    subclass = None
    superclass = AbstractCoverageType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, domainSet=None, rangeSet=None, coverageFunction=None):
        self.original_tagname_ = None
        super(AbstractContinuousCoverageType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, domainSet, rangeSet, )
        self.coverageFunction = coverageFunction
    def factory(*args_, **kwargs_):
        if AbstractContinuousCoverageType.subclass:
            return AbstractContinuousCoverageType.subclass(*args_, **kwargs_)
        else:
            return AbstractContinuousCoverageType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_coverageFunction(self): return self.coverageFunction
    def set_coverageFunction(self, coverageFunction): self.coverageFunction = coverageFunction
    def hasContent_(self):
        if (
            self.coverageFunction is not None or
            super(AbstractContinuousCoverageType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractContinuousCoverageType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractContinuousCoverageType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractContinuousCoverageType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractContinuousCoverageType'):
        super(AbstractContinuousCoverageType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractContinuousCoverageType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractContinuousCoverageType', fromsubclass_=False, pretty_print=True):
        super(AbstractContinuousCoverageType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.coverageFunction is not None:
            self.coverageFunction.export(outfile, level, namespace_='gml:', name_='coverageFunction', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractContinuousCoverageType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractContinuousCoverageType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractContinuousCoverageType, self).exportLiteralChildren(outfile, level, name_)
        if self.coverageFunction is not None:
            showIndent(outfile, level)
            outfile.write('coverageFunction=model_.coverageFunction(\n')
            self.coverageFunction.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(AbstractContinuousCoverageType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'coverageFunction':
            obj_ = CoverageFunctionType.factory()
            obj_.build(child_)
            self.coverageFunction = obj_
            obj_.original_tagname_ = 'coverageFunction'
        super(AbstractContinuousCoverageType, self).buildChildren(child_, node, nodeName_, True)
# end class AbstractContinuousCoverageType


class DiscreteCoverageType(AbstractCoverageType):
    subclass = None
    superclass = AbstractCoverageType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, domainSet=None, rangeSet=None, coverageFunction=None):
        self.original_tagname_ = None
        super(DiscreteCoverageType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, domainSet, rangeSet, )
        self.coverageFunction = coverageFunction
    def factory(*args_, **kwargs_):
        if DiscreteCoverageType.subclass:
            return DiscreteCoverageType.subclass(*args_, **kwargs_)
        else:
            return DiscreteCoverageType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_coverageFunction(self): return self.coverageFunction
    def set_coverageFunction(self, coverageFunction): self.coverageFunction = coverageFunction
    def hasContent_(self):
        if (
            self.coverageFunction is not None or
            super(DiscreteCoverageType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DiscreteCoverageType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DiscreteCoverageType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DiscreteCoverageType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DiscreteCoverageType'):
        super(DiscreteCoverageType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DiscreteCoverageType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DiscreteCoverageType', fromsubclass_=False, pretty_print=True):
        super(DiscreteCoverageType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.coverageFunction is not None:
            self.coverageFunction.export(outfile, level, namespace_='gml:', name_='coverageFunction', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DiscreteCoverageType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DiscreteCoverageType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DiscreteCoverageType, self).exportLiteralChildren(outfile, level, name_)
        if self.coverageFunction is not None:
            showIndent(outfile, level)
            outfile.write('coverageFunction=model_.coverageFunction(\n')
            self.coverageFunction.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DiscreteCoverageType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'coverageFunction':
            obj_ = CoverageFunctionType.factory()
            obj_.build(child_)
            self.coverageFunction = obj_
            obj_.original_tagname_ = 'coverageFunction'
        super(DiscreteCoverageType, self).buildChildren(child_, node, nodeName_, True)
# end class DiscreteCoverageType


class ConventionalUnitType(UnitDefinitionType):
    subclass = None
    superclass = UnitDefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, quantityType=None, quantityTypeReference=None, catalogSymbol=None, conversionToPreferredUnit=None, roughConversionToPreferredUnit=None, derivationUnitTerm=None):
        self.original_tagname_ = None
        super(ConventionalUnitType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, quantityType, quantityTypeReference, catalogSymbol, )
        self.conversionToPreferredUnit = conversionToPreferredUnit
        self.roughConversionToPreferredUnit = roughConversionToPreferredUnit
        if derivationUnitTerm is None:
            self.derivationUnitTerm = []
        else:
            self.derivationUnitTerm = derivationUnitTerm
    def factory(*args_, **kwargs_):
        if ConventionalUnitType.subclass:
            return ConventionalUnitType.subclass(*args_, **kwargs_)
        else:
            return ConventionalUnitType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_conversionToPreferredUnit(self): return self.conversionToPreferredUnit
    def set_conversionToPreferredUnit(self, conversionToPreferredUnit): self.conversionToPreferredUnit = conversionToPreferredUnit
    def get_roughConversionToPreferredUnit(self): return self.roughConversionToPreferredUnit
    def set_roughConversionToPreferredUnit(self, roughConversionToPreferredUnit): self.roughConversionToPreferredUnit = roughConversionToPreferredUnit
    def get_derivationUnitTerm(self): return self.derivationUnitTerm
    def set_derivationUnitTerm(self, derivationUnitTerm): self.derivationUnitTerm = derivationUnitTerm
    def add_derivationUnitTerm(self, value): self.derivationUnitTerm.append(value)
    def insert_derivationUnitTerm_at(self, index, value): self.derivationUnitTerm.insert(index, value)
    def replace_derivationUnitTerm_at(self, index, value): self.derivationUnitTerm[index] = value
    def hasContent_(self):
        if (
            self.conversionToPreferredUnit is not None or
            self.roughConversionToPreferredUnit is not None or
            self.derivationUnitTerm or
            super(ConventionalUnitType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='ConventionalUnitType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ConventionalUnitType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='ConventionalUnitType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='ConventionalUnitType'):
        super(ConventionalUnitType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ConventionalUnitType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='ConventionalUnitType', fromsubclass_=False, pretty_print=True):
        super(ConventionalUnitType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.conversionToPreferredUnit is not None:
            self.conversionToPreferredUnit.export(outfile, level, namespace_='gml:', name_='conversionToPreferredUnit', pretty_print=pretty_print)
        if self.roughConversionToPreferredUnit is not None:
            self.roughConversionToPreferredUnit.export(outfile, level, namespace_='gml:', name_='roughConversionToPreferredUnit', pretty_print=pretty_print)
        for derivationUnitTerm_ in self.derivationUnitTerm:
            derivationUnitTerm_.export(outfile, level, namespace_='gml:', name_='derivationUnitTerm', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='ConventionalUnitType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(ConventionalUnitType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(ConventionalUnitType, self).exportLiteralChildren(outfile, level, name_)
        if self.conversionToPreferredUnit is not None:
            showIndent(outfile, level)
            outfile.write('conversionToPreferredUnit=model_.conversionToPreferredUnit(\n')
            self.conversionToPreferredUnit.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.roughConversionToPreferredUnit is not None:
            showIndent(outfile, level)
            outfile.write('roughConversionToPreferredUnit=model_.roughConversionToPreferredUnit(\n')
            self.roughConversionToPreferredUnit.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('derivationUnitTerm=[\n')
        level += 1
        for derivationUnitTerm_ in self.derivationUnitTerm:
            showIndent(outfile, level)
            outfile.write('model_.DerivationUnitTermType(\n')
            derivationUnitTerm_.exportLiteral(outfile, level, name_='DerivationUnitTermType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(ConventionalUnitType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'conversionToPreferredUnit':
            obj_ = ConversionToPreferredUnitType.factory()
            obj_.build(child_)
            self.conversionToPreferredUnit = obj_
            obj_.original_tagname_ = 'conversionToPreferredUnit'
        elif nodeName_ == 'roughConversionToPreferredUnit':
            obj_ = ConversionToPreferredUnitType.factory()
            obj_.build(child_)
            self.roughConversionToPreferredUnit = obj_
            obj_.original_tagname_ = 'roughConversionToPreferredUnit'
        elif nodeName_ == 'derivationUnitTerm':
            obj_ = DerivationUnitTermType.factory()
            obj_.build(child_)
            self.derivationUnitTerm.append(obj_)
            obj_.original_tagname_ = 'derivationUnitTerm'
        super(ConventionalUnitType, self).buildChildren(child_, node, nodeName_, True)
# end class ConventionalUnitType


class DerivedUnitType(UnitDefinitionType):
    subclass = None
    superclass = UnitDefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, quantityType=None, quantityTypeReference=None, catalogSymbol=None, derivationUnitTerm=None):
        self.original_tagname_ = None
        super(DerivedUnitType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, quantityType, quantityTypeReference, catalogSymbol, )
        if derivationUnitTerm is None:
            self.derivationUnitTerm = []
        else:
            self.derivationUnitTerm = derivationUnitTerm
    def factory(*args_, **kwargs_):
        if DerivedUnitType.subclass:
            return DerivedUnitType.subclass(*args_, **kwargs_)
        else:
            return DerivedUnitType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_derivationUnitTerm(self): return self.derivationUnitTerm
    def set_derivationUnitTerm(self, derivationUnitTerm): self.derivationUnitTerm = derivationUnitTerm
    def add_derivationUnitTerm(self, value): self.derivationUnitTerm.append(value)
    def insert_derivationUnitTerm_at(self, index, value): self.derivationUnitTerm.insert(index, value)
    def replace_derivationUnitTerm_at(self, index, value): self.derivationUnitTerm[index] = value
    def hasContent_(self):
        if (
            self.derivationUnitTerm or
            super(DerivedUnitType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DerivedUnitType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DerivedUnitType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DerivedUnitType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DerivedUnitType'):
        super(DerivedUnitType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DerivedUnitType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DerivedUnitType', fromsubclass_=False, pretty_print=True):
        super(DerivedUnitType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for derivationUnitTerm_ in self.derivationUnitTerm:
            derivationUnitTerm_.export(outfile, level, namespace_='gml:', name_='derivationUnitTerm', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DerivedUnitType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DerivedUnitType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DerivedUnitType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('derivationUnitTerm=[\n')
        level += 1
        for derivationUnitTerm_ in self.derivationUnitTerm:
            showIndent(outfile, level)
            outfile.write('model_.derivationUnitTerm(\n')
            derivationUnitTerm_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DerivedUnitType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'derivationUnitTerm':
            obj_ = DerivationUnitTermType.factory()
            obj_.build(child_)
            self.derivationUnitTerm.append(obj_)
            obj_.original_tagname_ = 'derivationUnitTerm'
        super(DerivedUnitType, self).buildChildren(child_, node, nodeName_, True)
# end class DerivedUnitType


class BaseUnitType(UnitDefinitionType):
    subclass = None
    superclass = UnitDefinitionType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, remarks=None, quantityType=None, quantityTypeReference=None, catalogSymbol=None, unitsSystem=None):
        self.original_tagname_ = None
        super(BaseUnitType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, remarks, quantityType, quantityTypeReference, catalogSymbol, )
        self.unitsSystem = unitsSystem
    def factory(*args_, **kwargs_):
        if BaseUnitType.subclass:
            return BaseUnitType.subclass(*args_, **kwargs_)
        else:
            return BaseUnitType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_unitsSystem(self): return self.unitsSystem
    def set_unitsSystem(self, unitsSystem): self.unitsSystem = unitsSystem
    def hasContent_(self):
        if (
            self.unitsSystem is not None or
            super(BaseUnitType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='BaseUnitType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BaseUnitType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='BaseUnitType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='BaseUnitType'):
        super(BaseUnitType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='BaseUnitType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='BaseUnitType', fromsubclass_=False, pretty_print=True):
        super(BaseUnitType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.unitsSystem is not None:
            self.unitsSystem.export(outfile, level, namespace_, name_='unitsSystem', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='BaseUnitType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(BaseUnitType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(BaseUnitType, self).exportLiteralChildren(outfile, level, name_)
        if self.unitsSystem is not None:
            showIndent(outfile, level)
            outfile.write('unitsSystem=model_.ReferenceType(\n')
            self.unitsSystem.exportLiteral(outfile, level, name_='unitsSystem')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(BaseUnitType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'unitsSystem':
            obj_ = ReferenceType.factory()
            obj_.build(child_)
            self.unitsSystem = obj_
            obj_.original_tagname_ = 'unitsSystem'
        super(BaseUnitType, self).buildChildren(child_, node, nodeName_, True)
# end class BaseUnitType


class AbstractGeometricPrimitiveType(AbstractGeometryType):
    """gml:AbstractGeometricPrimitiveType is the abstract root type of the
    geometric primitives. A geometric primitive is a geometric
    object that is not decomposed further into other primitives in
    the system. All primitives are oriented in the direction implied
    by the sequence of their coordinate tuples."""
    subclass = None
    superclass = AbstractGeometryType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractGeometricPrimitiveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractGeometricPrimitiveType.subclass:
            return AbstractGeometricPrimitiveType.subclass(*args_, **kwargs_)
        else:
            return AbstractGeometricPrimitiveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractGeometricPrimitiveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractGeometricPrimitiveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeometricPrimitiveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractGeometricPrimitiveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractGeometricPrimitiveType'):
        super(AbstractGeometricPrimitiveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractGeometricPrimitiveType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractGeometricPrimitiveType', fromsubclass_=False, pretty_print=True):
        super(AbstractGeometricPrimitiveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractGeometricPrimitiveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractGeometricPrimitiveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractGeometricPrimitiveType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractGeometricPrimitiveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractGeometricPrimitiveType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractGeometricPrimitiveType


class AbstractSurfaceType(AbstractGeometricPrimitiveType):
    """gml:AbstractSurfaceType is an abstraction of a surface to support
    the different levels of complexity. A surface is always a
    continuous region of a plane."""
    subclass = None
    superclass = AbstractGeometricPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractSurfaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractSurfaceType.subclass:
            return AbstractSurfaceType.subclass(*args_, **kwargs_)
        else:
            return AbstractSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractSurfaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractSurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractSurfaceType'):
        super(AbstractSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractSurfaceType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractSurfaceType', fromsubclass_=False, pretty_print=True):
        super(AbstractSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractSurfaceType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractSurfaceType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractSurfaceType


class AbstractSolidType(AbstractGeometricPrimitiveType):
    """gml:AbstractSolidType is an abstraction of a solid to support the
    different levels of complexity. The solid may always be viewed
    as a geometric primitive, i.e. is contiguous."""
    subclass = None
    superclass = AbstractGeometricPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractSolidType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractSolidType.subclass:
            return AbstractSolidType.subclass(*args_, **kwargs_)
        else:
            return AbstractSolidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractSolidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractSolidType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractSolidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractSolidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractSolidType'):
        super(AbstractSolidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractSolidType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractSolidType', fromsubclass_=False, pretty_print=True):
        super(AbstractSolidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractSolidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractSolidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractSolidType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractSolidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractSolidType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractSolidType


class OrientableSurfaceType(AbstractSurfaceType):
    subclass = None
    superclass = AbstractSurfaceType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, orientation='+', baseSurface=None):
        self.original_tagname_ = None
        super(OrientableSurfaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.orientation = _cast(None, orientation)
        self.baseSurface = baseSurface
    def factory(*args_, **kwargs_):
        if OrientableSurfaceType.subclass:
            return OrientableSurfaceType.subclass(*args_, **kwargs_)
        else:
            return OrientableSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_baseSurface(self): return self.baseSurface
    def set_baseSurface(self, baseSurface): self.baseSurface = baseSurface
    def get_orientation(self): return self.orientation
    def set_orientation(self, orientation): self.orientation = orientation
    def hasContent_(self):
        if (
            self.baseSurface is not None or
            super(OrientableSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OrientableSurfaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OrientableSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OrientableSurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OrientableSurfaceType'):
        super(OrientableSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='OrientableSurfaceType')
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            outfile.write(' orientation=%s' % (quote_attrib(self.orientation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OrientableSurfaceType', fromsubclass_=False, pretty_print=True):
        super(OrientableSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.baseSurface is not None:
            self.baseSurface.export(outfile, level, namespace_='gml:', name_='baseSurface', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OrientableSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            showIndent(outfile, level)
            outfile.write('orientation=%s,\n' % (self.orientation,))
        super(OrientableSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(OrientableSurfaceType, self).exportLiteralChildren(outfile, level, name_)
        if self.baseSurface is not None:
            showIndent(outfile, level)
            outfile.write('baseSurface=model_.baseSurface(\n')
            self.baseSurface.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('orientation', node)
        if value is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            self.orientation = value
        super(OrientableSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'baseSurface':
            obj_ = SurfacePropertyType.factory()
            obj_.build(child_)
            self.baseSurface = obj_
            obj_.original_tagname_ = 'baseSurface'
        super(OrientableSurfaceType, self).buildChildren(child_, node, nodeName_, True)
# end class OrientableSurfaceType


class SurfaceType(AbstractSurfaceType):
    subclass = None
    superclass = AbstractSurfaceType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, patches=None, extensiontype_=None):
        self.original_tagname_ = None
        super(SurfaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.patches = patches
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if SurfaceType.subclass:
            return SurfaceType.subclass(*args_, **kwargs_)
        else:
            return SurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_patches(self): return self.patches
    def set_patches(self, patches): self.patches = patches
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            self.patches is not None or
            super(SurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SurfaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SurfaceType'):
        super(SurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SurfaceType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SurfaceType', fromsubclass_=False, pretty_print=True):
        super(SurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.patches is not None:
            self.patches.export(outfile, level, namespace_='gml:', name_='patches', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(SurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(SurfaceType, self).exportLiteralChildren(outfile, level, name_)
        if self.patches is not None:
            showIndent(outfile, level)
            outfile.write('patches=model_.patches(\n')
            self.patches.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(SurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'patches':
            obj_ = SurfacePatchArrayPropertyType.factory()
            obj_.build(child_)
            self.patches = obj_
            obj_.original_tagname_ = 'patches'
        elif nodeName_ == 'polygonPatches':
            obj_ = SurfacePatchArrayPropertyType.factory()
            obj_.build(child_)
            self.polygonPatches = obj_
            obj_.original_tagname_ = 'polygonPatches'
        elif nodeName_ == 'trianglePatches':
            obj_ = SurfacePatchArrayPropertyType.factory()
            obj_.build(child_)
            self.trianglePatches = obj_
            obj_.original_tagname_ = 'trianglePatches'
        super(SurfaceType, self).buildChildren(child_, node, nodeName_, True)
# end class SurfaceType


class MultiSolidType(AbstractGeometricAggregateType):
    subclass = None
    superclass = AbstractGeometricAggregateType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, solidMember=None, solidMembers=None):
        self.original_tagname_ = None
        super(MultiSolidType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, aggregationType, )
        if solidMember is None:
            self.solidMember = []
        else:
            self.solidMember = solidMember
        self.solidMembers = solidMembers
    def factory(*args_, **kwargs_):
        if MultiSolidType.subclass:
            return MultiSolidType.subclass(*args_, **kwargs_)
        else:
            return MultiSolidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_solidMember(self): return self.solidMember
    def set_solidMember(self, solidMember): self.solidMember = solidMember
    def add_solidMember(self, value): self.solidMember.append(value)
    def insert_solidMember_at(self, index, value): self.solidMember.insert(index, value)
    def replace_solidMember_at(self, index, value): self.solidMember[index] = value
    def get_solidMembers(self): return self.solidMembers
    def set_solidMembers(self, solidMembers): self.solidMembers = solidMembers
    def hasContent_(self):
        if (
            self.solidMember or
            self.solidMembers is not None or
            super(MultiSolidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiSolidType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiSolidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiSolidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiSolidType'):
        super(MultiSolidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MultiSolidType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiSolidType', fromsubclass_=False, pretty_print=True):
        super(MultiSolidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for solidMember_ in self.solidMember:
            solidMember_.export(outfile, level, namespace_='gml:', name_='solidMember', pretty_print=pretty_print)
        if self.solidMembers is not None:
            self.solidMembers.export(outfile, level, namespace_='gml:', name_='solidMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiSolidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MultiSolidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MultiSolidType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('solidMember=[\n')
        level += 1
        for solidMember_ in self.solidMember:
            showIndent(outfile, level)
            outfile.write('model_.solidMember(\n')
            solidMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.solidMembers is not None:
            showIndent(outfile, level)
            outfile.write('solidMembers=model_.solidMembers(\n')
            self.solidMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MultiSolidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'solidMember':
            obj_ = SolidPropertyType.factory()
            obj_.build(child_)
            self.solidMember.append(obj_)
            obj_.original_tagname_ = 'solidMember'
        elif nodeName_ == 'solidMembers':
            obj_ = SolidArrayPropertyType.factory()
            obj_.build(child_)
            self.solidMembers = obj_
            obj_.original_tagname_ = 'solidMembers'
        super(MultiSolidType, self).buildChildren(child_, node, nodeName_, True)
# end class MultiSolidType


class MultiSurfaceType(AbstractGeometricAggregateType):
    subclass = None
    superclass = AbstractGeometricAggregateType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, surfaceMember=None, surfaceMembers=None):
        self.original_tagname_ = None
        super(MultiSurfaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, aggregationType, )
        if surfaceMember is None:
            self.surfaceMember = []
        else:
            self.surfaceMember = surfaceMember
        self.surfaceMembers = surfaceMembers
    def factory(*args_, **kwargs_):
        if MultiSurfaceType.subclass:
            return MultiSurfaceType.subclass(*args_, **kwargs_)
        else:
            return MultiSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_surfaceMember(self): return self.surfaceMember
    def set_surfaceMember(self, surfaceMember): self.surfaceMember = surfaceMember
    def add_surfaceMember(self, value): self.surfaceMember.append(value)
    def insert_surfaceMember_at(self, index, value): self.surfaceMember.insert(index, value)
    def replace_surfaceMember_at(self, index, value): self.surfaceMember[index] = value
    def get_surfaceMembers(self): return self.surfaceMembers
    def set_surfaceMembers(self, surfaceMembers): self.surfaceMembers = surfaceMembers
    def hasContent_(self):
        if (
            self.surfaceMember or
            self.surfaceMembers is not None or
            super(MultiSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiSurfaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiSurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiSurfaceType'):
        super(MultiSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MultiSurfaceType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiSurfaceType', fromsubclass_=False, pretty_print=True):
        super(MultiSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for surfaceMember_ in self.surfaceMember:
            surfaceMember_.export(outfile, level, namespace_='gml:', name_='surfaceMember', pretty_print=pretty_print)
        if self.surfaceMembers is not None:
            self.surfaceMembers.export(outfile, level, namespace_='gml:', name_='surfaceMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MultiSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MultiSurfaceType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('surfaceMember=[\n')
        level += 1
        for surfaceMember_ in self.surfaceMember:
            showIndent(outfile, level)
            outfile.write('model_.surfaceMember(\n')
            surfaceMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.surfaceMembers is not None:
            showIndent(outfile, level)
            outfile.write('surfaceMembers=model_.surfaceMembers(\n')
            self.surfaceMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MultiSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'surfaceMember':
            obj_ = SurfacePropertyType.factory()
            obj_.build(child_)
            self.surfaceMember.append(obj_)
            obj_.original_tagname_ = 'surfaceMember'
        elif nodeName_ == 'surfaceMembers':
            obj_ = SurfaceArrayPropertyType.factory()
            obj_.build(child_)
            self.surfaceMembers = obj_
            obj_.original_tagname_ = 'surfaceMembers'
        super(MultiSurfaceType, self).buildChildren(child_, node, nodeName_, True)
# end class MultiSurfaceType


class MultiCurveType(AbstractGeometricAggregateType):
    subclass = None
    superclass = AbstractGeometricAggregateType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, curveMember=None, curveMembers=None):
        self.original_tagname_ = None
        super(MultiCurveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, aggregationType, )
        if curveMember is None:
            self.curveMember = []
        else:
            self.curveMember = curveMember
        self.curveMembers = curveMembers
    def factory(*args_, **kwargs_):
        if MultiCurveType.subclass:
            return MultiCurveType.subclass(*args_, **kwargs_)
        else:
            return MultiCurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_curveMember(self): return self.curveMember
    def set_curveMember(self, curveMember): self.curveMember = curveMember
    def add_curveMember(self, value): self.curveMember.append(value)
    def insert_curveMember_at(self, index, value): self.curveMember.insert(index, value)
    def replace_curveMember_at(self, index, value): self.curveMember[index] = value
    def get_curveMembers(self): return self.curveMembers
    def set_curveMembers(self, curveMembers): self.curveMembers = curveMembers
    def hasContent_(self):
        if (
            self.curveMember or
            self.curveMembers is not None or
            super(MultiCurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiCurveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiCurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiCurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiCurveType'):
        super(MultiCurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MultiCurveType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiCurveType', fromsubclass_=False, pretty_print=True):
        super(MultiCurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for curveMember_ in self.curveMember:
            curveMember_.export(outfile, level, namespace_='gml:', name_='curveMember', pretty_print=pretty_print)
        if self.curveMembers is not None:
            self.curveMembers.export(outfile, level, namespace_='gml:', name_='curveMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiCurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MultiCurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MultiCurveType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('curveMember=[\n')
        level += 1
        for curveMember_ in self.curveMember:
            showIndent(outfile, level)
            outfile.write('model_.curveMember(\n')
            curveMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.curveMembers is not None:
            showIndent(outfile, level)
            outfile.write('curveMembers=model_.curveMembers(\n')
            self.curveMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MultiCurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'curveMember':
            obj_ = CurvePropertyType.factory()
            obj_.build(child_)
            self.curveMember.append(obj_)
            obj_.original_tagname_ = 'curveMember'
        elif nodeName_ == 'curveMembers':
            obj_ = CurveArrayPropertyType.factory()
            obj_.build(child_)
            self.curveMembers = obj_
            obj_.original_tagname_ = 'curveMembers'
        super(MultiCurveType, self).buildChildren(child_, node, nodeName_, True)
# end class MultiCurveType


class MultiPointType(AbstractGeometricAggregateType):
    subclass = None
    superclass = AbstractGeometricAggregateType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, pointMember=None, pointMembers=None):
        self.original_tagname_ = None
        super(MultiPointType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, aggregationType, )
        if pointMember is None:
            self.pointMember = []
        else:
            self.pointMember = pointMember
        self.pointMembers = pointMembers
    def factory(*args_, **kwargs_):
        if MultiPointType.subclass:
            return MultiPointType.subclass(*args_, **kwargs_)
        else:
            return MultiPointType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pointMember(self): return self.pointMember
    def set_pointMember(self, pointMember): self.pointMember = pointMember
    def add_pointMember(self, value): self.pointMember.append(value)
    def insert_pointMember_at(self, index, value): self.pointMember.insert(index, value)
    def replace_pointMember_at(self, index, value): self.pointMember[index] = value
    def get_pointMembers(self): return self.pointMembers
    def set_pointMembers(self, pointMembers): self.pointMembers = pointMembers
    def hasContent_(self):
        if (
            self.pointMember or
            self.pointMembers is not None or
            super(MultiPointType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiPointType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiPointType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiPointType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiPointType'):
        super(MultiPointType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MultiPointType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiPointType', fromsubclass_=False, pretty_print=True):
        super(MultiPointType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pointMember_ in self.pointMember:
            pointMember_.export(outfile, level, namespace_='gml:', name_='pointMember', pretty_print=pretty_print)
        if self.pointMembers is not None:
            self.pointMembers.export(outfile, level, namespace_='gml:', name_='pointMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiPointType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MultiPointType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MultiPointType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pointMember=[\n')
        level += 1
        for pointMember_ in self.pointMember:
            showIndent(outfile, level)
            outfile.write('model_.pointMember(\n')
            pointMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.pointMembers is not None:
            showIndent(outfile, level)
            outfile.write('pointMembers=model_.pointMembers(\n')
            self.pointMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MultiPointType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pointMember':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointMember.append(obj_)
            obj_.original_tagname_ = 'pointMember'
        elif nodeName_ == 'pointMembers':
            obj_ = PointArrayPropertyType.factory()
            obj_.build(child_)
            self.pointMembers = obj_
            obj_.original_tagname_ = 'pointMembers'
        super(MultiPointType, self).buildChildren(child_, node, nodeName_, True)
# end class MultiPointType


class MultiGeometryType(AbstractGeometricAggregateType):
    subclass = None
    superclass = AbstractGeometricAggregateType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, geometryMember=None, geometryMembers=None):
        self.original_tagname_ = None
        super(MultiGeometryType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, aggregationType, )
        if geometryMember is None:
            self.geometryMember = []
        else:
            self.geometryMember = geometryMember
        self.geometryMembers = geometryMembers
    def factory(*args_, **kwargs_):
        if MultiGeometryType.subclass:
            return MultiGeometryType.subclass(*args_, **kwargs_)
        else:
            return MultiGeometryType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_geometryMember(self): return self.geometryMember
    def set_geometryMember(self, geometryMember): self.geometryMember = geometryMember
    def add_geometryMember(self, value): self.geometryMember.append(value)
    def insert_geometryMember_at(self, index, value): self.geometryMember.insert(index, value)
    def replace_geometryMember_at(self, index, value): self.geometryMember[index] = value
    def get_geometryMembers(self): return self.geometryMembers
    def set_geometryMembers(self, geometryMembers): self.geometryMembers = geometryMembers
    def hasContent_(self):
        if (
            self.geometryMember or
            self.geometryMembers is not None or
            super(MultiGeometryType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='MultiGeometryType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MultiGeometryType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='MultiGeometryType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='MultiGeometryType'):
        super(MultiGeometryType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MultiGeometryType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='MultiGeometryType', fromsubclass_=False, pretty_print=True):
        super(MultiGeometryType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for geometryMember_ in self.geometryMember:
            geometryMember_.export(outfile, level, namespace_='gml:', name_='geometryMember', pretty_print=pretty_print)
        if self.geometryMembers is not None:
            self.geometryMembers.export(outfile, level, namespace_='gml:', name_='geometryMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='MultiGeometryType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(MultiGeometryType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(MultiGeometryType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('geometryMember=[\n')
        level += 1
        for geometryMember_ in self.geometryMember:
            showIndent(outfile, level)
            outfile.write('model_.geometryMember(\n')
            geometryMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.geometryMembers is not None:
            showIndent(outfile, level)
            outfile.write('geometryMembers=model_.geometryMembers(\n')
            self.geometryMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(MultiGeometryType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'geometryMember':
            obj_ = GeometryPropertyType.factory()
            obj_.build(child_)
            self.geometryMember.append(obj_)
            obj_.original_tagname_ = 'geometryMember'
        elif nodeName_ == 'geometryMembers':
            obj_ = GeometryArrayPropertyType.factory()
            obj_.build(child_)
            self.geometryMembers = obj_
            obj_.original_tagname_ = 'geometryMembers'
        super(MultiGeometryType, self).buildChildren(child_, node, nodeName_, True)
# end class MultiGeometryType


class CompositeSolidType(AbstractSolidType):
    subclass = None
    superclass = AbstractSolidType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, solidMember=None):
        self.original_tagname_ = None
        super(CompositeSolidType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.aggregationType = _cast(None, aggregationType)
        if solidMember is None:
            self.solidMember = []
        else:
            self.solidMember = solidMember
    def factory(*args_, **kwargs_):
        if CompositeSolidType.subclass:
            return CompositeSolidType.subclass(*args_, **kwargs_)
        else:
            return CompositeSolidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_solidMember(self): return self.solidMember
    def set_solidMember(self, solidMember): self.solidMember = solidMember
    def add_solidMember(self, value): self.solidMember.append(value)
    def insert_solidMember_at(self, index, value): self.solidMember.insert(index, value)
    def replace_solidMember_at(self, index, value): self.solidMember[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.solidMember or
            super(CompositeSolidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CompositeSolidType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeSolidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CompositeSolidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CompositeSolidType'):
        super(CompositeSolidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeSolidType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CompositeSolidType', fromsubclass_=False, pretty_print=True):
        super(CompositeSolidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for solidMember_ in self.solidMember:
            solidMember_.export(outfile, level, namespace_='gml:', name_='solidMember', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CompositeSolidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(CompositeSolidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CompositeSolidType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('solidMember=[\n')
        level += 1
        for solidMember_ in self.solidMember:
            showIndent(outfile, level)
            outfile.write('model_.solidMember(\n')
            solidMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(CompositeSolidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'solidMember':
            obj_ = SolidPropertyType.factory()
            obj_.build(child_)
            self.solidMember.append(obj_)
            obj_.original_tagname_ = 'solidMember'
        super(CompositeSolidType, self).buildChildren(child_, node, nodeName_, True)
# end class CompositeSolidType


class CompositeSurfaceType(AbstractSurfaceType):
    subclass = None
    superclass = AbstractSurfaceType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, surfaceMember=None):
        self.original_tagname_ = None
        super(CompositeSurfaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.aggregationType = _cast(None, aggregationType)
        if surfaceMember is None:
            self.surfaceMember = []
        else:
            self.surfaceMember = surfaceMember
    def factory(*args_, **kwargs_):
        if CompositeSurfaceType.subclass:
            return CompositeSurfaceType.subclass(*args_, **kwargs_)
        else:
            return CompositeSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_surfaceMember(self): return self.surfaceMember
    def set_surfaceMember(self, surfaceMember): self.surfaceMember = surfaceMember
    def add_surfaceMember(self, value): self.surfaceMember.append(value)
    def insert_surfaceMember_at(self, index, value): self.surfaceMember.insert(index, value)
    def replace_surfaceMember_at(self, index, value): self.surfaceMember[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.surfaceMember or
            super(CompositeSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CompositeSurfaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CompositeSurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CompositeSurfaceType'):
        super(CompositeSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeSurfaceType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CompositeSurfaceType', fromsubclass_=False, pretty_print=True):
        super(CompositeSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for surfaceMember_ in self.surfaceMember:
            surfaceMember_.export(outfile, level, namespace_='gml:', name_='surfaceMember', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CompositeSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(CompositeSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CompositeSurfaceType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('surfaceMember=[\n')
        level += 1
        for surfaceMember_ in self.surfaceMember:
            showIndent(outfile, level)
            outfile.write('model_.surfaceMember(\n')
            surfaceMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(CompositeSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'surfaceMember':
            obj_ = SurfacePropertyType.factory()
            obj_.build(child_)
            self.surfaceMember.append(obj_)
            obj_.original_tagname_ = 'surfaceMember'
        super(CompositeSurfaceType, self).buildChildren(child_, node, nodeName_, True)
# end class CompositeSurfaceType


class TopoComplexType(AbstractTopologyType):
    subclass = None
    superclass = AbstractTopologyType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, isMaximal=False, maximalComplex=None, superComplex=None, subComplex=None, topoPrimitiveMember=None, topoPrimitiveMembers=None):
        self.original_tagname_ = None
        super(TopoComplexType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        self.isMaximal = _cast(bool, isMaximal)
        self.maximalComplex = maximalComplex
        if superComplex is None:
            self.superComplex = []
        else:
            self.superComplex = superComplex
        if subComplex is None:
            self.subComplex = []
        else:
            self.subComplex = subComplex
        if topoPrimitiveMember is None:
            self.topoPrimitiveMember = []
        else:
            self.topoPrimitiveMember = topoPrimitiveMember
        self.topoPrimitiveMembers = topoPrimitiveMembers
    def factory(*args_, **kwargs_):
        if TopoComplexType.subclass:
            return TopoComplexType.subclass(*args_, **kwargs_)
        else:
            return TopoComplexType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_maximalComplex(self): return self.maximalComplex
    def set_maximalComplex(self, maximalComplex): self.maximalComplex = maximalComplex
    def get_superComplex(self): return self.superComplex
    def set_superComplex(self, superComplex): self.superComplex = superComplex
    def add_superComplex(self, value): self.superComplex.append(value)
    def insert_superComplex_at(self, index, value): self.superComplex.insert(index, value)
    def replace_superComplex_at(self, index, value): self.superComplex[index] = value
    def get_subComplex(self): return self.subComplex
    def set_subComplex(self, subComplex): self.subComplex = subComplex
    def add_subComplex(self, value): self.subComplex.append(value)
    def insert_subComplex_at(self, index, value): self.subComplex.insert(index, value)
    def replace_subComplex_at(self, index, value): self.subComplex[index] = value
    def get_topoPrimitiveMember(self): return self.topoPrimitiveMember
    def set_topoPrimitiveMember(self, topoPrimitiveMember): self.topoPrimitiveMember = topoPrimitiveMember
    def add_topoPrimitiveMember(self, value): self.topoPrimitiveMember.append(value)
    def insert_topoPrimitiveMember_at(self, index, value): self.topoPrimitiveMember.insert(index, value)
    def replace_topoPrimitiveMember_at(self, index, value): self.topoPrimitiveMember[index] = value
    def get_topoPrimitiveMembers(self): return self.topoPrimitiveMembers
    def set_topoPrimitiveMembers(self, topoPrimitiveMembers): self.topoPrimitiveMembers = topoPrimitiveMembers
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_isMaximal(self): return self.isMaximal
    def set_isMaximal(self, isMaximal): self.isMaximal = isMaximal
    def hasContent_(self):
        if (
            self.maximalComplex is not None or
            self.superComplex or
            self.subComplex or
            self.topoPrimitiveMember or
            self.topoPrimitiveMembers is not None or
            super(TopoComplexType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoComplexType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoComplexType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoComplexType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoComplexType'):
        super(TopoComplexType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TopoComplexType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.isMaximal is not None and 'isMaximal' not in already_processed:
            already_processed.add('isMaximal')
            outfile.write(' isMaximal="%s"' % self.gds_format_boolean(self.isMaximal, input_name='isMaximal'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoComplexType', fromsubclass_=False, pretty_print=True):
        super(TopoComplexType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.maximalComplex is not None:
            self.maximalComplex.export(outfile, level, namespace_='gml:', name_='maximalComplex', pretty_print=pretty_print)
        for superComplex_ in self.superComplex:
            superComplex_.export(outfile, level, namespace_='gml:', name_='superComplex', pretty_print=pretty_print)
        for subComplex_ in self.subComplex:
            subComplex_.export(outfile, level, namespace_='gml:', name_='subComplex', pretty_print=pretty_print)
        for topoPrimitiveMember_ in self.topoPrimitiveMember:
            topoPrimitiveMember_.export(outfile, level, namespace_='gml:', name_='topoPrimitiveMember', pretty_print=pretty_print)
        if self.topoPrimitiveMembers is not None:
            self.topoPrimitiveMembers.export(outfile, level, namespace_='gml:', name_='topoPrimitiveMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoComplexType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        if self.isMaximal is not None and 'isMaximal' not in already_processed:
            already_processed.add('isMaximal')
            showIndent(outfile, level)
            outfile.write('isMaximal=%s,\n' % (self.isMaximal,))
        super(TopoComplexType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TopoComplexType, self).exportLiteralChildren(outfile, level, name_)
        if self.maximalComplex is not None:
            showIndent(outfile, level)
            outfile.write('maximalComplex=model_.maximalComplex(\n')
            self.maximalComplex.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('superComplex=[\n')
        level += 1
        for superComplex_ in self.superComplex:
            showIndent(outfile, level)
            outfile.write('model_.superComplex(\n')
            superComplex_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('subComplex=[\n')
        level += 1
        for subComplex_ in self.subComplex:
            showIndent(outfile, level)
            outfile.write('model_.subComplex(\n')
            subComplex_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('topoPrimitiveMember=[\n')
        level += 1
        for topoPrimitiveMember_ in self.topoPrimitiveMember:
            showIndent(outfile, level)
            outfile.write('model_.topoPrimitiveMember(\n')
            topoPrimitiveMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.topoPrimitiveMembers is not None:
            showIndent(outfile, level)
            outfile.write('topoPrimitiveMembers=model_.topoPrimitiveMembers(\n')
            self.topoPrimitiveMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('isMaximal', node)
        if value is not None and 'isMaximal' not in already_processed:
            already_processed.add('isMaximal')
            if value in ('true', '1'):
                self.isMaximal = True
            elif value in ('false', '0'):
                self.isMaximal = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        super(TopoComplexType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'maximalComplex':
            obj_ = TopoComplexPropertyType.factory()
            obj_.build(child_)
            self.maximalComplex = obj_
            obj_.original_tagname_ = 'maximalComplex'
        elif nodeName_ == 'superComplex':
            obj_ = TopoComplexPropertyType.factory()
            obj_.build(child_)
            self.superComplex.append(obj_)
            obj_.original_tagname_ = 'superComplex'
        elif nodeName_ == 'subComplex':
            obj_ = TopoComplexPropertyType.factory()
            obj_.build(child_)
            self.subComplex.append(obj_)
            obj_.original_tagname_ = 'subComplex'
        elif nodeName_ == 'topoPrimitiveMember':
            obj_ = TopoPrimitiveMemberType.factory()
            obj_.build(child_)
            self.topoPrimitiveMember.append(obj_)
            obj_.original_tagname_ = 'topoPrimitiveMember'
        elif nodeName_ == 'topoPrimitiveMembers':
            obj_ = TopoPrimitiveArrayAssociationType.factory()
            obj_.build(child_)
            self.topoPrimitiveMembers = obj_
            obj_.original_tagname_ = 'topoPrimitiveMembers'
        super(TopoComplexType, self).buildChildren(child_, node, nodeName_, True)
# end class TopoComplexType


class TopoVolumeType(AbstractTopologyType):
    subclass = None
    superclass = AbstractTopologyType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, directedTopoSolid=None):
        self.original_tagname_ = None
        super(TopoVolumeType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        if directedTopoSolid is None:
            self.directedTopoSolid = []
        else:
            self.directedTopoSolid = directedTopoSolid
    def factory(*args_, **kwargs_):
        if TopoVolumeType.subclass:
            return TopoVolumeType.subclass(*args_, **kwargs_)
        else:
            return TopoVolumeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_directedTopoSolid(self): return self.directedTopoSolid
    def set_directedTopoSolid(self, directedTopoSolid): self.directedTopoSolid = directedTopoSolid
    def add_directedTopoSolid(self, value): self.directedTopoSolid.append(value)
    def insert_directedTopoSolid_at(self, index, value): self.directedTopoSolid.insert(index, value)
    def replace_directedTopoSolid_at(self, index, value): self.directedTopoSolid[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.directedTopoSolid or
            super(TopoVolumeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoVolumeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoVolumeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoVolumeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoVolumeType'):
        super(TopoVolumeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TopoVolumeType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoVolumeType', fromsubclass_=False, pretty_print=True):
        super(TopoVolumeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for directedTopoSolid_ in self.directedTopoSolid:
            directedTopoSolid_.export(outfile, level, namespace_='gml:', name_='directedTopoSolid', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoVolumeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(TopoVolumeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TopoVolumeType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('directedTopoSolid=[\n')
        level += 1
        for directedTopoSolid_ in self.directedTopoSolid:
            showIndent(outfile, level)
            outfile.write('model_.DirectedTopoSolidPropertyType(\n')
            directedTopoSolid_.exportLiteral(outfile, level, name_='DirectedTopoSolidPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(TopoVolumeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'directedTopoSolid':
            obj_ = DirectedTopoSolidPropertyType.factory()
            obj_.build(child_)
            self.directedTopoSolid.append(obj_)
            obj_.original_tagname_ = 'directedTopoSolid'
        super(TopoVolumeType, self).buildChildren(child_, node, nodeName_, True)
# end class TopoVolumeType


class TopoSurfaceType(AbstractTopologyType):
    subclass = None
    superclass = AbstractTopologyType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, directedFace=None):
        self.original_tagname_ = None
        super(TopoSurfaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        if directedFace is None:
            self.directedFace = []
        else:
            self.directedFace = directedFace
    def factory(*args_, **kwargs_):
        if TopoSurfaceType.subclass:
            return TopoSurfaceType.subclass(*args_, **kwargs_)
        else:
            return TopoSurfaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_directedFace(self): return self.directedFace
    def set_directedFace(self, directedFace): self.directedFace = directedFace
    def add_directedFace(self, value): self.directedFace.append(value)
    def insert_directedFace_at(self, index, value): self.directedFace.insert(index, value)
    def replace_directedFace_at(self, index, value): self.directedFace[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.directedFace or
            super(TopoSurfaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoSurfaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoSurfaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoSurfaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoSurfaceType'):
        super(TopoSurfaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TopoSurfaceType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoSurfaceType', fromsubclass_=False, pretty_print=True):
        super(TopoSurfaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for directedFace_ in self.directedFace:
            directedFace_.export(outfile, level, namespace_='gml:', name_='directedFace', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoSurfaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(TopoSurfaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TopoSurfaceType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('directedFace=[\n')
        level += 1
        for directedFace_ in self.directedFace:
            showIndent(outfile, level)
            outfile.write('model_.DirectedFacePropertyType(\n')
            directedFace_.exportLiteral(outfile, level, name_='DirectedFacePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(TopoSurfaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'directedFace':
            obj_ = DirectedFacePropertyType.factory()
            obj_.build(child_)
            self.directedFace.append(obj_)
            obj_.original_tagname_ = 'directedFace'
        super(TopoSurfaceType, self).buildChildren(child_, node, nodeName_, True)
# end class TopoSurfaceType


class TopoCurveType(AbstractTopologyType):
    subclass = None
    superclass = AbstractTopologyType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, directedEdge=None):
        self.original_tagname_ = None
        super(TopoCurveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        if directedEdge is None:
            self.directedEdge = []
        else:
            self.directedEdge = directedEdge
    def factory(*args_, **kwargs_):
        if TopoCurveType.subclass:
            return TopoCurveType.subclass(*args_, **kwargs_)
        else:
            return TopoCurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_directedEdge(self): return self.directedEdge
    def set_directedEdge(self, directedEdge): self.directedEdge = directedEdge
    def add_directedEdge(self, value): self.directedEdge.append(value)
    def insert_directedEdge_at(self, index, value): self.directedEdge.insert(index, value)
    def replace_directedEdge_at(self, index, value): self.directedEdge[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.directedEdge or
            super(TopoCurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoCurveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoCurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoCurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoCurveType'):
        super(TopoCurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TopoCurveType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoCurveType', fromsubclass_=False, pretty_print=True):
        super(TopoCurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for directedEdge_ in self.directedEdge:
            directedEdge_.export(outfile, level, namespace_='gml:', name_='directedEdge', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoCurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(TopoCurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TopoCurveType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('directedEdge=[\n')
        level += 1
        for directedEdge_ in self.directedEdge:
            showIndent(outfile, level)
            outfile.write('model_.DirectedEdgePropertyType(\n')
            directedEdge_.exportLiteral(outfile, level, name_='DirectedEdgePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(TopoCurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'directedEdge':
            obj_ = DirectedEdgePropertyType.factory()
            obj_.build(child_)
            self.directedEdge.append(obj_)
            obj_.original_tagname_ = 'directedEdge'
        super(TopoCurveType, self).buildChildren(child_, node, nodeName_, True)
# end class TopoCurveType


class TopoPointType(AbstractTopologyType):
    subclass = None
    superclass = AbstractTopologyType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, directedNode=None):
        self.original_tagname_ = None
        super(TopoPointType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.directedNode = directedNode
    def factory(*args_, **kwargs_):
        if TopoPointType.subclass:
            return TopoPointType.subclass(*args_, **kwargs_)
        else:
            return TopoPointType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_directedNode(self): return self.directedNode
    def set_directedNode(self, directedNode): self.directedNode = directedNode
    def hasContent_(self):
        if (
            self.directedNode is not None or
            super(TopoPointType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoPointType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoPointType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoPointType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoPointType'):
        super(TopoPointType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TopoPointType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoPointType', fromsubclass_=False, pretty_print=True):
        super(TopoPointType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.directedNode is not None:
            self.directedNode.export(outfile, level, namespace_='gml:', name_='directedNode', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoPointType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TopoPointType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TopoPointType, self).exportLiteralChildren(outfile, level, name_)
        if self.directedNode is not None:
            showIndent(outfile, level)
            outfile.write('directedNode=model_.DirectedNodePropertyType(\n')
            self.directedNode.exportLiteral(outfile, level, name_='directedNode')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TopoPointType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'directedNode':
            obj_ = DirectedNodePropertyType.factory()
            obj_.build(child_)
            self.directedNode = obj_
            obj_.original_tagname_ = 'directedNode'
        super(TopoPointType, self).buildChildren(child_, node, nodeName_, True)
# end class TopoPointType


class AbstractTopoPrimitiveType(AbstractTopologyType):
    subclass = None
    superclass = AbstractTopologyType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractTopoPrimitiveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractTopoPrimitiveType.subclass:
            return AbstractTopoPrimitiveType.subclass(*args_, **kwargs_)
        else:
            return AbstractTopoPrimitiveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractTopoPrimitiveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractTopoPrimitiveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTopoPrimitiveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractTopoPrimitiveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractTopoPrimitiveType'):
        super(AbstractTopoPrimitiveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTopoPrimitiveType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractTopoPrimitiveType', fromsubclass_=False, pretty_print=True):
        super(AbstractTopoPrimitiveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractTopoPrimitiveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractTopoPrimitiveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractTopoPrimitiveType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractTopoPrimitiveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractTopoPrimitiveType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractTopoPrimitiveType


class DynamicFeatureCollectionType(DynamicFeatureType):
    subclass = None
    superclass = DynamicFeatureType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, boundedBy=None, location=None, validTime=None, history=None, dataSource=None, dataSourceReference=None, dynamicMembers=None):
        self.original_tagname_ = None
        super(DynamicFeatureCollectionType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, boundedBy, location, validTime, history, dataSource, dataSourceReference, )
        self.dynamicMembers = dynamicMembers
    def factory(*args_, **kwargs_):
        if DynamicFeatureCollectionType.subclass:
            return DynamicFeatureCollectionType.subclass(*args_, **kwargs_)
        else:
            return DynamicFeatureCollectionType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_dynamicMembers(self): return self.dynamicMembers
    def set_dynamicMembers(self, dynamicMembers): self.dynamicMembers = dynamicMembers
    def hasContent_(self):
        if (
            self.dynamicMembers is not None or
            super(DynamicFeatureCollectionType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DynamicFeatureCollectionType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DynamicFeatureCollectionType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DynamicFeatureCollectionType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DynamicFeatureCollectionType'):
        super(DynamicFeatureCollectionType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DynamicFeatureCollectionType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DynamicFeatureCollectionType', fromsubclass_=False, pretty_print=True):
        super(DynamicFeatureCollectionType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.dynamicMembers is not None:
            self.dynamicMembers.export(outfile, level, namespace_='gml:', name_='dynamicMembers', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DynamicFeatureCollectionType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DynamicFeatureCollectionType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DynamicFeatureCollectionType, self).exportLiteralChildren(outfile, level, name_)
        if self.dynamicMembers is not None:
            showIndent(outfile, level)
            outfile.write('dynamicMembers=model_.dynamicMembers(\n')
            self.dynamicMembers.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DynamicFeatureCollectionType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'dynamicMembers':
            obj_ = DynamicFeatureMemberType.factory()
            obj_.build(child_)
            self.dynamicMembers = obj_
            obj_.original_tagname_ = 'dynamicMembers'
        super(DynamicFeatureCollectionType, self).buildChildren(child_, node, nodeName_, True)
# end class DynamicFeatureCollectionType


class DS_StereoMate_Type(DS_OtherAggregate_Type):
    subclass = None
    superclass = DS_OtherAggregate_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None):
        self.original_tagname_ = None
        super(DS_StereoMate_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, )
    def factory(*args_, **kwargs_):
        if DS_StereoMate_Type.subclass:
            return DS_StereoMate_Type.subclass(*args_, **kwargs_)
        else:
            return DS_StereoMate_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DS_StereoMate_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_StereoMate_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_StereoMate_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_StereoMate_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_StereoMate_Type'):
        super(DS_StereoMate_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_StereoMate_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_StereoMate_Type', fromsubclass_=False, pretty_print=True):
        super(DS_StereoMate_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_StereoMate_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_StereoMate_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_StereoMate_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_StereoMate_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_StereoMate_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_StereoMate_Type


class DS_ProductionSeries_Type(DS_Series_Type):
    subclass = None
    superclass = DS_Series_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None):
        self.original_tagname_ = None
        super(DS_ProductionSeries_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, )
    def factory(*args_, **kwargs_):
        if DS_ProductionSeries_Type.subclass:
            return DS_ProductionSeries_Type.subclass(*args_, **kwargs_)
        else:
            return DS_ProductionSeries_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DS_ProductionSeries_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_ProductionSeries_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_ProductionSeries_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_ProductionSeries_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_ProductionSeries_Type'):
        super(DS_ProductionSeries_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_ProductionSeries_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_ProductionSeries_Type', fromsubclass_=False, pretty_print=True):
        super(DS_ProductionSeries_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_ProductionSeries_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_ProductionSeries_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_ProductionSeries_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_ProductionSeries_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_ProductionSeries_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_ProductionSeries_Type


class DS_Sensor_Type(DS_Series_Type):
    subclass = None
    superclass = DS_Series_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None):
        self.original_tagname_ = None
        super(DS_Sensor_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, )
    def factory(*args_, **kwargs_):
        if DS_Sensor_Type.subclass:
            return DS_Sensor_Type.subclass(*args_, **kwargs_)
        else:
            return DS_Sensor_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DS_Sensor_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Sensor_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Sensor_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Sensor_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Sensor_Type'):
        super(DS_Sensor_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Sensor_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Sensor_Type', fromsubclass_=False, pretty_print=True):
        super(DS_Sensor_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Sensor_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_Sensor_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_Sensor_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_Sensor_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_Sensor_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_Sensor_Type


class DS_Platform_Type(DS_Series_Type):
    subclass = None
    superclass = DS_Series_Type
    def __init__(self, id=None, uuid=None, composedOf=None, seriesMetadata=None, subset=None, superset=None):
        self.original_tagname_ = None
        super(DS_Platform_Type, self).__init__(id, uuid, composedOf, seriesMetadata, subset, superset, )
    def factory(*args_, **kwargs_):
        if DS_Platform_Type.subclass:
            return DS_Platform_Type.subclass(*args_, **kwargs_)
        else:
            return DS_Platform_Type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def hasContent_(self):
        if (
            super(DS_Platform_Type, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='DS_Platform_Type', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Platform_Type')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='DS_Platform_Type', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='DS_Platform_Type'):
        super(DS_Platform_Type, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DS_Platform_Type')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='DS_Platform_Type', fromsubclass_=False, pretty_print=True):
        super(DS_Platform_Type, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='DS_Platform_Type'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(DS_Platform_Type, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(DS_Platform_Type, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(DS_Platform_Type, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(DS_Platform_Type, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class DS_Platform_Type


class RectifiedGridType(GridType):
    subclass = None
    superclass = GridType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, dimension=None, limits=None, axisName=None, origin=None, offsetVector=None):
        self.original_tagname_ = None
        super(RectifiedGridType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, dimension, limits, axisName, )
        self.origin = origin
        if offsetVector is None:
            self.offsetVector = []
        else:
            self.offsetVector = offsetVector
    def factory(*args_, **kwargs_):
        if RectifiedGridType.subclass:
            return RectifiedGridType.subclass(*args_, **kwargs_)
        else:
            return RectifiedGridType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_origin(self): return self.origin
    def set_origin(self, origin): self.origin = origin
    def get_offsetVector(self): return self.offsetVector
    def set_offsetVector(self, offsetVector): self.offsetVector = offsetVector
    def add_offsetVector(self, value): self.offsetVector.append(value)
    def insert_offsetVector_at(self, index, value): self.offsetVector.insert(index, value)
    def replace_offsetVector_at(self, index, value): self.offsetVector[index] = value
    def hasContent_(self):
        if (
            self.origin is not None or
            self.offsetVector or
            super(RectifiedGridType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='RectifiedGridType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RectifiedGridType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='RectifiedGridType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='RectifiedGridType'):
        super(RectifiedGridType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RectifiedGridType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='RectifiedGridType', fromsubclass_=False, pretty_print=True):
        super(RectifiedGridType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.origin is not None:
            self.origin.export(outfile, level, namespace_, name_='origin', pretty_print=pretty_print)
        for offsetVector_ in self.offsetVector:
            offsetVector_.export(outfile, level, namespace_, name_='offsetVector', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='RectifiedGridType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(RectifiedGridType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(RectifiedGridType, self).exportLiteralChildren(outfile, level, name_)
        if self.origin is not None:
            showIndent(outfile, level)
            outfile.write('origin=model_.PointPropertyType(\n')
            self.origin.exportLiteral(outfile, level, name_='origin')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('offsetVector=[\n')
        level += 1
        for offsetVector_ in self.offsetVector:
            showIndent(outfile, level)
            outfile.write('model_.VectorType(\n')
            offsetVector_.exportLiteral(outfile, level, name_='VectorType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(RectifiedGridType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'origin':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.origin = obj_
            obj_.original_tagname_ = 'origin'
        elif nodeName_ == 'offsetVector':
            obj_ = VectorType.factory()
            obj_.build(child_)
            self.offsetVector.append(obj_)
            obj_.original_tagname_ = 'offsetVector'
        super(RectifiedGridType, self).buildChildren(child_, node, nodeName_, True)
# end class RectifiedGridType


class AbstractCurveType(AbstractGeometricPrimitiveType):
    """gml:AbstractCurveType is an abstraction of a curve to support the
    different levels of complexity. The curve may always be viewed
    as a geometric primitive, i.e. is continuous."""
    subclass = None
    superclass = AbstractGeometricPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, extensiontype_=None):
        self.original_tagname_ = None
        super(AbstractCurveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, extensiontype_, )
        self.extensiontype_ = extensiontype_
    def factory(*args_, **kwargs_):
        if AbstractCurveType.subclass:
            return AbstractCurveType.subclass(*args_, **kwargs_)
        else:
            return AbstractCurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_extensiontype_(self): return self.extensiontype_
    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
    def hasContent_(self):
        if (
            super(AbstractCurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='AbstractCurveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='AbstractCurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='AbstractCurveType'):
        super(AbstractCurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractCurveType')
        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
            outfile.write(' xsi:type="%s"' % self.extensiontype_)
    def exportChildren(self, outfile, level, namespace_='gml:', name_='AbstractCurveType', fromsubclass_=False, pretty_print=True):
        super(AbstractCurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='AbstractCurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(AbstractCurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(AbstractCurveType, self).exportLiteralChildren(outfile, level, name_)
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('xsi:type', node)
        if value is not None and 'xsi:type' not in already_processed:
            already_processed.add('xsi:type')
            self.extensiontype_ = value
        super(AbstractCurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        super(AbstractCurveType, self).buildChildren(child_, node, nodeName_, True)
        pass
# end class AbstractCurveType


class PointType(AbstractGeometricPrimitiveType):
    subclass = None
    superclass = AbstractGeometricPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, pos=None, coordinates=None):
        self.original_tagname_ = None
        super(PointType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.pos = pos
        self.coordinates = coordinates
    def factory(*args_, **kwargs_):
        if PointType.subclass:
            return PointType.subclass(*args_, **kwargs_)
        else:
            return PointType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def hasContent_(self):
        if (
            self.pos is not None or
            self.coordinates is not None or
            super(PointType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PointType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PointType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PointType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PointType'):
        super(PointType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PointType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PointType', fromsubclass_=False, pretty_print=True):
        super(PointType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.pos is not None:
            self.pos.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PointType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PointType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PointType, self).exportLiteralChildren(outfile, level, name_)
        if self.pos is not None:
            showIndent(outfile, level)
            outfile.write('pos=model_.DirectPositionType(\n')
            self.pos.exportLiteral(outfile, level, name_='pos')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PointType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos = obj_
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        super(PointType, self).buildChildren(child_, node, nodeName_, True)
# end class PointType


class PolygonType(AbstractSurfaceType):
    subclass = None
    superclass = AbstractSurfaceType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, exterior=None, interior=None):
        self.original_tagname_ = None
        super(PolygonType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.exterior = exterior
        if interior is None:
            self.interior = []
        else:
            self.interior = interior
    def factory(*args_, **kwargs_):
        if PolygonType.subclass:
            return PolygonType.subclass(*args_, **kwargs_)
        else:
            return PolygonType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_exterior(self): return self.exterior
    def set_exterior(self, exterior): self.exterior = exterior
    def get_interior(self): return self.interior
    def set_interior(self, interior): self.interior = interior
    def add_interior(self, value): self.interior.append(value)
    def insert_interior_at(self, index, value): self.interior.insert(index, value)
    def replace_interior_at(self, index, value): self.interior[index] = value
    def hasContent_(self):
        if (
            self.exterior is not None or
            self.interior or
            super(PolygonType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='PolygonType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PolygonType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='PolygonType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='PolygonType'):
        super(PolygonType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PolygonType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='PolygonType', fromsubclass_=False, pretty_print=True):
        super(PolygonType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.exterior is not None:
            self.exterior.export(outfile, level, namespace_='gml:', name_='exterior', pretty_print=pretty_print)
        for interior_ in self.interior:
            interior_.export(outfile, level, namespace_='gml:', name_='interior', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='PolygonType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(PolygonType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(PolygonType, self).exportLiteralChildren(outfile, level, name_)
        if self.exterior is not None:
            showIndent(outfile, level)
            outfile.write('exterior=model_.ShellPropertyType(\n')
            self.exterior.exportLiteral(outfile, level, name_='exterior')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('interior=[\n')
        level += 1
        for interior_ in self.interior:
            showIndent(outfile, level)
            outfile.write('model_.ShellPropertyType(\n')
            interior_.exportLiteral(outfile, level, name_='ShellPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(PolygonType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'exterior':
            obj_ = ShellPropertyType.factory()
            obj_.build(child_)
            self.exterior = obj_
            obj_.original_tagname_ = 'exterior'
        elif nodeName_ == 'interior':
            obj_ = ShellPropertyType.factory()
            obj_.build(child_)
            self.interior.append(obj_)
            obj_.original_tagname_ = 'interior'
        super(PolygonType, self).buildChildren(child_, node, nodeName_, True)
# end class PolygonType


class SolidType(AbstractSolidType):
    subclass = None
    superclass = AbstractSolidType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, exterior=None, interior=None):
        self.original_tagname_ = None
        super(SolidType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.exterior = exterior
        if interior is None:
            self.interior = []
        else:
            self.interior = interior
    def factory(*args_, **kwargs_):
        if SolidType.subclass:
            return SolidType.subclass(*args_, **kwargs_)
        else:
            return SolidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_exterior(self): return self.exterior
    def set_exterior(self, exterior): self.exterior = exterior
    def get_interior(self): return self.interior
    def set_interior(self, interior): self.interior = interior
    def add_interior(self, value): self.interior.append(value)
    def insert_interior_at(self, index, value): self.interior.insert(index, value)
    def replace_interior_at(self, index, value): self.interior[index] = value
    def hasContent_(self):
        if (
            self.exterior is not None or
            self.interior or
            super(SolidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='SolidType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SolidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='SolidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='SolidType'):
        super(SolidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SolidType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='SolidType', fromsubclass_=False, pretty_print=True):
        super(SolidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.exterior is not None:
            self.exterior.export(outfile, level, namespace_, name_='exterior', pretty_print=pretty_print)
        for interior_ in self.interior:
            interior_.export(outfile, level, namespace_, name_='interior', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='SolidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(SolidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(SolidType, self).exportLiteralChildren(outfile, level, name_)
        if self.exterior is not None:
            showIndent(outfile, level)
            outfile.write('exterior=model_.ShellPropertyType(\n')
            self.exterior.exportLiteral(outfile, level, name_='exterior')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('interior=[\n')
        level += 1
        for interior_ in self.interior:
            showIndent(outfile, level)
            outfile.write('model_.ShellPropertyType(\n')
            interior_.exportLiteral(outfile, level, name_='ShellPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(SolidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'exterior':
            obj_ = ShellPropertyType.factory()
            obj_.build(child_)
            self.exterior = obj_
            obj_.original_tagname_ = 'exterior'
        elif nodeName_ == 'interior':
            obj_ = ShellPropertyType.factory()
            obj_.build(child_)
            self.interior.append(obj_)
            obj_.original_tagname_ = 'interior'
        super(SolidType, self).buildChildren(child_, node, nodeName_, True)
# end class SolidType


class TinType(SurfaceType):
    subclass = None
    superclass = SurfaceType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, patches=None, stopLines=None, breakLines=None, maxLength=None, controlPoint=None):
        self.original_tagname_ = None
        super(TinType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, patches, )
        if stopLines is None:
            self.stopLines = []
        else:
            self.stopLines = stopLines
        if breakLines is None:
            self.breakLines = []
        else:
            self.breakLines = breakLines
        self.maxLength = maxLength
        self.controlPoint = controlPoint
    def factory(*args_, **kwargs_):
        if TinType.subclass:
            return TinType.subclass(*args_, **kwargs_)
        else:
            return TinType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_stopLines(self): return self.stopLines
    def set_stopLines(self, stopLines): self.stopLines = stopLines
    def add_stopLines(self, value): self.stopLines.append(value)
    def insert_stopLines_at(self, index, value): self.stopLines.insert(index, value)
    def replace_stopLines_at(self, index, value): self.stopLines[index] = value
    def get_breakLines(self): return self.breakLines
    def set_breakLines(self, breakLines): self.breakLines = breakLines
    def add_breakLines(self, value): self.breakLines.append(value)
    def insert_breakLines_at(self, index, value): self.breakLines.insert(index, value)
    def replace_breakLines_at(self, index, value): self.breakLines[index] = value
    def get_maxLength(self): return self.maxLength
    def set_maxLength(self, maxLength): self.maxLength = maxLength
    def get_controlPoint(self): return self.controlPoint
    def set_controlPoint(self, controlPoint): self.controlPoint = controlPoint
    def hasContent_(self):
        if (
            self.stopLines or
            self.breakLines or
            self.maxLength is not None or
            self.controlPoint is not None or
            super(TinType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TinType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TinType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TinType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TinType'):
        super(TinType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TinType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TinType', fromsubclass_=False, pretty_print=True):
        super(TinType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for stopLines_ in self.stopLines:
            stopLines_.export(outfile, level, namespace_, name_='stopLines', pretty_print=pretty_print)
        for breakLines_ in self.breakLines:
            breakLines_.export(outfile, level, namespace_, name_='breakLines', pretty_print=pretty_print)
        if self.maxLength is not None:
            self.maxLength.export(outfile, level, namespace_, name_='maxLength', pretty_print=pretty_print)
        if self.controlPoint is not None:
            self.controlPoint.export(outfile, level, namespace_, name_='controlPoint', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TinType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(TinType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TinType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('stopLines=[\n')
        level += 1
        for stopLines_ in self.stopLines:
            showIndent(outfile, level)
            outfile.write('model_.LineStringSegmentArrayPropertyType(\n')
            stopLines_.exportLiteral(outfile, level, name_='LineStringSegmentArrayPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('breakLines=[\n')
        level += 1
        for breakLines_ in self.breakLines:
            showIndent(outfile, level)
            outfile.write('model_.LineStringSegmentArrayPropertyType(\n')
            breakLines_.exportLiteral(outfile, level, name_='LineStringSegmentArrayPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.maxLength is not None:
            showIndent(outfile, level)
            outfile.write('maxLength=model_.LengthType(\n')
            self.maxLength.exportLiteral(outfile, level, name_='maxLength')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.controlPoint is not None:
            showIndent(outfile, level)
            outfile.write('controlPoint=model_.controlPoint(\n')
            self.controlPoint.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(TinType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'stopLines':
            obj_ = LineStringSegmentArrayPropertyType.factory()
            obj_.build(child_)
            self.stopLines.append(obj_)
            obj_.original_tagname_ = 'stopLines'
        elif nodeName_ == 'breakLines':
            obj_ = LineStringSegmentArrayPropertyType.factory()
            obj_.build(child_)
            self.breakLines.append(obj_)
            obj_.original_tagname_ = 'breakLines'
        elif nodeName_ == 'maxLength':
            obj_ = LengthType.factory()
            obj_.build(child_)
            self.maxLength = obj_
            obj_.original_tagname_ = 'maxLength'
        elif nodeName_ == 'controlPoint':
            obj_ = controlPoint.factory()
            obj_.build(child_)
            self.controlPoint = obj_
            obj_.original_tagname_ = 'controlPoint'
        super(TinType, self).buildChildren(child_, node, nodeName_, True)
# end class TinType


class OrientableCurveType(AbstractCurveType):
    subclass = None
    superclass = AbstractCurveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, orientation='+', baseCurve=None):
        self.original_tagname_ = None
        super(OrientableCurveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.orientation = _cast(None, orientation)
        self.baseCurve = baseCurve
    def factory(*args_, **kwargs_):
        if OrientableCurveType.subclass:
            return OrientableCurveType.subclass(*args_, **kwargs_)
        else:
            return OrientableCurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_baseCurve(self): return self.baseCurve
    def set_baseCurve(self, baseCurve): self.baseCurve = baseCurve
    def get_orientation(self): return self.orientation
    def set_orientation(self, orientation): self.orientation = orientation
    def hasContent_(self):
        if (
            self.baseCurve is not None or
            super(OrientableCurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='OrientableCurveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='OrientableCurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='OrientableCurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='OrientableCurveType'):
        super(OrientableCurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='OrientableCurveType')
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            outfile.write(' orientation=%s' % (quote_attrib(self.orientation), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='OrientableCurveType', fromsubclass_=False, pretty_print=True):
        super(OrientableCurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.baseCurve is not None:
            self.baseCurve.export(outfile, level, namespace_='gml:', name_='baseCurve', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='OrientableCurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.orientation is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            showIndent(outfile, level)
            outfile.write('orientation=%s,\n' % (self.orientation,))
        super(OrientableCurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(OrientableCurveType, self).exportLiteralChildren(outfile, level, name_)
        if self.baseCurve is not None:
            showIndent(outfile, level)
            outfile.write('baseCurve=model_.baseCurve(\n')
            self.baseCurve.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('orientation', node)
        if value is not None and 'orientation' not in already_processed:
            already_processed.add('orientation')
            self.orientation = value
        super(OrientableCurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'baseCurve':
            obj_ = CurvePropertyType.factory()
            obj_.build(child_)
            self.baseCurve = obj_
            obj_.original_tagname_ = 'baseCurve'
        super(OrientableCurveType, self).buildChildren(child_, node, nodeName_, True)
# end class OrientableCurveType


class CurveType(AbstractCurveType):
    subclass = None
    superclass = AbstractCurveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, segments=None):
        self.original_tagname_ = None
        super(CurveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.segments = segments
    def factory(*args_, **kwargs_):
        if CurveType.subclass:
            return CurveType.subclass(*args_, **kwargs_)
        else:
            return CurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_segments(self): return self.segments
    def set_segments(self, segments): self.segments = segments
    def hasContent_(self):
        if (
            self.segments is not None or
            super(CurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CurveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CurveType'):
        super(CurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CurveType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CurveType', fromsubclass_=False, pretty_print=True):
        super(CurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.segments is not None:
            self.segments.export(outfile, level, namespace_='gml:', name_='segments', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(CurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CurveType, self).exportLiteralChildren(outfile, level, name_)
        if self.segments is not None:
            showIndent(outfile, level)
            outfile.write('segments=model_.segments(\n')
            self.segments.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(CurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'segments':
            obj_ = CurveSegmentArrayPropertyType.factory()
            obj_.build(child_)
            self.segments = obj_
            obj_.original_tagname_ = 'segments'
        super(CurveType, self).buildChildren(child_, node, nodeName_, True)
# end class CurveType


class CompositeCurveType(AbstractCurveType):
    subclass = None
    superclass = AbstractCurveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, aggregationType=None, curveMember=None):
        self.original_tagname_ = None
        super(CompositeCurveType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        self.aggregationType = _cast(None, aggregationType)
        if curveMember is None:
            self.curveMember = []
        else:
            self.curveMember = curveMember
    def factory(*args_, **kwargs_):
        if CompositeCurveType.subclass:
            return CompositeCurveType.subclass(*args_, **kwargs_)
        else:
            return CompositeCurveType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_curveMember(self): return self.curveMember
    def set_curveMember(self, curveMember): self.curveMember = curveMember
    def add_curveMember(self, value): self.curveMember.append(value)
    def insert_curveMember_at(self, index, value): self.curveMember.insert(index, value)
    def replace_curveMember_at(self, index, value): self.curveMember[index] = value
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.curveMember or
            super(CompositeCurveType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='CompositeCurveType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeCurveType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='CompositeCurveType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='CompositeCurveType'):
        super(CompositeCurveType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='CompositeCurveType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='CompositeCurveType', fromsubclass_=False, pretty_print=True):
        super(CompositeCurveType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for curveMember_ in self.curveMember:
            curveMember_.export(outfile, level, namespace_='gml:', name_='curveMember', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='CompositeCurveType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(CompositeCurveType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(CompositeCurveType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('curveMember=[\n')
        level += 1
        for curveMember_ in self.curveMember:
            showIndent(outfile, level)
            outfile.write('model_.curveMember(\n')
            curveMember_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(CompositeCurveType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'curveMember':
            obj_ = CurvePropertyType.factory()
            obj_.build(child_)
            self.curveMember.append(obj_)
            obj_.original_tagname_ = 'curveMember'
        super(CompositeCurveType, self).buildChildren(child_, node, nodeName_, True)
# end class CompositeCurveType


class TopoSolidType(AbstractTopoPrimitiveType):
    """A gml:TopoSolid must indicate whether it is a universal topo-solid
    or not, to ensure a lossless topology representation as defined
    by Kuijpers, et. al. (see OGC 05-102 Topology IPR). The optional
    universal attribute of type boolean is used to indicate this and
    the default is fault. NOTE The universal topo-solid is normally
    not part of any feature, and is used to represent the unbounded
    portion of the data set. Its interior boundary (it has no
    exterior boundary) would normally be considered the exterior
    boundary of the data set."""
    subclass = None
    superclass = AbstractTopoPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, universal=False, isolated=None, directedFace=None, solidProperty=None):
        self.original_tagname_ = None
        super(TopoSolidType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        self.universal = _cast(bool, universal)
        if isolated is None:
            self.isolated = []
        else:
            self.isolated = isolated
        if directedFace is None:
            self.directedFace = []
        else:
            self.directedFace = directedFace
        self.solidProperty = solidProperty
    def factory(*args_, **kwargs_):
        if TopoSolidType.subclass:
            return TopoSolidType.subclass(*args_, **kwargs_)
        else:
            return TopoSolidType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_isolated(self): return self.isolated
    def set_isolated(self, isolated): self.isolated = isolated
    def add_isolated(self, value): self.isolated.append(value)
    def insert_isolated_at(self, index, value): self.isolated.insert(index, value)
    def replace_isolated_at(self, index, value): self.isolated[index] = value
    def get_directedFace(self): return self.directedFace
    def set_directedFace(self, directedFace): self.directedFace = directedFace
    def add_directedFace(self, value): self.directedFace.append(value)
    def insert_directedFace_at(self, index, value): self.directedFace.insert(index, value)
    def replace_directedFace_at(self, index, value): self.directedFace[index] = value
    def get_solidProperty(self): return self.solidProperty
    def set_solidProperty(self, solidProperty): self.solidProperty = solidProperty
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_universal(self): return self.universal
    def set_universal(self, universal): self.universal = universal
    def hasContent_(self):
        if (
            self.isolated or
            self.directedFace or
            self.solidProperty is not None or
            super(TopoSolidType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='TopoSolidType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TopoSolidType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='TopoSolidType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='TopoSolidType'):
        super(TopoSolidType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TopoSolidType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.universal is not None and 'universal' not in already_processed:
            already_processed.add('universal')
            outfile.write(' universal="%s"' % self.gds_format_boolean(self.universal, input_name='universal'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='TopoSolidType', fromsubclass_=False, pretty_print=True):
        super(TopoSolidType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for isolated_ in self.isolated:
            isolated_.export(outfile, level, namespace_, name_='isolated', pretty_print=pretty_print)
        for directedFace_ in self.directedFace:
            directedFace_.export(outfile, level, namespace_='gml:', name_='directedFace', pretty_print=pretty_print)
        if self.solidProperty is not None:
            self.solidProperty.export(outfile, level, namespace_='gml:', name_='solidProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='TopoSolidType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        if self.universal is not None and 'universal' not in already_processed:
            already_processed.add('universal')
            showIndent(outfile, level)
            outfile.write('universal=%s,\n' % (self.universal,))
        super(TopoSolidType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(TopoSolidType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('isolated=[\n')
        level += 1
        for isolated_ in self.isolated:
            showIndent(outfile, level)
            outfile.write('model_.NodeOrEdgePropertyType(\n')
            isolated_.exportLiteral(outfile, level, name_='NodeOrEdgePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('directedFace=[\n')
        level += 1
        for directedFace_ in self.directedFace:
            showIndent(outfile, level)
            outfile.write('model_.DirectedFacePropertyType(\n')
            directedFace_.exportLiteral(outfile, level, name_='DirectedFacePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.solidProperty is not None:
            showIndent(outfile, level)
            outfile.write('solidProperty=model_.solidProperty(\n')
            self.solidProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('universal', node)
        if value is not None and 'universal' not in already_processed:
            already_processed.add('universal')
            if value in ('true', '1'):
                self.universal = True
            elif value in ('false', '0'):
                self.universal = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        super(TopoSolidType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'isolated':
            obj_ = NodeOrEdgePropertyType.factory()
            obj_.build(child_)
            self.isolated.append(obj_)
            obj_.original_tagname_ = 'isolated'
        elif nodeName_ == 'directedFace':
            obj_ = DirectedFacePropertyType.factory()
            obj_.build(child_)
            self.directedFace.append(obj_)
            obj_.original_tagname_ = 'directedFace'
        elif nodeName_ == 'solidProperty':
            obj_ = SolidPropertyType.factory()
            obj_.build(child_)
            self.solidProperty = obj_
            obj_.original_tagname_ = 'solidProperty'
        super(TopoSolidType, self).buildChildren(child_, node, nodeName_, True)
# end class TopoSolidType


class FaceType(AbstractTopoPrimitiveType):
    """If the topological representation exists an unbounded manifold (e.g.
    Euclidean plane), a gml:Face must indicate whether it is a
    universal face or not, to ensure a lossless topology
    representation as defined by Kuijpers, et. al. (see OGC 05-102
    Topology IPR). The optional universal attribute of type boolean
    is used to indicate this. NOTE The universal face is normally
    not part of any feature, and is used to represent the unbounded
    portion of the data set. Its interior boundary (it has no
    exterior boundary) would normally be considered the exterior
    boundary of the map represented by the data set."""
    subclass = None
    superclass = AbstractTopoPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, universal=False, isolated=None, directedEdge=None, directedTopoSolid=None, surfaceProperty=None):
        self.original_tagname_ = None
        super(FaceType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        self.universal = _cast(bool, universal)
        if isolated is None:
            self.isolated = []
        else:
            self.isolated = isolated
        if directedEdge is None:
            self.directedEdge = []
        else:
            self.directedEdge = directedEdge
        if directedTopoSolid is None:
            self.directedTopoSolid = []
        else:
            self.directedTopoSolid = directedTopoSolid
        self.surfaceProperty = surfaceProperty
    def factory(*args_, **kwargs_):
        if FaceType.subclass:
            return FaceType.subclass(*args_, **kwargs_)
        else:
            return FaceType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_isolated(self): return self.isolated
    def set_isolated(self, isolated): self.isolated = isolated
    def add_isolated(self, value): self.isolated.append(value)
    def insert_isolated_at(self, index, value): self.isolated.insert(index, value)
    def replace_isolated_at(self, index, value): self.isolated[index] = value
    def get_directedEdge(self): return self.directedEdge
    def set_directedEdge(self, directedEdge): self.directedEdge = directedEdge
    def add_directedEdge(self, value): self.directedEdge.append(value)
    def insert_directedEdge_at(self, index, value): self.directedEdge.insert(index, value)
    def replace_directedEdge_at(self, index, value): self.directedEdge[index] = value
    def get_directedTopoSolid(self): return self.directedTopoSolid
    def set_directedTopoSolid(self, directedTopoSolid): self.directedTopoSolid = directedTopoSolid
    def add_directedTopoSolid(self, value): self.directedTopoSolid.append(value)
    def insert_directedTopoSolid_at(self, index, value): self.directedTopoSolid.insert(index, value)
    def replace_directedTopoSolid_at(self, index, value): self.directedTopoSolid[index] = value
    def get_surfaceProperty(self): return self.surfaceProperty
    def set_surfaceProperty(self, surfaceProperty): self.surfaceProperty = surfaceProperty
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def get_universal(self): return self.universal
    def set_universal(self, universal): self.universal = universal
    def hasContent_(self):
        if (
            self.isolated or
            self.directedEdge or
            self.directedTopoSolid or
            self.surfaceProperty is not None or
            super(FaceType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='FaceType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FaceType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='FaceType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='FaceType'):
        super(FaceType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='FaceType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
        if self.universal is not None and 'universal' not in already_processed:
            already_processed.add('universal')
            outfile.write(' universal="%s"' % self.gds_format_boolean(self.universal, input_name='universal'))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='FaceType', fromsubclass_=False, pretty_print=True):
        super(FaceType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for isolated_ in self.isolated:
            isolated_.export(outfile, level, namespace_, name_='isolated', pretty_print=pretty_print)
        for directedEdge_ in self.directedEdge:
            directedEdge_.export(outfile, level, namespace_='gml:', name_='directedEdge', pretty_print=pretty_print)
        for directedTopoSolid_ in self.directedTopoSolid:
            directedTopoSolid_.export(outfile, level, namespace_='gml:', name_='directedTopoSolid', pretty_print=pretty_print)
        if self.surfaceProperty is not None:
            self.surfaceProperty.export(outfile, level, namespace_='gml:', name_='surfaceProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='FaceType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        if self.universal is not None and 'universal' not in already_processed:
            already_processed.add('universal')
            showIndent(outfile, level)
            outfile.write('universal=%s,\n' % (self.universal,))
        super(FaceType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(FaceType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('isolated=[\n')
        level += 1
        for isolated_ in self.isolated:
            showIndent(outfile, level)
            outfile.write('model_.NodePropertyType(\n')
            isolated_.exportLiteral(outfile, level, name_='NodePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('directedEdge=[\n')
        level += 1
        for directedEdge_ in self.directedEdge:
            showIndent(outfile, level)
            outfile.write('model_.DirectedEdgePropertyType(\n')
            directedEdge_.exportLiteral(outfile, level, name_='DirectedEdgePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('directedTopoSolid=[\n')
        level += 1
        for directedTopoSolid_ in self.directedTopoSolid:
            showIndent(outfile, level)
            outfile.write('model_.directedTopoSolid(\n')
            directedTopoSolid_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.surfaceProperty is not None:
            showIndent(outfile, level)
            outfile.write('surfaceProperty=model_.surfaceProperty(\n')
            self.surfaceProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        value = find_attr_value_('universal', node)
        if value is not None and 'universal' not in already_processed:
            already_processed.add('universal')
            if value in ('true', '1'):
                self.universal = True
            elif value in ('false', '0'):
                self.universal = False
            else:
                raise_parse_error(node, 'Bad boolean attribute')
        super(FaceType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'isolated':
            obj_ = NodePropertyType.factory()
            obj_.build(child_)
            self.isolated.append(obj_)
            obj_.original_tagname_ = 'isolated'
        elif nodeName_ == 'directedEdge':
            obj_ = DirectedEdgePropertyType.factory()
            obj_.build(child_)
            self.directedEdge.append(obj_)
            obj_.original_tagname_ = 'directedEdge'
        elif nodeName_ == 'directedTopoSolid':
            obj_ = DirectedTopoSolidPropertyType.factory()
            obj_.build(child_)
            self.directedTopoSolid.append(obj_)
            obj_.original_tagname_ = 'directedTopoSolid'
        elif nodeName_ == 'surfaceProperty':
            obj_ = SurfacePropertyType.factory()
            obj_.build(child_)
            self.surfaceProperty = obj_
            obj_.original_tagname_ = 'surfaceProperty'
        super(FaceType, self).buildChildren(child_, node, nodeName_, True)
# end class FaceType


class EdgeType(AbstractTopoPrimitiveType):
    subclass = None
    superclass = AbstractTopoPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, container=None, directedNode=None, directedFace=None, curveProperty=None):
        self.original_tagname_ = None
        super(EdgeType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        self.container = container
        if directedNode is None:
            self.directedNode = []
        else:
            self.directedNode = directedNode
        if directedFace is None:
            self.directedFace = []
        else:
            self.directedFace = directedFace
        self.curveProperty = curveProperty
    def factory(*args_, **kwargs_):
        if EdgeType.subclass:
            return EdgeType.subclass(*args_, **kwargs_)
        else:
            return EdgeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_container(self): return self.container
    def set_container(self, container): self.container = container
    def get_directedNode(self): return self.directedNode
    def set_directedNode(self, directedNode): self.directedNode = directedNode
    def add_directedNode(self, value): self.directedNode.append(value)
    def insert_directedNode_at(self, index, value): self.directedNode.insert(index, value)
    def replace_directedNode_at(self, index, value): self.directedNode[index] = value
    def get_directedFace(self): return self.directedFace
    def set_directedFace(self, directedFace): self.directedFace = directedFace
    def add_directedFace(self, value): self.directedFace.append(value)
    def insert_directedFace_at(self, index, value): self.directedFace.insert(index, value)
    def replace_directedFace_at(self, index, value): self.directedFace[index] = value
    def get_curveProperty(self): return self.curveProperty
    def set_curveProperty(self, curveProperty): self.curveProperty = curveProperty
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.container is not None or
            self.directedNode or
            self.directedFace or
            self.curveProperty is not None or
            super(EdgeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='EdgeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='EdgeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='EdgeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='EdgeType'):
        super(EdgeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='EdgeType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='EdgeType', fromsubclass_=False, pretty_print=True):
        super(EdgeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.container is not None:
            self.container.export(outfile, level, namespace_, name_='container', pretty_print=pretty_print)
        for directedNode_ in self.directedNode:
            directedNode_.export(outfile, level, namespace_='gml:', name_='directedNode', pretty_print=pretty_print)
        for directedFace_ in self.directedFace:
            directedFace_.export(outfile, level, namespace_='gml:', name_='directedFace', pretty_print=pretty_print)
        if self.curveProperty is not None:
            self.curveProperty.export(outfile, level, namespace_='gml:', name_='curveProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='EdgeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(EdgeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(EdgeType, self).exportLiteralChildren(outfile, level, name_)
        if self.container is not None:
            showIndent(outfile, level)
            outfile.write('container=model_.TopoSolidPropertyType(\n')
            self.container.exportLiteral(outfile, level, name_='container')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('directedNode=[\n')
        level += 1
        for directedNode_ in self.directedNode:
            showIndent(outfile, level)
            outfile.write('model_.DirectedNodePropertyType(\n')
            directedNode_.exportLiteral(outfile, level, name_='DirectedNodePropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('directedFace=[\n')
        level += 1
        for directedFace_ in self.directedFace:
            showIndent(outfile, level)
            outfile.write('model_.directedFace(\n')
            directedFace_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.curveProperty is not None:
            showIndent(outfile, level)
            outfile.write('curveProperty=model_.curveProperty(\n')
            self.curveProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(EdgeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'container':
            obj_ = TopoSolidPropertyType.factory()
            obj_.build(child_)
            self.container = obj_
            obj_.original_tagname_ = 'container'
        elif nodeName_ == 'directedNode':
            obj_ = DirectedNodePropertyType.factory()
            obj_.build(child_)
            self.directedNode.append(obj_)
            obj_.original_tagname_ = 'directedNode'
        elif nodeName_ == 'directedFace':
            obj_ = DirectedFacePropertyType.factory()
            obj_.build(child_)
            self.directedFace.append(obj_)
            obj_.original_tagname_ = 'directedFace'
        elif nodeName_ == 'curveProperty':
            obj_ = CurvePropertyType.factory()
            obj_.build(child_)
            self.curveProperty = obj_
            obj_.original_tagname_ = 'curveProperty'
        super(EdgeType, self).buildChildren(child_, node, nodeName_, True)
# end class EdgeType


class NodeType(AbstractTopoPrimitiveType):
    subclass = None
    superclass = AbstractTopoPrimitiveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, aggregationType=None, container=None, directedEdge=None, pointProperty=None):
        self.original_tagname_ = None
        super(NodeType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, )
        self.aggregationType = _cast(None, aggregationType)
        self.container = container
        if directedEdge is None:
            self.directedEdge = []
        else:
            self.directedEdge = directedEdge
        self.pointProperty = pointProperty
    def factory(*args_, **kwargs_):
        if NodeType.subclass:
            return NodeType.subclass(*args_, **kwargs_)
        else:
            return NodeType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_container(self): return self.container
    def set_container(self, container): self.container = container
    def get_directedEdge(self): return self.directedEdge
    def set_directedEdge(self, directedEdge): self.directedEdge = directedEdge
    def add_directedEdge(self, value): self.directedEdge.append(value)
    def insert_directedEdge_at(self, index, value): self.directedEdge.insert(index, value)
    def replace_directedEdge_at(self, index, value): self.directedEdge[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def get_aggregationType(self): return self.aggregationType
    def set_aggregationType(self, aggregationType): self.aggregationType = aggregationType
    def hasContent_(self):
        if (
            self.container is not None or
            self.directedEdge or
            self.pointProperty is not None or
            super(NodeType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='NodeType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='NodeType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='NodeType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='NodeType'):
        super(NodeType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='NodeType')
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            outfile.write(' aggregationType=%s' % (quote_attrib(self.aggregationType), ))
    def exportChildren(self, outfile, level, namespace_='gml:', name_='NodeType', fromsubclass_=False, pretty_print=True):
        super(NodeType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.container is not None:
            self.container.export(outfile, level, namespace_, name_='container', pretty_print=pretty_print)
        for directedEdge_ in self.directedEdge:
            directedEdge_.export(outfile, level, namespace_='gml:', name_='directedEdge', pretty_print=pretty_print)
        if self.pointProperty is not None:
            self.pointProperty.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='NodeType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.aggregationType is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            showIndent(outfile, level)
            outfile.write('aggregationType=%s,\n' % (self.aggregationType,))
        super(NodeType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(NodeType, self).exportLiteralChildren(outfile, level, name_)
        if self.container is not None:
            showIndent(outfile, level)
            outfile.write('container=model_.FaceOrTopoSolidPropertyType(\n')
            self.container.exportLiteral(outfile, level, name_='container')
            showIndent(outfile, level)
            outfile.write('),\n')
        showIndent(outfile, level)
        outfile.write('directedEdge=[\n')
        level += 1
        for directedEdge_ in self.directedEdge:
            showIndent(outfile, level)
            outfile.write('model_.directedEdge(\n')
            directedEdge_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.pointProperty is not None:
            showIndent(outfile, level)
            outfile.write('pointProperty=model_.pointProperty(\n')
            self.pointProperty.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('aggregationType', node)
        if value is not None and 'aggregationType' not in already_processed:
            already_processed.add('aggregationType')
            self.aggregationType = value
        super(NodeType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'container':
            obj_ = FaceOrTopoSolidPropertyType.factory()
            obj_.build(child_)
            self.container = obj_
            obj_.original_tagname_ = 'container'
        elif nodeName_ == 'directedEdge':
            obj_ = DirectedEdgePropertyType.factory()
            obj_.build(child_)
            self.directedEdge.append(obj_)
            obj_.original_tagname_ = 'directedEdge'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty = obj_
            obj_.original_tagname_ = 'pointProperty'
        super(NodeType, self).buildChildren(child_, node, nodeName_, True)
# end class NodeType


class LineStringType(AbstractCurveType):
    subclass = None
    superclass = AbstractCurveType
    def __init__(self, id=None, metaDataProperty=None, description=None, descriptionReference=None, identifier=None, name=None, srsName=None, axisLabels=None, uomLabels=None, srsDimension=None, pos=None, pointProperty=None, pointRep=None, posList=None, coordinates=None):
        self.original_tagname_ = None
        super(LineStringType, self).__init__(id, metaDataProperty, description, descriptionReference, identifier, name, srsName, axisLabels, uomLabels, srsDimension, )
        if pos is None:
            self.pos = []
        else:
            self.pos = pos
        if pointProperty is None:
            self.pointProperty = []
        else:
            self.pointProperty = pointProperty
        if pointRep is None:
            self.pointRep = []
        else:
            self.pointRep = pointRep
        self.posList = posList
        self.coordinates = coordinates
    def factory(*args_, **kwargs_):
        if LineStringType.subclass:
            return LineStringType.subclass(*args_, **kwargs_)
        else:
            return LineStringType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pos(self): return self.pos
    def set_pos(self, pos): self.pos = pos
    def add_pos(self, value): self.pos.append(value)
    def insert_pos_at(self, index, value): self.pos.insert(index, value)
    def replace_pos_at(self, index, value): self.pos[index] = value
    def get_pointProperty(self): return self.pointProperty
    def set_pointProperty(self, pointProperty): self.pointProperty = pointProperty
    def add_pointProperty(self, value): self.pointProperty.append(value)
    def insert_pointProperty_at(self, index, value): self.pointProperty.insert(index, value)
    def replace_pointProperty_at(self, index, value): self.pointProperty[index] = value
    def get_pointRep(self): return self.pointRep
    def set_pointRep(self, pointRep): self.pointRep = pointRep
    def add_pointRep(self, value): self.pointRep.append(value)
    def insert_pointRep_at(self, index, value): self.pointRep.insert(index, value)
    def replace_pointRep_at(self, index, value): self.pointRep[index] = value
    def get_posList(self): return self.posList
    def set_posList(self, posList): self.posList = posList
    def get_coordinates(self): return self.coordinates
    def set_coordinates(self, coordinates): self.coordinates = coordinates
    def hasContent_(self):
        if (
            self.pos or
            self.pointProperty or
            self.pointRep or
            self.posList is not None or
            self.coordinates is not None or
            super(LineStringType, self).hasContent_()
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespace_='gml:', name_='LineStringType', namespacedef_='', pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None:
            name_ = self.original_tagname_
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LineStringType')
        if self.hasContent_():
            outfile.write('>%s' % (eol_, ))
            self.exportChildren(outfile, level + 1, namespace_='gml:', name_='LineStringType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def exportAttributes(self, outfile, level, already_processed, namespace_='gml:', name_='LineStringType'):
        super(LineStringType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LineStringType')
    def exportChildren(self, outfile, level, namespace_='gml:', name_='LineStringType', fromsubclass_=False, pretty_print=True):
        super(LineStringType, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for pos_ in self.pos:
            pos_.export(outfile, level, namespace_='gml:', name_='pos', pretty_print=pretty_print)
        for pointProperty_ in self.pointProperty:
            pointProperty_.export(outfile, level, namespace_='gml:', name_='pointProperty', pretty_print=pretty_print)
        for pointRep_ in self.pointRep:
            pointRep_.export(outfile, level, namespace_='gml:', name_='pointRep', pretty_print=pretty_print)
        if self.posList is not None:
            self.posList.export(outfile, level, namespace_='gml:', name_='posList', pretty_print=pretty_print)
        if self.coordinates is not None:
            self.coordinates.export(outfile, level, namespace_='gml:', name_='coordinates', pretty_print=pretty_print)
    def exportLiteral(self, outfile, level, name_='LineStringType'):
        level += 1
        already_processed = set()
        self.exportLiteralAttributes(outfile, level, already_processed, name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        super(LineStringType, self).exportLiteralAttributes(outfile, level, already_processed, name_)
    def exportLiteralChildren(self, outfile, level, name_):
        super(LineStringType, self).exportLiteralChildren(outfile, level, name_)
        showIndent(outfile, level)
        outfile.write('pos=[\n')
        level += 1
        for pos_ in self.pos:
            showIndent(outfile, level)
            outfile.write('model_.DirectPositionType(\n')
            pos_.exportLiteral(outfile, level, name_='DirectPositionType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointProperty=[\n')
        level += 1
        for pointProperty_ in self.pointProperty:
            showIndent(outfile, level)
            outfile.write('model_.PointPropertyType(\n')
            pointProperty_.exportLiteral(outfile, level, name_='PointPropertyType')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        showIndent(outfile, level)
        outfile.write('pointRep=[\n')
        level += 1
        for pointRep_ in self.pointRep:
            showIndent(outfile, level)
            outfile.write('model_.pointRep(\n')
            pointRep_.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
        if self.posList is not None:
            showIndent(outfile, level)
            outfile.write('posList=model_.DirectPositionListType(\n')
            self.posList.exportLiteral(outfile, level, name_='posList')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.coordinates is not None:
            showIndent(outfile, level)
            outfile.write('coordinates=model_.coordinates(\n')
            self.coordinates.exportLiteral(outfile, level)
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        already_processed = set()
        self.buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
        return self
    def buildAttributes(self, node, attrs, already_processed):
        super(LineStringType, self).buildAttributes(node, attrs, already_processed)
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pos':
            class_obj_ = self.get_class_obj_(child_, DirectPositionType)
            obj_ = class_obj_.factory()
            obj_.build(child_)
            self.pos.append(obj_)
            obj_.original_tagname_ = 'pos'
        elif nodeName_ == 'pointProperty':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointProperty.append(obj_)
            obj_.original_tagname_ = 'pointProperty'
        elif nodeName_ == 'pointRep':
            obj_ = PointPropertyType.factory()
            obj_.build(child_)
            self.pointRep.append(obj_)
            obj_.original_tagname_ = 'pointRep'
        elif nodeName_ == 'posList':
            obj_ = DirectPositionListType.factory()
            obj_.build(child_)
            self.posList = obj_
            obj_.original_tagname_ = 'posList'
        elif nodeName_ == 'coordinates':
            obj_ = CoordinatesType.factory()
            obj_.build(child_)
            self.coordinates = obj_
            obj_.original_tagname_ = 'coordinates'
        super(LineStringType, self).buildChildren(child_, node, nodeName_, True)
# end class LineStringType


GDSClassesMapping = {
    'sourceCitation': CI_Citation_PropertyType,
    'code': CharacterString_PropertyType,
    'acceleration': MeasureType,
    'westBoundLongitude': Decimal_PropertyType,
    'userDefinedCS': UserDefinedCSPropertyType,
    'OrientableCurve': OrientableCurveType,
    'sphericalCS': SphericalCSPropertyType,
    'concatenatedOperationRef': ConcatenatedOperationPropertyType,
    'portrayalCatalogueInfo': MD_PortrayalCatalogueReference_PropertyType,
    'sourceExtent': EX_Extent_PropertyType,
    'linearCS': LinearCSPropertyType,
    'subComplex': TopoComplexPropertyType,
    'patches': SurfacePatchArrayPropertyType,
    'TimeEdge': TimeEdgeType,
    'segments': CurveSegmentArrayPropertyType,
    'cartesianCS': CartesianCSPropertyType,
    'rangeMeaning': CodeWithAuthorityType,
    'TypeName': TypeName_Type,
    'EX_TemporalExtent': EX_TemporalExtent_Type,
    'baseGeodeticCRS': GeodeticCRSPropertyType,
    'indirectEntry': IndirectEntryType,
    'scaleDenominator': MD_RepresentativeFraction_PropertyType,
    'pointMembers': PointArrayPropertyType,
    'VerticalCS': VerticalCSType,
    'crsRef': CRSPropertyType,
    'evaluationMethodDescription': CharacterString_PropertyType,
    'characterEncoding': MD_CharacterSetCode_PropertyType,
    'measureDescription': CharacterString_PropertyType,
    'RecordType': RecordType_Type,
    'usesTemporalDatum': TemporalDatumPropertyType,
    'statusReference': ReferenceType,
    'MappingRule': StringOrRefType,
    'derivationUnitTerm': DerivationUnitTermType,
    'maxLength': LengthType,
    'dmsAngle': DMSAngleType,
    'offLine': MD_Medium_PropertyType,
    'sourceCRS': CRSPropertyType,
    'condition': CharacterString_PropertyType,
    'baseSurface': SurfacePropertyType,
    'MultiPoint': MultiPointType,
    'usesAffineCS': AffineCSPropertyType,
    'anchorPoint': CodeType,
    'usesGeodeticDatum': GeodeticDatumPropertyType,
    'level': MD_ScopeCode_PropertyType,
    'MD_DimensionNameTypeCode': CodeListValue_Type,
    'evaluationMethodType': DQ_EvaluationMethodTypeCode_PropertyType,
    'ArcByBulge': ArcByBulgeType,
    'vector': VectorType,
    'facsimile': CharacterString_PropertyType,
    'imageCRSRef': ImageCRSPropertyType,
    'metaDataProperty': MetaDataPropertyType,
    'Ring': RingType,
    'usesCartesianCS': CartesianCSPropertyType,
    'AffinePlacement': AffinePlacementType,
    'CI_OnlineResource': CI_OnlineResource_Type,
    'AbstractCoordinateOperation': AbstractCoordinateOperationType,
    'upper': UnlimitedInteger_PropertyType,
    'pixelInCell': CodeWithAuthorityType,
    'MD_BrowseGraphic': MD_BrowseGraphic_Type,
    'BaseUnit': BaseUnitType,
    'timePosition': TimePositionType,
    'MultiSurface': MultiSurfaceType,
    'CI_Telephone': CI_Telephone_Type,
    'transferOptions': MD_DigitalTransferOptions_PropertyType,
    'linearCSRef': LinearCSPropertyType,
    'AbstractDQ_PositionalAccuracy': AbstractDQ_PositionalAccuracy_Type,
    'pass': Boolean_PropertyType,
    'DQ_TemporalConsistency': DQ_TemporalConsistency_Type,
    'PolarCS': PolarCSType,
    'Circle': CircleType,
    'OperationMethod': OperationMethodType,
    'compoundCRSRef': CompoundCRSPropertyType,
    'Transformation': TransformationType,
    'axisDirection': CodeWithAuthorityType,
    'GridCoverage': DiscreteCoverageType,
    'metadataExtensionInfo': MD_MetadataExtensionInformation_PropertyType,
    'parentEntity': CharacterString_PropertyType,
    'specification': CharacterString_PropertyType,
    'coordinateSystemRef': CoordinateSystemPropertyType,
    'OperationParameterGroup': OperationParameterGroupType,
    'version': CharacterString_PropertyType,
    'Grid': GridType,
    'DQ_DomainConsistency': DQ_DomainConsistency_Type,
    'startAngle': AngleType,
    'distributionFormat': MD_Format_PropertyType,
    'coordinates': CoordinatesType,
    'conversionToPreferredUnit': ConversionToPreferredUnitType,
    'quantityTypeReference': ReferenceType,
    'mediumFormat': MD_MediumFormatCode_PropertyType,
    'MD_Usage': MD_Usage_Type,
    'validTime': TimePrimitivePropertyType,
    'Measure': MeasureType,
    'component': TimeOrdinalEraPropertyType,
    'DS_DataSet': DS_DataSet_Type,
    'descriptionReference': ReferenceType,
    'maximalComplex': TopoComplexPropertyType,
    'AbstractTimeObject': AbstractTimeObjectType,
    'dictionaryEntry': DictionaryEntryType,
    'RectifiedGridCoverage': DiscreteCoverageType,
    'CategoryList': CodeOrNilReasonListType,
    'conversionRef': ConversionPropertyType,
    'verticalDatum': VerticalDatumPropertyType,
    'ScopedName': CodeType,
    'ellipsoid': EllipsoidPropertyType,
    'semiMajorAxis': MeasureType,
    'coordOperation': CoordinateOperationPropertyType,
    'AbstractObject': AbstractObject_Type,
    'title': CharacterString_PropertyType,
    'DS_Series': DS_Series_Type,
    'ellipsoidalCS': EllipsoidalCSPropertyType,
    'radiometricCalibrationDataAvailability': Boolean_PropertyType,
    'TimeNode': TimeNodeType,
    'pointRep': PointPropertyType,
    'schemaAscii': CharacterString_PropertyType,
    'Cone': ConeType,
    'citedResponsibleParty': CI_ResponsibleParty_PropertyType,
    'resourceMaintenance': MD_MaintenanceInformation_PropertyType,
    'Binary': Binary_Type,
    'DQ_NonQuantitativeAttributeAccuracy': DQ_NonQuantitativeAttributeAccuracy_Type,
    'MultiSolid': MultiSolidType,
    'baseGeographicCRS': GeographicCRSPropertyType,
    'controlPointAvailability': Boolean_PropertyType,
    'DS_InitiativeTypeCode': CodeListValue_Type,
    'inverseFlattening': MeasureType,
    'ConventionalUnit': ConventionalUnitType,
    'dataSourceReference': ReferenceType,
    'userDefinedCSRef': UserDefinedCSPropertyType,
    'portrayalCatalogueCitation': CI_Citation_PropertyType,
    'EX_SpatialTemporalExtent': EX_SpatialTemporalExtent_Type,
    'domainOfValidity': EX_Extent_PropertyType,
    'Node': NodeType,
    'DQ_ConformanceResult': DQ_ConformanceResult_Type,
    'CompositeSolid': CompositeSolidType,
    'collectiveTitle': CharacterString_PropertyType,
    'spatialRepresentationInfo': MD_SpatialRepresentation_PropertyType,
    'DS_Association': DS_Association_Type,
    'includesValue': AbstractGeneralParameterValuePropertyType,
    'topoPrimitiveMembers': TopoPrimitiveArrayAssociationType,
    'sequenceRule': SequenceRuleType,
    'AbstractGriddedSurface': AbstractGriddedSurfaceType,
    'derivedCRSType': CodeWithAuthorityType,
    'type': MD_KeywordTypeCode_PropertyType,
    'directedFace': DirectedFacePropertyType,
    'unitsOfDistribution': CharacterString_PropertyType,
    'multiPointProperty': MultiPointPropertyType,
    'OperationParameter': OperationParameterType,
    'fileStructure': CodeType,
    'DQ_AbsoluteExternalPositionalAccuracy': DQ_AbsoluteExternalPositionalAccuracy_Type,
    'MultiSurfaceCoverage': DiscreteCoverageType,
    'axisAbbrev': CodeType,
    'MD_Georeferenceable': MD_Georeferenceable_Type,
    'AbstractImplicitGeometry': AbstractGeometryType,
    'generalOperationParameter': AbstractGeneralOperationParameterPropertyType,
    'geometricObjectType': MD_GeometricObjectTypeCode_PropertyType,
    'AbstractGeometricPrimitive': AbstractGeometricPrimitiveType,
    'transformationDimensionDescription': CharacterString_PropertyType,
    'lensDistortionInformationAvailability': Boolean_PropertyType,
    'editionDate': Date_PropertyType,
    'roughConversionToPreferredUnit': ConversionToPreferredUnitType,
    'geographicCRSRef': GeographicCRSPropertyType,
    'descriptor': CharacterString_PropertyType,
    'CoordinateSystemAxis': CoordinateSystemAxisType,
    'ImageCRS': ImageCRSType,
    'EX_GeographicBoundingBox': EX_GeographicBoundingBox_Type,
    'ellipsoidRef': EllipsoidPropertyType,
    'DynamicFeature': DynamicFeatureType,
    'VerticalDatum': VerticalDatumType,
    'history': HistoryPropertyType,
    'maximumOccurrence': CharacterString_PropertyType,
    'EX_BoundingPolygon': EX_BoundingPolygon_Type,
    'MD_Distributor': MD_Distributor_Type,
    'verticalElement': EX_VerticalExtent_PropertyType,
    'valueType': RecordType_PropertyType,
    'QuantityList': MeasureOrNilReasonListType,
    'MD_GeometricObjects': MD_GeometricObjects_Type,
    'codeSpace': CharacterString_PropertyType,
    'AbstractGenericName': CodeType,
    'DQ_CompletenessCommission': DQ_CompletenessCommission_Type,
    'DS_ProductionSeries': DS_ProductionSeries_Type,
    'ImageDatum': ImageDatumType,
    'AbstractTimePrimitive': AbstractTimePrimitiveType,
    'DQ_RelativeInternalPositionalAccuracy': DQ_RelativeInternalPositionalAccuracy_Type,
    'ellipsoidalCSRef': EllipsoidalCSPropertyType,
    'compressionGenerationQuantity': Integer_PropertyType,
    'axis': CoordinateSystemAxisPropertyType,
    'electronicMailAddress': CharacterString_PropertyType,
    'TopoVolume': TopoVolumeType,
    'end': TimeNodePropertyType,
    'vectorAtEnd': VectorType,
    'MD_StandardOrderProcess': MD_StandardOrderProcess_Type,
    'ISSN': CharacterString_PropertyType,
    'MD_SpatialRepresentationTypeCode': CodeListValue_Type,
    'applicationSchemaInfo': MD_ApplicationSchemaInformation_PropertyType,
    'AbstractGeneralParameterValue': AbstractGeneralParameterValueType,
    'dmsAngleValue': DMSAngleType,
    'resourceConstraints': MD_Constraints_PropertyType,
    'polarCS': PolarCSPropertyType,
    'DQ_ThematicClassificationCorrectness': DQ_ThematicClassificationCorrectness_Type,
    'MultiplicityRange': MultiplicityRange_Type,
    'AbstractDQ_ThematicAccuracy': AbstractDQ_ThematicAccuracy_Type,
    'topoComplexProperty': TopoComplexPropertyType,
    'unitOfMeasure': UnitOfMeasureType,
    'checkPointDescription': CharacterString_PropertyType,
    'GeodeticCRS': GeodeticCRSType,
    'Multiplicity': Multiplicity_Type,
    'EnvelopeWithTimePeriod': EnvelopeWithTimePeriodType,
    'referenceSystemInfo': MD_ReferenceSystem_PropertyType,
    'Curve': CurveType,
    'maxValue': Real_PropertyType,
    'sequenceIdentifier': MemberName_PropertyType,
    'schemaLanguage': CharacterString_PropertyType,
    'dataQualityInfo': DQ_DataQuality_PropertyType,
    'date': CI_Date_PropertyType,
    'breakLines': LineStringSegmentArrayPropertyType,
    'EX_Extent': EX_Extent_Type,
    'featureInstances': ObjectReference_PropertyType,
    'PT_LocaleContainer': PT_LocaleContainer_Type,
    'temporalDatum': TemporalDatumPropertyType,
    'MD_Georectified': MD_Georectified_Type,
    'AbstractCoverage': AbstractCoverageType,
    'featureMember': FeaturePropertyType,
    'AbstractSingleOperation': AbstractCoordinateOperationType,
    'amendmentNumber': CharacterString_PropertyType,
    'description': CharacterString_PropertyType,
    'AbstractGeometry': AbstractGeometryType,
    'element': GeometricPrimitivePropertyType,
    'Sphere': SphereType,
    'DirectedObservation': DirectedObservationType,
    'File': FileType,
    'multiExtentOf': MultiSurfacePropertyType,
    'TimeInstant': TimeInstantType,
    'DS_StereoMate': DS_StereoMate_Type,
    'usesMethod': OperationMethodPropertyType,
    'previousEdge': TimeEdgePropertyType,
    'valueProperty': ValuePropertyType,
    'extendedElementInformation': MD_ExtendedElementInformation_PropertyType,
    'usesCS': CoordinateSystemPropertyType,
    'relatedTime': RelatedTimeType,
    'imageQualityCode': MD_Identifier_PropertyType,
    'attributeType': TypeName_PropertyType,
    'engineeringCRSRef': EngineeringCRSPropertyType,
    'MD_SecurityConstraints': MD_SecurityConstraints_Type,
    'upperCorner': DirectPositionType,
    'LanguageCode': CodeListValue_Type,
    'Shell': ShellType,
    'group': ReferenceType,
    'updateScopeDescription': MD_ScopeDescription_PropertyType,
    'DQ_GriddedDataPositionalAccuracy': DQ_GriddedDataPositionalAccuracy_Type,
    'UserDefinedCS': UserDefinedCSType,
    'anchorDefinition': CodeType,
    'surfaceMember': SurfacePropertyType,
    'complianceCode': Boolean_PropertyType,
    'MD_RangeDimension': MD_RangeDimension_Type,
    'filmDistortionInformationAvailability': Boolean_PropertyType,
    'degrees': DegreesType,
    'edgeOf': CurvePropertyType,
    'TimePeriod': TimePeriodType,
    'MD_KeywordTypeCode': CodeListValue_Type,
    'environmentDescription': CharacterString_PropertyType,
    'Solid': SolidType,
    'generalConversionRef': GeneralConversionPropertyType,
    'MD_MediumNameCode': CodeListValue_Type,
    'AbstractGML': AbstractGMLType,
    'fileName': CharacterString_PropertyType,
    'units': UomLength_PropertyType,
    'geometricObjectCount': Integer_PropertyType,
    'contactInstructions': CharacterString_PropertyType,
    'dataSource': StringOrRefType,
    'onLine': CI_OnlineResource_PropertyType,
    'superset': DS_Aggregate_PropertyType,
    'lineage': LI_Lineage_PropertyType,
    'MD_Format': MD_Format_Type,
    'beginPosition': TimePositionType,
    'referenceSystemIdentifier': RS_Identifier_PropertyType,
    'name': CharacterString_PropertyType,
    'parameter': AbstractGeneralOperationParameterPropertyType,
    'CompositeSurface': CompositeSurfaceType,
    'valuesOfGroup': OperationParameterGroupPropertyType,
    'OffsetCurve': OffsetCurveType,
    'MD_CoverageContentTypeCode': CodeListValue_Type,
    'DirectedObservationAtDistance': DirectedObservationAtDistanceType,
    'errorStatistic': CharacterString_PropertyType,
    'engineeringDatum': EngineeringDatumPropertyType,
    'DQ_FormatConsistency': DQ_FormatConsistency_Type,
    'ArcByCenterPoint': ArcByCenterPointType,
    'singleOperationRef': SingleOperationPropertyType,
    'identifier': MD_Identifier_PropertyType,
    'horizontalAngle': AngleType,
    'subset': DS_Aggregate_PropertyType,
    'curveArrayProperty': CurveArrayPropertyType,
    'orientationParameterDescription': CharacterString_PropertyType,
    'endPosition': TimePositionType,
    'seriesMetadata': MD_Metadata_PropertyType,
    'Distance': LengthType,
    'series': CI_Series_PropertyType,
    'dimensionSize': Integer_PropertyType,
    'MD_ReferenceSystem': MD_ReferenceSystem_Type,
    'evaluationProcedure': CI_Citation_PropertyType,
    'member': AssociationRoleType,
    'Surface': SurfaceType,
    'measure': MeasureType,
    'distributor': MD_Distributor_PropertyType,
    'refDirection': VectorType,
    'pointInPixel': MD_PixelOrientationCode_PropertyType,
    'componentReferenceSystem': SingleCRSPropertyType,
    'MD_AggregateInformation': MD_AggregateInformation_Type,
    'container': TopoSolidPropertyType,
    'geodeticDatumRef': GeodeticDatumPropertyType,
    'TimeClock': TimeClockType,
    'CI_ResponsibleParty': CI_ResponsibleParty_Type,
    'dynamicMembers': DynamicFeatureMemberType,
    'includedWithDataset': Boolean_PropertyType,
    'multiSolidProperty': MultiSolidPropertyType,
    'formula': CodeType,
    'AbstractGeometricAggregate': AbstractGeometricAggregateType,
    'axisDimensionProperties': MD_Dimension_PropertyType,
    'distributionInfo': MD_Distribution_PropertyType,
    'classification': MD_ClassificationCode_PropertyType,
    'abstractGeneralOperationParameterRef': AbstractGeneralOperationParameterPropertyType,
    'positionName': CharacterString_PropertyType,
    'baseCurve': CurvePropertyType,
    'curveMember': CurvePropertyType,
    'RS_Identifier': RS_Identifier_Type,
    'pointMember': PointPropertyType,
    'geographicIdentifier': MD_Identifier_PropertyType,
    'updateScope': MD_ScopeCode_PropertyType,
    'TopoCurve': TopoCurveType,
    'members': ArrayAssociationType,
    'AbstractSurfacePatch': AbstractSurfacePatchType,
    'obligation': MD_ObligationCode_PropertyType,
    'DS_Platform': DS_Platform_Type,
    'CompoundCRS': CompoundCRSType,
    'definition': CharacterString_PropertyType,
    'LinearCS': LinearCSType,
    'language': CharacterString_PropertyType,
    'Point': PointType,
    'TopoSolid': TopoSolidType,
    'attributeInstances': ObjectReference_PropertyType,
    'onlineResource': CI_OnlineResource_PropertyType,
    'locationName': CodeType,
    'constraintLanguage': CharacterString_PropertyType,
    'MD_PortrayalCatalogueReference': MD_PortrayalCatalogueReference_Type,
    'MD_ClassificationCode': CodeListValue_Type,
    'coverageFunction': CoverageFunctionType,
    'definitionRef': ReferenceType,
    'aName': CharacterString_PropertyType,
    'origin': TimeInstantPropertyType,
    'organisationName': CharacterString_PropertyType,
    'multiSolidDomain': DomainSetType,
    'features': ObjectReference_PropertyType,
    'Ellipsoid': EllipsoidType,
    'MultiPointCoverage': DiscreteCoverageType,
    'MD_RestrictionCode': CodeListValue_Type,
    'CI_OnLineFunctionCode': CodeListValue_Type,
    'TemporalCRS': TemporalCRSType,
    'imagingCondition': MD_ImagingConditionCode_PropertyType,
    'maintenanceAndUpdateFrequency': MD_MaintenanceFrequencyCode_PropertyType,
    'quantityType': StringOrRefType,
    'fees': CharacterString_PropertyType,
    'directedTopoSolid': DirectedTopoSolidPropertyType,
    'AbstractDQ_Completeness': AbstractDQ_Completeness_Type,
    'city': CharacterString_PropertyType,
    'MD_RepresentativeFraction': MD_RepresentativeFraction_Type,
    'CI_Contact': CI_Contact_Type,
    'MD_FeatureCatalogueDescription': MD_FeatureCatalogueDescription_Type,
    'Dictionary': DictionaryType,
    'MD_MaintenanceInformation': MD_MaintenanceInformation_Type,
    'superComplex': TopoComplexPropertyType,
    'UnlimitedInteger': UnlimitedInteger_Type,
    'statement': CharacterString_PropertyType,
    'trianglePatches': SurfacePatchArrayPropertyType,
    'LI_ProcessStep': LI_ProcessStep_Type,
    'gridDomain': DomainSetType,
    'multiCurveProperty': MultiCurvePropertyType,
    'MD_DigitalTransferOptions': MD_DigitalTransferOptions_Type,
    'PT_FreeText': PT_FreeText_Type,
    'MD_DatatypeCode': CodeListValue_Type,
    'EllipsoidalCS': EllipsoidalCSType,
    'BSpline': BSplineType,
    'Edge': EdgeType,
    'TemporalCS': TemporalCSType,
    'timeCS': TimeCSPropertyType,
    'fileDecompressionTechnique': CharacterString_PropertyType,
    'distance': MeasureType,
    'EngineeringCRS': EngineeringCRSType,
    'target': TargetPropertyType,
    'keyword': CodeType,
    'greenwichLongitude': AngleType,
    'coordinateOperationRef': CoordinateOperationPropertyType,
    'rangeParameters': AssociationRoleType,
    'PrimeMeridian': PrimeMeridianType,
    'ValueArray': ValueArrayType,
    'multiCenterLineOf': MultiCurvePropertyType,
    'abstractAssociationRole': AssociationRoleType,
    'dataSetURI': CharacterString_PropertyType,
    'cylindricalCS': CylindricalCSPropertyType,
    'function': CI_OnLineFunctionCode_PropertyType,
    'MD_Dimension': MD_Dimension_Type,
    'ISBN': CharacterString_PropertyType,
    'DQ_CompletenessOmission': DQ_CompletenessOmission_Type,
    'featureProperty': FeaturePropertyType,
    'dimensionName': MD_DimensionNameTypeCode_PropertyType,
    'DQ_EvaluationMethodTypeCode': CodeListValue_Type,
    'usesVerticalDatum': VerticalDatumPropertyType,
    'imageDatumRef': ImageDatumPropertyType,
    'southBoundLatitude': Decimal_PropertyType,
    'unitsSystem': ReferenceType,
    'timeInterval': TimeIntervalLengthType,
    'usesEngineeringDatum': EngineeringDatumPropertyType,
    'topoPrimitiveMember': TopoPrimitiveMemberType,
    'distributorFormat': MD_Format_PropertyType,
    'angle': AngleType,
    'DerivedCRS': DerivedCRSType,
    'parameterCitation': CI_Citation_PropertyType,
    'composedOf': DS_DataSet_PropertyType,
    'isolated': NodeOrEdgePropertyType,
    'specificUsage': CharacterString_PropertyType,
    'Observation': ObservationType,
    'directedEdge': DirectedEdgePropertyType,
    'cartesianCSRef': CartesianCSPropertyType,
    'CategoryExtent': CategoryExtentType,
    'interior': AbstractRingPropertyType,
    'explanation': CharacterString_PropertyType,
    'GeometricComplex': GeometricComplexType,
    'begin': TimeInstantPropertyType,
    'usesEllipsoidalCS': EllipsoidalCSPropertyType,
    'illuminationElevationAngle': Real_PropertyType,
    'normal': VectorType,
    'MD_VectorSpatialRepresentation': MD_VectorSpatialRepresentation_Type,
    'transferSize': Real_PropertyType,
    'denominator': Integer_PropertyType,
    'peakResponse': Real_PropertyType,
    'AbstractDatum': AbstractDatumType,
    'MD_CharacterSetCode': CodeListValue_Type,
    'ParameterValue': ParameterValueType,
    'CI_Address': CI_Address_Type,
    'rationale': CharacterString_PropertyType,
    'affineCS': AffineCSPropertyType,
    'CompositeCurve': CompositeCurveType,
    'dateBasis': TimeCalendarPropertyType,
    'targetCRS': CRSPropertyType,
    'pointOfContact': CI_ResponsibleParty_PropertyType,
    'FeatureCollection': FeatureCollectionType,
    'contentInfo': MD_ContentInformation_PropertyType,
    'TimeReferenceSystem': TimeReferenceSystemType,
    'cloudCoverPercentage': Real_PropertyType,
    'densityUnits': CharacterString_PropertyType,
    'usesValue': AbstractGeneralParameterValuePropertyType,
    'DQ_QuantitativeAttributeAccuracy': DQ_QuantitativeAttributeAccuracy_Type,
    'Array': ArrayType,
    'CubicSpline': CubicSplineType,
    'parentIdentifier': CharacterString_PropertyType,
    'maintenanceNote': CharacterString_PropertyType,
    'ArcStringByBulge': ArcStringByBulgeType,
    'illuminationAzimuthAngle': Real_PropertyType,
    'AbstractMD_ContentInformation': AbstractMD_ContentInformation_Type,
    'spatialResolution': MD_Resolution_PropertyType,
    'DQ_Scope': DQ_Scope_Type,
    'usesOperation': CoordinateOperationPropertyType,
    'sourceStep': LI_ProcessStep_PropertyType,
    'AbstractMetaData': AbstractMetaDataType,
    'extentOf': SurfacePropertyType,
    'Bag': BagType,
    'valueOfParameter': OperationParameterPropertyType,
    'protocol': CharacterString_PropertyType,
    'attributes': ObjectReference_PropertyType,
    'topicCategory': MD_TopicCategoryCode_PropertyType,
    'singleCRSRef': SingleCRSPropertyType,
    'directedNode': DirectedNodePropertyType,
    'verticalCRS': SC_CRS_PropertyType,
    'transformationParameterAvailability': Boolean_PropertyType,
    'DynamicFeatureCollection': DynamicFeatureCollectionType,
    'AbstractSurface': AbstractSurfaceType,
    'multiPointDomain': DomainSetType,
    'CI_PresentationFormCode': CodeListValue_Type,
    'CoverageMappingRule': MappingRuleType,
    'GeographicCRS': GeographicCRSType,
    'turnaround': CharacterString_PropertyType,
    'MD_ApplicationSchemaInformation': MD_ApplicationSchemaInformation_Type,
    'AbstractSolid': AbstractSolidType,
    'CI_DateTypeCode': CodeListValue_Type,
    'geocentricCRSRef': GeocentricCRSPropertyType,
    'boundedBy': BoundingShapeType,
    'contentType': MD_CoverageContentTypeCode_PropertyType,
    'TopoSurface': TopoSurfaceType,
    'MD_Distribution': MD_Distribution_Type,
    'TopoComplex': TopoComplexType,
    'AbstractContinuousCoverage': AbstractContinuousCoverageType,
    'MultiCurveCoverage': DiscreteCoverageType,
    'levelDescription': MD_ScopeDescription_PropertyType,
    'datumRef': DatumPropertyType,
    'DQ_DataQuality': DQ_DataQuality_Type,
    'DS_AssociationTypeCode': CodeListValue_Type,
    'propertyType': ObjectReference_PropertyType,
    'report': DQ_Element_PropertyType,
    'OrientableSurface': OrientableSurfaceType,
    'GeocentricCRS': GeocentricCRSType,
    'AbstractFeatureCollection': AbstractFeatureCollectionType,
    'presentationForm': CI_PresentationFormCode_PropertyType,
    'resource': resourceType,
    'solidMember': SolidPropertyType,
    'PassThroughOperation': PassThroughOperationType,
    'method': OperationMethodPropertyType,
    'temporalCRSRef': TemporalCRSPropertyType,
    'MultiGeometry': MultiGeometryType,
    'LocationString': StringOrRefType,
    'MD_CellGeometryCode': CodeListValue_Type,
    'UnitDefinition': UnitDefinitionType,
    'reference': ReferenceType,
    'usageDateTime': DateTime_PropertyType,
    'locale': PT_Locale_PropertyType,
    'AbstractTimeGeometricPrimitive': AbstractTimeGeometricPrimitiveType,
    'solidMembers': SolidArrayPropertyType,
    'curveProperty': CurvePropertyType,
    'TimeCoordinateSystem': TimeCoordinateSystemType,
    'edition': CharacterString_PropertyType,
    'arc': arcType,
    'radius': LengthType,
    'result': DQ_Result_PropertyType,
    'distributorTransferOptions': MD_DigitalTransferOptions_PropertyType,
    'userNote': CharacterString_PropertyType,
    'subject': TargetPropertyType,
    'valueUnit': UnitOfMeasure_PropertyType,
    'otherConstraints': CharacterString_PropertyType,
    'surfaceArrayProperty': SurfaceArrayPropertyType,
    'domainValue': CharacterString_PropertyType,
    'coordinateSystem': CoordinateSystemPropertyType,
    'nextEdge': TimeEdgePropertyType,
    'DirectionDescription': DirectionDescriptionType,
    'AbstractMD_Identification': AbstractMD_Identification_Type,
    'engineeringDatumRef': EngineeringDatumPropertyType,
    'MultiCurve': MultiCurveType,
    'geometryMember': GeometryPropertyType,
    'handlingDescription': CharacterString_PropertyType,
    'DQ_AccuracyOfATimeMeasurement': DQ_AccuracyOfATimeMeasurement_Type,
    'centerPoint': GM_Point_PropertyType,
    'CI_Citation': CI_Citation_Type,
    'AbstractParametricCurveSurface': AbstractParametricCurveSurfaceType,
    'textGroup': LocalisedCharacterString_PropertyType,
    'imageDatum': ImageDatumPropertyType,
    'useLimitation': CharacterString_PropertyType,
    'topoVolumeProperty': TopoVolumePropertyType,
    'citation': CI_Citation_PropertyType,
    'usesObliqueCartesianCS': ObliqueCartesianCSPropertyType,
    'alternateTitle': CharacterString_PropertyType,
    'bitsPerValue': Integer_PropertyType,
    'primeMeridian': PrimeMeridianPropertyType,
    'extent': TimePeriodPropertyType,
    'usesVerticalCS': VerticalCSPropertyType,
    'linkage': URL_PropertyType,
    'LinearRing': LinearRingType,
    'Cylinder': CylinderType,
    'attributeDescription': RecordType_PropertyType,
    'AbstractTimeComplex': AbstractTimeComplexType,
    'MD_Resolution': MD_Resolution_Type,
    'limits': GridLimitsType,
    'obliqueCartesianCSRef': ObliqueCartesianCSPropertyType,
    'surfaceProperty': SurfacePropertyType,
    'density': Real_PropertyType,
    'responsibleParty': CI_ResponsibleParty_PropertyType,
    'CI_RoleCode': CodeListValue_Type,
    'methodFormula': CodeType,
    'dateStamp': Date_PropertyType,
    'fileIdentifier': CharacterString_PropertyType,
    'dateType': CI_DateTypeCode_PropertyType,
    'locationReference': ReferenceType,
    'ParameterValueGroup': ParameterValueGroupType,
    'LocationKeyWord': CodeType,
    'languageCode': LanguageCode_PropertyType,
    'address': CI_Address_PropertyType,
    'pos': DirectPositionType,
    'multiSurfaceProperty': MultiSurfacePropertyType,
    'EngineeringDatum': EngineeringDatumType,
    'baseCRS': SingleCRSPropertyType,
    'temporalElement': EX_TemporalExtent_PropertyType,
    'userDeterminedLimitations': CharacterString_PropertyType,
    'Angle': AngleType,
    'usesEllipsoid': EllipsoidPropertyType,
    'issueIdentification': CharacterString_PropertyType,
    'usesPrimeMeridian': PrimeMeridianPropertyType,
    'Rectangle': RectangleType,
    'AbstractRS_ReferenceSystem': AbstractRS_ReferenceSystem_Type,
    'otherCitationDetails': CharacterString_PropertyType,
    'processingLevelCode': MD_Identifier_PropertyType,
    'solidProperty': SolidPropertyType,
    'descriptiveKeywords': MD_Keywords_PropertyType,
    'parameterValue': AbstractGeneralParameterValuePropertyType,
    'describes': DS_DataSet_PropertyType,
    'DS_Initiative': DS_Initiative_Type,
    'cornerPoints': GM_Point_PropertyType,
    'MD_Constraints': MD_Constraints_Type,
    'PT_Locale': PT_Locale_Type,
    'Definition': DefinitionType,
    'direction': DirectionPropertyType,
    'VerticalCRS': VerticalCRSType,
    'AbstractEX_GeographicExtent': AbstractEX_GeographicExtent_Type,
    'extensionOnLineResource': CI_OnlineResource_PropertyType,
    'MD_ProgressCode': CodeListValue_Type,
    'aggregateDataSetName': CI_Citation_PropertyType,
    'eastBoundLongitude': Decimal_PropertyType,
    'Face': FaceType,
    'endAngle': AngleType,
    'AbstractRing': AbstractRingType,
    'softwareDevelopmentFile': Binary_PropertyType,
    'surfaceMembers': SurfaceArrayPropertyType,
    'AbstractTopoPrimitive': AbstractTopoPrimitiveType,
    'referenceFrame': TimeCalendarEraPropertyType,
    'verticalDatumRef': VerticalDatumPropertyType,
    'hoursOfService': CharacterString_PropertyType,
    'catalogSymbol': CodeType,
    'multiCurveDomain': DomainSetType,
    'verticalCS': VerticalCSPropertyType,
    'has': MD_Metadata_PropertyType,
    'AbstractDS_Aggregate': AbstractDS_Aggregate_Type,
    'DQ_ConceptualConsistency': DQ_ConceptualConsistency_Type,
    'Geodesic': GeodesicType,
    'value': MeasureType,
    'MD_MediumFormatCode': CodeListValue_Type,
    'metadataMaintenance': MD_MaintenanceInformation_PropertyType,
    'multiEdgeOf': MultiCurvePropertyType,
    'country': Country_PropertyType,
    'stopLines': LineStringSegmentArrayPropertyType,
    'voice': CharacterString_PropertyType,
    'DQ_QuantitativeResult': DQ_QuantitativeResult_Type,
    'Polygon': PolygonType,
    'MD_DistributionUnits': CodeListValue_Type,
    'valueComponent': ValuePropertyType,
    'metadataConstraints': MD_Constraints_PropertyType,
    'pointProperty': PointPropertyType,
    'Tin': TinType,
    'exterior': AbstractRingPropertyType,
    'AbstractMD_SpatialRepresentation': AbstractMD_SpatialRepresentation_Type,
    'MD_ImagingConditionCode': CodeListValue_Type,
    'centerOf': PointPropertyType,
    'CircleByCenterPoint': CircleByCenterPointType,
    'minimumValue': Real_PropertyType,
    'usesSphericalCS': SphericalCSPropertyType,
    'MD_ScopeCode': CodeListValue_Type,
    'credit': CharacterString_PropertyType,
    'AbstractDQ_TemporalAccuracy': AbstractDQ_TemporalAccuracy_Type,
    'AbstractOperation': AbstractCoordinateOperationType,
    'complex': ReferenceType,
    'LI_Lineage': LI_Lineage_Type,
    'polygonPatches': SurfacePatchArrayPropertyType,
    'AffineCS': AffineCSType,
    'postalCode': CharacterString_PropertyType,
    'AbstractDiscreteCoverage': DiscreteCoverageType,
    'Clothoid': ClothoidType,
    'localisedString': LocalisedCharacterString_PropertyType,
    'featureCatalogueCitation': CI_Citation_PropertyType,
    'distributionOrderProcess': MD_StandardOrderProcess_PropertyType,
    'status': StringOrRefType,
    'featureType': ObjectReference_PropertyType,
    'geographicElement': EX_GeographicExtent_PropertyType,
    'DQ_TemporalValidity': DQ_TemporalValidity_Type,
    'softwareDevelopmentFileFormat': CharacterString_PropertyType,
    'resultOf': ResultType,
    'vectorAtStart': VectorType,
    'conversion': GeneralConversionPropertyType,
    'checkPointAvailability': Boolean_PropertyType,
    'usesTemporalCS': TemporalCSPropertyType,
    'purpose': CharacterString_PropertyType,
    'MD_Metadata': MD_Metadata_Type,
    'deliveryPoint': CharacterString_PropertyType,
    'Triangle': TriangleType,
    'multiSurfaceDomain': DomainSetType,
    'AbstractGeneralDerivedCRS': AbstractGeneralDerivedCRSType,
    'temporalDatumRef': TemporalDatumPropertyType,
    'lower': Integer_PropertyType,
    'EX_VerticalExtent': EX_VerticalExtent_Type,
    'AbstractGeneralOperationParameter': AbstractGeneralOperationParameterType,
    'CI_Date': CI_Date_Type,
    'metadataStandardVersion': CharacterString_PropertyType,
    'Length': LengthType,
    'TimeCalendarEra': TimeCalendarEraType,
    'AbstractGeneralTransformation': AbstractGeneralTransformationType,
    'extentTypeCode': Boolean_PropertyType,
    'contact': CI_ResponsibleParty_PropertyType,
    'rangeSet': RangeSetType,
    'position': GeometryPropertyType,
    'dimension': MD_RangeDimension_PropertyType,
    'measureIdentification': MD_Identifier_PropertyType,
    'referenceSystemRef': CRSPropertyType,
    'Conversion': ConversionType,
    'DefinitionCollection': DictionaryType,
    'ruleReference': ReferenceType,
    'operationRef': OperationPropertyType,
    'sphericalCSRef': SphericalCSPropertyType,
    'toneGradation': Integer_PropertyType,
    'CompositeValue': CompositeValueType,
    'GridEnvelope': GridEnvelopeType,
    'applicationProfile': CharacterString_PropertyType,
    'LocalName': CodeType,
    'MD_DataIdentification': MD_DataIdentification_Type,
    'speed': MeasureType,
    'GenericMetaData': GenericMetaDataType,
    'centerLineOf': CurvePropertyType,
    'TopoPoint': TopoPointType,
    'bearing': DirectionPropertyType,
    'AbstractCoordinateSystem': AbstractCoordinateSystemType,
    'LineStringSegment': LineStringSegmentType,
    'operationParameter': OperationParameterPropertyType,
    'sourceReferenceSystem': MD_ReferenceSystem_PropertyType,
    'hierarchyLevelName': CharacterString_PropertyType,
    'hierarchyLevel': MD_ScopeCode_PropertyType,
    'valueComponents': ValueArrayPropertyType,
    'source': LI_Source_PropertyType,
    'EX_GeographicDescription': EX_GeographicDescription_Type,
    'location': LocationPropertyType,
    'fileDescription': CharacterString_PropertyType,
    'TriangulatedSurface': SurfaceType,
    'generalTransformationRef': GeneralTransformationPropertyType,
    'abstractStrictAssociationRole': AssociationRoleType,
    'transformationDimensionMapping': CharacterString_PropertyType,
    'AbstractDQ_Element': AbstractDQ_Element_Type,
    'elevation': MeasureType,
    'MD_ExtendedElementInformation': MD_ExtendedElementInformation_Type,
    'MD_CoverageDescription': MD_CoverageDescription_Type,
    'MemberName': MemberName_Type,
    'ProjectedCRS': ProjectedCRSType,
    'AbstractSingleCRS': AbstractCRSType,
    'AbstractCurveSegment': AbstractCurveSegmentType,
    'topoCurveProperty': TopoCurvePropertyType,
    'knot': KnotPropertyType,
    'identificationInfo': MD_Identification_PropertyType,
    'numberOfDimensions': Integer_PropertyType,
    'TimeOrdinalReferenceSystem': TimeOrdinalReferenceSystemType,
    'topoPointProperty': TopoPointPropertyType,
    'CylindricalCS': CylindricalCSType,
    'RectifiedGrid': RectifiedGridType,
    'polarCSRef': PolarCSPropertyType,
    'geometricObjects': MD_GeometricObjects_PropertyType,
    'spatialRepresentationType': MD_SpatialRepresentationTypeCode_PropertyType,
    'GeodeticDatum': GeodeticDatumType,
    'TimeCalendar': TimeCalendarType,
    'northBoundLatitude': Decimal_PropertyType,
    'administrativeArea': CharacterString_PropertyType,
    'originPosition': TimePositionType,
    'Arc': ArcType,
    'DS_OtherAggregate': DS_OtherAggregate_Type,
    'DirectionVector': DirectionVectorType,
    'triangulationIndicator': Boolean_PropertyType,
    'page': CharacterString_PropertyType,
    'tupleList': CoordinatesType,
    'Scale': ScaleType,
    'resourceSpecificUsage': MD_Usage_PropertyType,
    'MD_Identifier': MD_Identifier_Type,
    'orderingInstructions': CharacterString_PropertyType,
    'AbstractTopology': AbstractTopologyType,
    'cylindricalCSRef': CylindricalCSPropertyType,
    'authority': CI_Citation_PropertyType,
    'CartesianCS': CartesianCSType,
    'CI_Series': CI_Series_Type,
    'LI_Source': LI_Source_Type,
    'dateTime': DateTime_PropertyType,
    'spatialExtent': EX_GeographicExtent_PropertyType,
    'plannedAvailableDateTime': DateTime_PropertyType,
    'topologyLevel': MD_TopologyLevelCode_PropertyType,
    'aggregateDataSetIdentifier': MD_Identifier_PropertyType,
    'usesTimeCS': TimeCSPropertyType,
    'AbstractTimeTopologyPrimitive': AbstractTimeTopologyPrimitiveType,
    'AbstractCRS': AbstractCRSType,
    'track': HistoryPropertyType,
    'operationParameterRef': OperationParameterPropertyType,
    'PolygonPatch': PolygonPatchType,
    'ArcString': ArcStringType,
    'priorityLocation': PriorityLocationPropertyType,
    'MultiSolidCoverage': DiscreteCoverageType,
    'MD_MetadataExtensionInformation': MD_MetadataExtensionInformation_Type,
    'equivalentScale': MD_RepresentativeFraction_PropertyType,
    'geodeticDatum': GeodeticDatumPropertyType,
    'offsetVector': VectorType,
    'PolyhedralSurface': SurfaceType,
    'domainSet': DomainSetType,
    'offset': Real_PropertyType,
    'temporalCSRef': TemporalCSPropertyType,
    'shortName': CharacterString_PropertyType,
    'verticalAngle': AngleType,
    'definedByConversion': GeneralConversionPropertyType,
    'MD_LegalConstraints': MD_LegalConstraints_Type,
    'usesImageDatum': ImageDatumPropertyType,
    'passThroughOperationRef': PassThroughOperationPropertyType,
    'MovingObjectStatus': MovingObjectStatusType,
    'pointArrayProperty': PointArrayPropertyType,
    'resourceFormat': MD_Format_PropertyType,
    'initiativeType': DS_InitiativeTypeCode_PropertyType,
    'range': MultiplicityRange_PropertyType,
    'semiMinorAxis': LengthType,
    'cellGeometry': MD_CellGeometryCode_PropertyType,
    'verticalCRSRef': VerticalCRSPropertyType,
    'lowerCorner': DirectPositionType,
    'primeMeridianRef': PrimeMeridianPropertyType,
    'processor': CI_ResponsibleParty_PropertyType,
    'mediumNote': CharacterString_PropertyType,
    'topoSurfaceProperty': TopoSurfacePropertyType,
    'primitive': TimeTopologyPrimitivePropertyType,
    'TimeOrdinalEra': TimeOrdinalEraType,
    'distributorContact': CI_ResponsibleParty_PropertyType,
    'AbstractGeneralConversion': AbstractGeneralConversionType,
    'Bezier': BezierType,
    'AbstractDQ_LogicalConsistency': AbstractDQ_LogicalConsistency_Type,
    'dataset': CharacterString_PropertyType,
    'locator': locatorType,
    'usesAxis': CoordinateSystemAxisPropertyType,
    'GridFunction': GridFunctionType,
    'posList': DirectPositionListType,
    'abstractInlineProperty': InlinePropertyType,
    'ObliqueCartesianCS': ObliqueCartesianCSType,
    'scaleFactor': Real_PropertyType,
    'MD_ScopeDescription': MD_ScopeDescription_Type,
    'MD_GeometricObjectTypeCode': CodeListValue_Type,
    'associationType': DS_AssociationTypeCode_PropertyType,
    'derivedCRSRef': DerivedCRSPropertyType,
    'maximumValue': Real_PropertyType,
    'multiCenterOf': MultiPointPropertyType,
    'epochOfUse': TimePeriodPropertyType,
    'AbstractCurve': AbstractCurveType,
    'start': TimeNodePropertyType,
    'individualName': CharacterString_PropertyType,
    'DS_Sensor': DS_Sensor_Type,
    'TimeCS': TimeCSType,
    'metadataStandardName': CharacterString_PropertyType,
    'userDefinedMaintenanceFrequency': TM_PeriodDuration_PropertyType,
    'definitionMember': DictionaryEntryType,
    'offsetBase': CurvePropertyType,
    'DQ_TopologicalConsistency': DQ_TopologicalConsistency_Type,
    'multiPosition': MultiPointPropertyType,
    'classificationSystem': CharacterString_PropertyType,
    'dataType': MD_DatatypeCode_PropertyType,
    'projectedCRSRef': ProjectedCRSPropertyType,
    'verticalCSRef': VerticalCSPropertyType,
    'scope': DQ_Scope_PropertyType,
    'LocalisedCharacterString': LocalisedCharacterString_Type,
    'minValue': Real_PropertyType,
    'MD_ServiceIdentification': MD_ServiceIdentification_Type,
    'featureAttribute': ObjectReference_PropertyType,
    'DirectionKeyword': CodeType,
    'multiGeometryProperty': MultiGeometryPropertyType,
    'DefinitionProxy': DefinitionProxyType,
    'MD_TopologyLevelCode': CodeListValue_Type,
    'MD_Keywords': MD_Keywords_Type,
    'includesParameter': AbstractGeneralOperationParameterPropertyType,
    'MD_ImageDescription': MD_ImageDescription_Type,
    'useConstraints': MD_RestrictionCode_PropertyType,
    'SphericalCS': SphericalCSType,
    'multiCoverage': MultiSurfacePropertyType,
    'curveMembers': CurveArrayPropertyType,
    'LineString': LineStringType,
    'partOf': DS_Aggregate_PropertyType,
    'georeferencedParameters': Record_PropertyType,
    'TemporalDatum': TemporalDatumType,
    'interval': TimeIntervalLengthType,
    'operationParameterGroupRef': OperationParameterPropertyType,
    'MD_GridSpatialRepresentation': MD_GridSpatialRepresentation_Type,
    'domainCode': Integer_PropertyType,
    'abstract': CharacterString_PropertyType,
    'characterSet': MD_CharacterSetCode_PropertyType,
    'QuantityExtent': QuantityExtentType,
    'MD_MaintenanceFrequencyCode': CodeListValue_Type,
    'solidArrayProperty': SolidArrayPropertyType,
    'processStep': LI_ProcessStep_PropertyType,
    'orientationParameterAvailability': Boolean_PropertyType,
    'contactInfo': CI_Contact_PropertyType,
    'ConcatenatedOperation': ConcatenatedOperationType,
    'thesaurusName': CI_Citation_PropertyType,
    'featureTypes': GenericName_PropertyType,
    'MD_Medium': MD_Medium_Type,
    'accessConstraints': MD_RestrictionCode_PropertyType,
    'polygon': GM_Object_PropertyType,
    'valueList': MeasureListType,
    'fileType': CharacterString_PropertyType,
    'Envelope': EnvelopeType,
    'multiLocation': MultiPointPropertyType,
    'coordinateSystemAxisRef': CoordinateSystemAxisPropertyType,
    'aggregationInfo': MD_AggregateInformation_PropertyType,
    'other': CharacterString_PropertyType,
    'role': CI_RoleCode_PropertyType,
    'Knot': KnotType,
    'AbstractFeature': AbstractFeatureType,
    'usesSingleOperation': CoordinateOperationPropertyType,
    'TimeTopologyComplex': TimeTopologyComplexType,
    'AbstractDQ_Result': AbstractDQ_Result_Type,
    'graphicOverview': MD_BrowseGraphic_PropertyType,
    'referenceEvent': StringOrRefType,
    'AbstractTimeSlice': AbstractTimeSliceType,
    'featureMembers': FeatureArrayPropertyType,
    'includesSingleCRS': SingleCRSPropertyType,
    'usesParameter': AbstractGeneralOperationParameterPropertyType,
    'Country': CodeListValue_Type,
    'GeodesicString': GeodesicStringType,
    'dateOfNextUpdate': Date_PropertyType,
    'cameraCalibrationInformationAvailability': Boolean_PropertyType,
    'userContactInfo': CI_ResponsibleParty_PropertyType,
    'operationMethodRef': OperationMethodPropertyType,
    'DataBlock': DataBlockType,
    'geometryMembers': GeometryArrayPropertyType,
    'formatDistributor': MD_Distributor_PropertyType,
    'rectifiedGridDomain': DomainSetType,
    'abstractReference': ReferenceType,
    'DerivedUnit': DerivedUnitType,
    'MD_Band': MD_Band_Type,
    'graphicsFile': Binary_PropertyType,
    'using': ProcedurePropertyType,
    'phone': CI_Telephone_PropertyType,
    'DirectionString': StringOrRefType,
    'rule': CharacterString_PropertyType,
    'supplementalInformation': CharacterString_PropertyType,
    'nameOfMeasure': CharacterString_PropertyType,
    'volumes': Integer_PropertyType,
    'transformationRef': TransformationPropertyType,
    'resolution': Measure_PropertyType,
}


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]
    rootClass = GDSClassesMapping.get(tag)
    if rootClass is None:
        rootClass = globals().get(tag)
    return tag, rootClass


def parse(inFileName, silence=False):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'StringOrRefType'
        rootClass = StringOrRefType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"',
            pretty_print=True)
    return rootObj


def parseEtree(inFileName, silence=False):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'StringOrRefType'
        rootClass = StringOrRefType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    mapping = {}
    rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
    reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
    if not silence:
        content = etree_.tostring(
            rootElement, pretty_print=True,
            xml_declaration=True, encoding="utf-8")
        sys.stdout.write(content)
        sys.stdout.write('\n')
    return rootObj, rootElement, mapping, reverse_mapping


def parseString(inString, silence=False):
    from six import StringIO
    doc = parsexml_(StringIO(inString))
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'StringOrRefType'
        rootClass = StringOrRefType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='xmlns:gml="http://www.opengis.net/gml/3.2"')
    return rootObj


def parseLiteral(inFileName, silence=False):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'StringOrRefType'
        rootClass = StringOrRefType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    if not silence:
        sys.stdout.write('#from gml_generated import *\n\n')
        sys.stdout.write('import gml_generated as model_\n\n')
        sys.stdout.write('rootObj = model_.rootClass(\n')
        rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
        sys.stdout.write(')\n')
    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()


__all__ = [
    "AbstractCRSType",
    "AbstractContinuousCoverageType",
    "AbstractCoordinateOperationType",
    "AbstractCoordinateSystemType",
    "AbstractCoverageType",
    "AbstractCurveSegmentType",
    "AbstractCurveType",
    "AbstractDQ_Completeness_Type",
    "AbstractDQ_Element_Type",
    "AbstractDQ_LogicalConsistency_Type",
    "AbstractDQ_PositionalAccuracy_Type",
    "AbstractDQ_Result_Type",
    "AbstractDQ_TemporalAccuracy_Type",
    "AbstractDQ_ThematicAccuracy_Type",
    "AbstractDS_Aggregate_Type",
    "AbstractDatumType",
    "AbstractEX_GeographicExtent_Type",
    "AbstractFeatureCollectionType",
    "AbstractFeatureMemberType",
    "AbstractFeatureType",
    "AbstractGMLType",
    "AbstractGeneralConversionType",
    "AbstractGeneralDerivedCRSType",
    "AbstractGeneralOperationParameterPropertyType",
    "AbstractGeneralOperationParameterType",
    "AbstractGeneralParameterValuePropertyType",
    "AbstractGeneralParameterValueType",
    "AbstractGeneralTransformationType",
    "AbstractGeometricAggregateType",
    "AbstractGeometricPrimitiveType",
    "AbstractGeometryType",
    "AbstractGriddedSurfaceType",
    "AbstractMD_ContentInformation_Type",
    "AbstractMD_Identification_Type",
    "AbstractMD_SpatialRepresentation_Type",
    "AbstractMemberType",
    "AbstractMetaDataType",
    "AbstractMetadataPropertyType",
    "AbstractObject",
    "AbstractObject_Type",
    "AbstractParametricCurveSurfaceType",
    "AbstractRS_ReferenceSystem_Type",
    "AbstractRingPropertyType",
    "AbstractRingType",
    "AbstractSolidType",
    "AbstractSurfacePatchType",
    "AbstractSurfaceType",
    "AbstractTimeComplexType",
    "AbstractTimeGeometricPrimitiveType",
    "AbstractTimeObjectType",
    "AbstractTimePrimitiveType",
    "AbstractTimeSliceType",
    "AbstractTimeTopologyPrimitiveType",
    "AbstractTopoPrimitiveType",
    "AbstractTopologyType",
    "AffineCSPropertyType",
    "AffineCSType",
    "AffinePlacementType",
    "AngleChoiceType",
    "AngleType",
    "Angle_PropertyType",
    "ArcByBulgeType",
    "ArcByCenterPointType",
    "ArcStringByBulgeType",
    "ArcStringType",
    "ArcType",
    "AreaType",
    "ArrayAssociationType",
    "ArrayType",
    "AssociationRoleType",
    "BSplineType",
    "BagType",
    "BaseUnitType",
    "BezierType",
    "Binary_PropertyType",
    "Binary_Type",
    "Boolean",
    "BooleanPropertyType",
    "Boolean_PropertyType",
    "BoundedFeatureType",
    "BoundingShapeType",
    "CI_Address_PropertyType",
    "CI_Address_Type",
    "CI_Citation_PropertyType",
    "CI_Citation_Type",
    "CI_Contact_PropertyType",
    "CI_Contact_Type",
    "CI_DateTypeCode_PropertyType",
    "CI_Date_PropertyType",
    "CI_Date_Type",
    "CI_OnLineFunctionCode_PropertyType",
    "CI_OnlineResource_PropertyType",
    "CI_OnlineResource_Type",
    "CI_PresentationFormCode_PropertyType",
    "CI_ResponsibleParty_PropertyType",
    "CI_ResponsibleParty_Type",
    "CI_RoleCode_PropertyType",
    "CI_Series_PropertyType",
    "CI_Series_Type",
    "CI_Telephone_PropertyType",
    "CI_Telephone_Type",
    "CRSPropertyType",
    "CartesianCSPropertyType",
    "CartesianCSType",
    "Category",
    "CategoryExtentType",
    "CategoryPropertyType",
    "CharacterString_PropertyType",
    "CircleByCenterPointType",
    "CircleType",
    "ClothoidType",
    "CodeListType",
    "CodeListValue_Type",
    "CodeOrNilReasonListType",
    "CodeType",
    "CodeWithAuthorityType",
    "CompositeCurveType",
    "CompositeSolidType",
    "CompositeSurfaceType",
    "CompositeValueType",
    "CompoundCRSPropertyType",
    "CompoundCRSType",
    "ConcatenatedOperationPropertyType",
    "ConcatenatedOperationType",
    "ConeType",
    "ConventionalUnitType",
    "ConversionPropertyType",
    "ConversionToPreferredUnitType",
    "ConversionType",
    "CoordinateOperationPropertyType",
    "CoordinateSystemAxisPropertyType",
    "CoordinateSystemAxisType",
    "CoordinateSystemPropertyType",
    "CoordinatesType",
    "Count",
    "CountPropertyType",
    "Country_PropertyType",
    "CoverageFunctionType",
    "CubicSplineType",
    "CurveArrayPropertyType",
    "CurvePropertyType",
    "CurveSegmentArrayPropertyType",
    "CurveType",
    "CylinderType",
    "CylindricalCSPropertyType",
    "CylindricalCSType",
    "DMSAngleType",
    "DQ_AbsoluteExternalPositionalAccuracy_PropertyType",
    "DQ_AbsoluteExternalPositionalAccuracy_Type",
    "DQ_AccuracyOfATimeMeasurement_PropertyType",
    "DQ_AccuracyOfATimeMeasurement_Type",
    "DQ_CompletenessCommission_PropertyType",
    "DQ_CompletenessCommission_Type",
    "DQ_CompletenessOmission_PropertyType",
    "DQ_CompletenessOmission_Type",
    "DQ_Completeness_PropertyType",
    "DQ_ConceptualConsistency_PropertyType",
    "DQ_ConceptualConsistency_Type",
    "DQ_ConformanceResult_PropertyType",
    "DQ_ConformanceResult_Type",
    "DQ_DataQuality_PropertyType",
    "DQ_DataQuality_Type",
    "DQ_DomainConsistency_PropertyType",
    "DQ_DomainConsistency_Type",
    "DQ_Element_PropertyType",
    "DQ_EvaluationMethodTypeCode_PropertyType",
    "DQ_FormatConsistency_PropertyType",
    "DQ_FormatConsistency_Type",
    "DQ_GriddedDataPositionalAccuracy_PropertyType",
    "DQ_GriddedDataPositionalAccuracy_Type",
    "DQ_LogicalConsistency_PropertyType",
    "DQ_NonQuantitativeAttributeAccuracy_PropertyType",
    "DQ_NonQuantitativeAttributeAccuracy_Type",
    "DQ_PositionalAccuracy_PropertyType",
    "DQ_QuantitativeAttributeAccuracy_PropertyType",
    "DQ_QuantitativeAttributeAccuracy_Type",
    "DQ_QuantitativeResult_PropertyType",
    "DQ_QuantitativeResult_Type",
    "DQ_RelativeInternalPositionalAccuracy_PropertyType",
    "DQ_RelativeInternalPositionalAccuracy_Type",
    "DQ_Result_PropertyType",
    "DQ_Scope_PropertyType",
    "DQ_Scope_Type",
    "DQ_TemporalAccuracy_PropertyType",
    "DQ_TemporalConsistency_PropertyType",
    "DQ_TemporalConsistency_Type",
    "DQ_TemporalValidity_PropertyType",
    "DQ_TemporalValidity_Type",
    "DQ_ThematicAccuracy_PropertyType",
    "DQ_ThematicClassificationCorrectness_PropertyType",
    "DQ_ThematicClassificationCorrectness_Type",
    "DQ_TopologicalConsistency_PropertyType",
    "DQ_TopologicalConsistency_Type",
    "DS_Aggregate_PropertyType",
    "DS_AssociationTypeCode_PropertyType",
    "DS_Association_PropertyType",
    "DS_Association_Type",
    "DS_DataSet_PropertyType",
    "DS_DataSet_Type",
    "DS_InitiativeTypeCode_PropertyType",
    "DS_Initiative_PropertyType",
    "DS_Initiative_Type",
    "DS_OtherAggregate_PropertyType",
    "DS_OtherAggregate_Type",
    "DS_Platform_PropertyType",
    "DS_Platform_Type",
    "DS_ProductionSeries_PropertyType",
    "DS_ProductionSeries_Type",
    "DS_Sensor_PropertyType",
    "DS_Sensor_Type",
    "DS_Series_PropertyType",
    "DS_Series_Type",
    "DS_StereoMate_PropertyType",
    "DS_StereoMate_Type",
    "DataBlockType",
    "DateTime_PropertyType",
    "Date_PropertyType",
    "DatumPropertyType",
    "Decimal_PropertyType",
    "DefinitionBaseType",
    "DefinitionProxyType",
    "DefinitionType",
    "DegreesType",
    "DerivationUnitTermType",
    "DerivedCRSPropertyType",
    "DerivedCRSType",
    "DerivedUnitType",
    "DictionaryEntryType",
    "DictionaryType",
    "DirectPositionListType",
    "DirectPositionType",
    "DirectedEdgePropertyType",
    "DirectedFacePropertyType",
    "DirectedNodePropertyType",
    "DirectedObservationAtDistanceType",
    "DirectedObservationType",
    "DirectedTopoSolidPropertyType",
    "DirectionDescriptionType",
    "DirectionPropertyType",
    "DirectionVectorType",
    "DiscreteCoverageType",
    "Distance_PropertyType",
    "DomainSetType",
    "DynamicFeatureCollectionType",
    "DynamicFeatureMemberType",
    "DynamicFeatureType",
    "EX_BoundingPolygon_PropertyType",
    "EX_BoundingPolygon_Type",
    "EX_Extent_PropertyType",
    "EX_Extent_Type",
    "EX_GeographicBoundingBox_PropertyType",
    "EX_GeographicBoundingBox_Type",
    "EX_GeographicDescription_PropertyType",
    "EX_GeographicDescription_Type",
    "EX_GeographicExtent_PropertyType",
    "EX_SpatialTemporalExtent_PropertyType",
    "EX_SpatialTemporalExtent_Type",
    "EX_TemporalExtent_PropertyType",
    "EX_TemporalExtent_Type",
    "EX_VerticalExtent_PropertyType",
    "EX_VerticalExtent_Type",
    "EdgeType",
    "EllipsoidPropertyType",
    "EllipsoidType",
    "EllipsoidalCSPropertyType",
    "EllipsoidalCSType",
    "EngineeringCRSPropertyType",
    "EngineeringCRSType",
    "EngineeringDatumPropertyType",
    "EngineeringDatumType",
    "EnvelopeType",
    "EnvelopeWithTimePeriodType",
    "FaceOrTopoSolidPropertyType",
    "FaceType",
    "FeatureArrayPropertyType",
    "FeatureCollectionType",
    "FeaturePropertyType",
    "FileType",
    "FormulaType",
    "GM_Object_PropertyType",
    "GM_Point_PropertyType",
    "GeneralConversionPropertyType",
    "GeneralTransformationPropertyType",
    "GenericMetaDataType",
    "GenericName_PropertyType",
    "GeocentricCRSPropertyType",
    "GeocentricCRSType",
    "GeodesicStringType",
    "GeodesicType",
    "GeodeticCRSPropertyType",
    "GeodeticCRSType",
    "GeodeticDatumPropertyType",
    "GeodeticDatumType",
    "GeographicCRSPropertyType",
    "GeographicCRSType",
    "GeometricComplexPropertyType",
    "GeometricComplexType",
    "GeometricPrimitivePropertyType",
    "GeometryArrayPropertyType",
    "GeometryPropertyType",
    "GridEnvelopeType",
    "GridFunctionType",
    "GridLengthType",
    "GridLimitsType",
    "GridType",
    "HistoryPropertyType",
    "IdentifiedObjectType",
    "ImageCRSPropertyType",
    "ImageCRSType",
    "ImageDatumPropertyType",
    "ImageDatumType",
    "IndirectEntryType",
    "InlinePropertyType",
    "Integer_PropertyType",
    "KnotPropertyType",
    "KnotType",
    "LI_Lineage_PropertyType",
    "LI_Lineage_Type",
    "LI_ProcessStep_PropertyType",
    "LI_ProcessStep_Type",
    "LI_Source_PropertyType",
    "LI_Source_Type",
    "LanguageCode_PropertyType",
    "LengthType",
    "Length_PropertyType",
    "LineStringSegmentArrayPropertyType",
    "LineStringSegmentType",
    "LineStringType",
    "LinearCSPropertyType",
    "LinearCSType",
    "LinearRingPropertyType",
    "LinearRingType",
    "LocalName_PropertyType",
    "LocalisedCharacterString_PropertyType",
    "LocalisedCharacterString_Type",
    "LocationPropertyType",
    "MD_AggregateInformation_PropertyType",
    "MD_AggregateInformation_Type",
    "MD_ApplicationSchemaInformation_PropertyType",
    "MD_ApplicationSchemaInformation_Type",
    "MD_Band_PropertyType",
    "MD_Band_Type",
    "MD_BrowseGraphic_PropertyType",
    "MD_BrowseGraphic_Type",
    "MD_CellGeometryCode_PropertyType",
    "MD_CharacterSetCode_PropertyType",
    "MD_ClassificationCode_PropertyType",
    "MD_Constraints_PropertyType",
    "MD_Constraints_Type",
    "MD_ContentInformation_PropertyType",
    "MD_CoverageContentTypeCode_PropertyType",
    "MD_CoverageDescription_PropertyType",
    "MD_CoverageDescription_Type",
    "MD_DataIdentification_PropertyType",
    "MD_DataIdentification_Type",
    "MD_DatatypeCode_PropertyType",
    "MD_DigitalTransferOptions_PropertyType",
    "MD_DigitalTransferOptions_Type",
    "MD_DimensionNameTypeCode_PropertyType",
    "MD_Dimension_PropertyType",
    "MD_Dimension_Type",
    "MD_DistributionUnits_PropertyType",
    "MD_Distribution_PropertyType",
    "MD_Distribution_Type",
    "MD_Distributor_PropertyType",
    "MD_Distributor_Type",
    "MD_ExtendedElementInformation_PropertyType",
    "MD_ExtendedElementInformation_Type",
    "MD_FeatureCatalogueDescription_PropertyType",
    "MD_FeatureCatalogueDescription_Type",
    "MD_Format_PropertyType",
    "MD_Format_Type",
    "MD_GeometricObjectTypeCode_PropertyType",
    "MD_GeometricObjects_PropertyType",
    "MD_GeometricObjects_Type",
    "MD_Georectified_PropertyType",
    "MD_Georectified_Type",
    "MD_Georeferenceable_PropertyType",
    "MD_Georeferenceable_Type",
    "MD_GridSpatialRepresentation_PropertyType",
    "MD_GridSpatialRepresentation_Type",
    "MD_Identification_PropertyType",
    "MD_Identifier_PropertyType",
    "MD_Identifier_Type",
    "MD_ImageDescription_PropertyType",
    "MD_ImageDescription_Type",
    "MD_ImagingConditionCode_PropertyType",
    "MD_KeywordTypeCode_PropertyType",
    "MD_Keywords_PropertyType",
    "MD_Keywords_Type",
    "MD_LegalConstraints_PropertyType",
    "MD_LegalConstraints_Type",
    "MD_MaintenanceFrequencyCode_PropertyType",
    "MD_MaintenanceInformation_PropertyType",
    "MD_MaintenanceInformation_Type",
    "MD_MediumFormatCode_PropertyType",
    "MD_MediumNameCode_PropertyType",
    "MD_Medium_PropertyType",
    "MD_Medium_Type",
    "MD_MetadataExtensionInformation_PropertyType",
    "MD_MetadataExtensionInformation_Type",
    "MD_Metadata_PropertyType",
    "MD_Metadata_Type",
    "MD_ObligationCode_PropertyType",
    "MD_PixelOrientationCode_PropertyType",
    "MD_PortrayalCatalogueReference_PropertyType",
    "MD_PortrayalCatalogueReference_Type",
    "MD_ProgressCode_PropertyType",
    "MD_RangeDimension_PropertyType",
    "MD_RangeDimension_Type",
    "MD_ReferenceSystem_PropertyType",
    "MD_ReferenceSystem_Type",
    "MD_RepresentativeFraction_PropertyType",
    "MD_RepresentativeFraction_Type",
    "MD_Resolution_PropertyType",
    "MD_Resolution_Type",
    "MD_RestrictionCode_PropertyType",
    "MD_ScopeCode_PropertyType",
    "MD_ScopeDescription_PropertyType",
    "MD_ScopeDescription_Type",
    "MD_SecurityConstraints_PropertyType",
    "MD_SecurityConstraints_Type",
    "MD_ServiceIdentification_PropertyType",
    "MD_ServiceIdentification_Type",
    "MD_SpatialRepresentationTypeCode_PropertyType",
    "MD_SpatialRepresentation_PropertyType",
    "MD_StandardOrderProcess_PropertyType",
    "MD_StandardOrderProcess_Type",
    "MD_TopicCategoryCode_PropertyType",
    "MD_TopologyLevelCode_PropertyType",
    "MD_Usage_PropertyType",
    "MD_Usage_Type",
    "MD_VectorSpatialRepresentation_PropertyType",
    "MD_VectorSpatialRepresentation_Type",
    "MappingRuleType",
    "MeasureListType",
    "MeasureOrNilReasonListType",
    "MeasureType",
    "Measure_PropertyType",
    "MemberName_PropertyType",
    "MemberName_Type",
    "MetaDataPropertyType",
    "MovingObjectStatusType",
    "MultiCurvePropertyType",
    "MultiCurveType",
    "MultiGeometryPropertyType",
    "MultiGeometryType",
    "MultiPointPropertyType",
    "MultiPointType",
    "MultiSolidPropertyType",
    "MultiSolidType",
    "MultiSurfacePropertyType",
    "MultiSurfaceType",
    "MultiplicityRange_PropertyType",
    "MultiplicityRange_Type",
    "Multiplicity_PropertyType",
    "Multiplicity_Type",
    "NodeOrEdgePropertyType",
    "NodePropertyType",
    "NodeType",
    "Number_PropertyType",
    "ObjectReference_PropertyType",
    "ObliqueCartesianCSPropertyType",
    "ObliqueCartesianCSType",
    "ObservationType",
    "OffsetCurveType",
    "OperationMethodPropertyType",
    "OperationMethodType",
    "OperationParameterGroupPropertyType",
    "OperationParameterGroupType",
    "OperationParameterPropertyType",
    "OperationParameterType",
    "OperationPropertyType",
    "OrientableCurveType",
    "OrientableSurfaceType",
    "PT_FreeText_PropertyType",
    "PT_FreeText_Type",
    "PT_LocaleContainer_PropertyType",
    "PT_LocaleContainer_Type",
    "PT_Locale_PropertyType",
    "PT_Locale_Type",
    "ParameterValueGroupType",
    "ParameterValueType",
    "PassThroughOperationPropertyType",
    "PassThroughOperationType",
    "PointArrayPropertyType",
    "PointPropertyType",
    "PointType",
    "PolarCSPropertyType",
    "PolarCSType",
    "PolygonPatchType",
    "PolygonType",
    "PrimeMeridianPropertyType",
    "PrimeMeridianType",
    "PriorityLocationPropertyType",
    "ProcedurePropertyType",
    "ProjectedCRSPropertyType",
    "ProjectedCRSType",
    "Quantity",
    "QuantityExtentType",
    "QuantityPropertyType",
    "RS_Identifier_PropertyType",
    "RS_Identifier_Type",
    "RS_ReferenceSystem_PropertyType",
    "RangeSetType",
    "Real_PropertyType",
    "Record",
    "RecordType_PropertyType",
    "RecordType_Type",
    "Record_PropertyType",
    "RectangleType",
    "RectifiedGridType",
    "ReferenceType",
    "RelatedTimeType",
    "ResultType",
    "RingPropertyType",
    "RingType",
    "Row",
    "SC_CRS_PropertyType",
    "ScaleType",
    "Scale_PropertyType",
    "ScopedName_PropertyType",
    "SecondDefiningParameter",
    "SequenceRuleType",
    "ShellPropertyType",
    "ShellType",
    "SingleCRSPropertyType",
    "SingleOperationPropertyType",
    "SolidArrayPropertyType",
    "SolidPropertyType",
    "SolidType",
    "SpeedType",
    "SphereType",
    "SphericalCSPropertyType",
    "SphericalCSType",
    "StringOrRefType",
    "SurfaceArrayPropertyType",
    "SurfacePatchArrayPropertyType",
    "SurfacePropertyType",
    "SurfaceType",
    "TM_PeriodDuration_PropertyType",
    "TM_Primitive_PropertyType",
    "TargetPropertyType",
    "TemporalCRSPropertyType",
    "TemporalCRSType",
    "TemporalCSPropertyType",
    "TemporalCSType",
    "TemporalDatumBaseType",
    "TemporalDatumPropertyType",
    "TemporalDatumType",
    "TimeCSPropertyType",
    "TimeCSType",
    "TimeCalendarEraPropertyType",
    "TimeCalendarEraType",
    "TimeCalendarPropertyType",
    "TimeCalendarType",
    "TimeClockPropertyType",
    "TimeClockType",
    "TimeCoordinateSystemType",
    "TimeEdgePropertyType",
    "TimeEdgeType",
    "TimeInstantPropertyType",
    "TimeInstantType",
    "TimeIntervalLengthType",
    "TimeNodePropertyType",
    "TimeNodeType",
    "TimeOrdinalEraPropertyType",
    "TimeOrdinalEraType",
    "TimeOrdinalReferenceSystemType",
    "TimePeriodPropertyType",
    "TimePeriodType",
    "TimePositionType",
    "TimePrimitivePropertyType",
    "TimeReferenceSystemType",
    "TimeTopologyComplexPropertyType",
    "TimeTopologyComplexType",
    "TimeTopologyPrimitivePropertyType",
    "TimeType",
    "TinType",
    "TopoComplexPropertyType",
    "TopoComplexType",
    "TopoCurvePropertyType",
    "TopoCurveType",
    "TopoPointPropertyType",
    "TopoPointType",
    "TopoPrimitiveArrayAssociationType",
    "TopoPrimitiveMemberType",
    "TopoSolidPropertyType",
    "TopoSolidType",
    "TopoSurfacePropertyType",
    "TopoSurfaceType",
    "TopoVolumePropertyType",
    "TopoVolumeType",
    "TransformationPropertyType",
    "TransformationType",
    "TriangleType",
    "TypeName_PropertyType",
    "TypeName_Type",
    "URL_PropertyType",
    "UnitDefinitionType",
    "UnitOfMeasureType",
    "UnitOfMeasure_PropertyType",
    "UnlimitedInteger_PropertyType",
    "UnlimitedInteger_Type",
    "UomAngle_PropertyType",
    "UomArea_PropertyType",
    "UomLength_PropertyType",
    "UomScale_PropertyType",
    "UomTime_PropertyType",
    "UomVelocity_PropertyType",
    "UomVolume_PropertyType",
    "UserDefinedCSPropertyType",
    "UserDefinedCSType",
    "ValueArrayPropertyType",
    "ValueArrayType",
    "ValuePropertyType",
    "VectorType",
    "VerticalCRSPropertyType",
    "VerticalCRSType",
    "VerticalCSPropertyType",
    "VerticalCSType",
    "VerticalDatumPropertyType",
    "VerticalDatumType",
    "VolumeType",
    "arcType",
    "controlPoint",
    "coordinateOperationAccuracy",
    "domainOfValidity",
    "extended",
    "formulaCitation",
    "locatorType",
    "refLocation",
    "resourceType",
    "rows",
    "secondDefiningParameter",
    "simple",
    "titleEltType"
]
