Best Python code snippet using autotest_python
gen.py
Source:gen.py  
...227    for child in node:228        if child.tail is not None:229            text += child.tail230    return text231def find_attr_value_(attr_name, node):232    attrs = node.attrib233    attr_parts = attr_name.split(':')234    value = None235    if len(attr_parts) == 1:236        value = attrs.get(attr_name)237    elif len(attr_parts) == 2:238        prefix, name = attr_parts239        namespace = node.nsmap.get(prefix)240        if namespace is not None:241            value = attrs.get('{%s}%s' % (namespace, name,))242    return value243class GDSParseError(Exception):244    pass245def raise_parse_error(node, msg):246    if XMLParser_import_library == XMLParser_import_lxml:247        msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline,)248    else:249        msg = '%s (element %s)' % (msg, node.tag,)250    raise GDSParseError(msg)251class MixedContainer:252    # Constants for category:253    CategoryNone = 0254    CategoryText = 1255    CategorySimple = 2256    CategoryComplex = 3257    # Constants for content_type:258    TypeNone = 0259    TypeText = 1260    TypeString = 2261    TypeInteger = 3262    TypeFloat = 4263    TypeDecimal = 5264    TypeDouble = 6265    TypeBoolean = 7266    def __init__(self, category, content_type, name, value):267        self.category = category268        self.content_type = content_type269        self.name = name270        self.value = value271    def getCategory(self):272        return self.category273    def getContenttype(self, content_type):274        return self.content_type275    def getValue(self):276        return self.value277    def getName(self):278        return self.name279    def export(self, outfile, level, name, namespace):280        if self.category == MixedContainer.CategoryText:281            # Prevent exporting empty content as empty lines.282            if self.value.strip():283                outfile.write(self.value)284        elif self.category == MixedContainer.CategorySimple:285            self.exportSimple(outfile, level, name)286        else:  # category == MixedContainer.CategoryComplex287            self.value.export(outfile, level, namespace, name)288    def exportSimple(self, outfile, level, name):289        if self.content_type == MixedContainer.TypeString:290            outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name))291        elif self.content_type == MixedContainer.TypeInteger or \292                self.content_type == MixedContainer.TypeBoolean:293            outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name))294        elif self.content_type == MixedContainer.TypeFloat or \295                self.content_type == MixedContainer.TypeDecimal:296            outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name))297        elif self.content_type == MixedContainer.TypeDouble:298            outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name))299    def exportLiteral(self, outfile, level, name):300        if self.category == MixedContainer.CategoryText:301            showIndent(outfile, level)302            outfile.write('model_.MixedContainer(%d, %d, "%s", "%s"),\n' % \303                (self.category, self.content_type, self.name, self.value))304        elif self.category == MixedContainer.CategorySimple:305            showIndent(outfile, level)306            outfile.write('model_.MixedContainer(%d, %d, "%s", "%s"),\n' % \307                (self.category, self.content_type, self.name, self.value))308        else:  # category == MixedContainer.CategoryComplex309            showIndent(outfile, level)310            outfile.write('model_.MixedContainer(%d, %d, "%s",\n' % \311                (self.category, self.content_type, self.name,))312            self.value.exportLiteral(outfile, level + 1)313            showIndent(outfile, level)314            outfile.write(')\n')315class MemberSpec_(object):316    def __init__(self, name='', data_type='', container=0):317        self.name = name318        self.data_type = data_type319        self.container = container320    def set_name(self, name): self.name = name321    def get_name(self): return self.name322    def set_data_type(self, data_type): self.data_type = data_type323    def get_data_type_chain(self): return self.data_type324    def get_data_type(self):325        if isinstance(self.data_type, list):326            if len(self.data_type) > 0:327                return self.data_type[-1]328            else:329                return 'xs:string'330        else:331            return self.data_type332    def set_container(self, container): self.container = container333    def get_container(self): return self.container334def _cast(typ, value):335    if typ is None or value is None:336        return value337    return typ(value)338#339# Data representation classes.340#341class Attachment(GeneratedsSuper):342    subclass = None343    superclass = None344    def __init__(self, url=None, contentType=None, name=None, size=None):345        self.url = _cast(None, url)346        self.contentType = _cast(None, contentType)347        self.name = _cast(None, name)348        self.size = _cast(int, size)349        pass350    def factory(*args_, **kwargs_):351        if Attachment.subclass:352            return Attachment.subclass(*args_, **kwargs_)353        else:354            return Attachment(*args_, **kwargs_)355    factory = staticmethod(factory)356    def get_url(self): return self.url357    def set_url(self, url): self.url = url358    def get_contentType(self): return self.contentType359    def set_contentType(self, contentType): self.contentType = contentType360    def get_name(self): return self.name361    def set_name(self, name): self.name = name362    def get_size(self): return self.size363    def set_size(self, size): self.size = size364    def export(self, outfile, level, namespace_='mstns:', name_='Attachment', namespacedef_=''):365        showIndent(outfile, level)366        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))367        already_processed = []368        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Attachment')369        if self.hasContent_():370            outfile.write('>\n')371            self.exportChildren(outfile, level + 1, namespace_, name_)372            outfile.write('</%s%s>\n' % (namespace_, name_))373        else:374            outfile.write('/>\n')375    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Attachment'):376        if self.url is not None and 'url' not in already_processed:377            already_processed.append('url')378            outfile.write(' url=%s' % (self.gds_format_string(quote_attrib(self.url).encode(ExternalEncoding), input_name='url'),))379        if self.contentType is not None and 'contentType' not in already_processed:380            already_processed.append('contentType')381            outfile.write(' contentType=%s' % (self.gds_format_string(quote_attrib(self.contentType).encode(ExternalEncoding), input_name='contentType'),))382        if self.name is not None and 'name' not in already_processed:383            already_processed.append('name')384            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'),))385        if self.size is not None and 'size' not in already_processed:386            already_processed.append('size')387            outfile.write(' size="%s"' % self.gds_format_integer(self.size, input_name='size'))388    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Attachment', fromsubclass_=False):389        pass390    def hasContent_(self):391        if (392            ):393            return True394        else:395            return False396    def exportLiteral(self, outfile, level, name_='Attachment'):397        level += 1398        self.exportLiteralAttributes(outfile, level, [], name_)399        if self.hasContent_():400            self.exportLiteralChildren(outfile, level, name_)401    def exportLiteralAttributes(self, outfile, level, already_processed, name_):402        if self.url is not None and 'url' not in already_processed:403            already_processed.append('url')404            showIndent(outfile, level)405            outfile.write('url = "%s",\n' % (self.url,))406        if self.contentType is not None and 'contentType' not in already_processed:407            already_processed.append('contentType')408            showIndent(outfile, level)409            outfile.write('contentType = "%s",\n' % (self.contentType,))410        if self.name is not None and 'name' not in already_processed:411            already_processed.append('name')412            showIndent(outfile, level)413            outfile.write('name = "%s",\n' % (self.name,))414        if self.size is not None and 'size' not in already_processed:415            already_processed.append('size')416            showIndent(outfile, level)417            outfile.write('size = %d,\n' % (self.size,))418    def exportLiteralChildren(self, outfile, level, name_):419        pass420    def build(self, node):421        self.buildAttributes(node, node.attrib, [])422        for child in node:423            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]424            self.buildChildren(child, node, nodeName_)425    def buildAttributes(self, node, attrs, already_processed):426        value = find_attr_value_('url', node)427        if value is not None and 'url' not in already_processed:428            already_processed.append('url')429            self.url = value430        value = find_attr_value_('contentType', node)431        if value is not None and 'contentType' not in already_processed:432            already_processed.append('contentType')433            self.contentType = value434        value = find_attr_value_('name', node)435        if value is not None and 'name' not in already_processed:436            already_processed.append('name')437            self.name = value438        value = find_attr_value_('size', node)439        if value is not None and 'size' not in already_processed:440            already_processed.append('size')441            try:442                self.size = int(value)443            except ValueError, exp:444                raise_parse_error(node, 'Bad integer attribute: %s' % exp)445    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):446        pass447# end class Attachment448class FlowElement(GeneratedsSuper):449    subclass = None450    superclass = None451    def __init__(self, id=None, extensiontype_=None):452        self.id = _cast(None, id)453        self.extensiontype_ = extensiontype_454    def factory(*args_, **kwargs_):455        if FlowElement.subclass:456            return FlowElement.subclass(*args_, **kwargs_)457        else:458            return FlowElement(*args_, **kwargs_)459    factory = staticmethod(factory)460    def get_id(self): return self.id461    def set_id(self, id): self.id = id462    def get_extensiontype_(self): return self.extensiontype_463    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_464    def export(self, outfile, level, namespace_='mstns:', name_='FlowElement', namespacedef_=''):465        showIndent(outfile, level)466        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))467        already_processed = []468        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FlowElement')469        if self.hasContent_():470            outfile.write('>\n')471            self.exportChildren(outfile, level + 1, namespace_, name_)472            outfile.write('</%s%s>\n' % (namespace_, name_))473        else:474            outfile.write('/>\n')475    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='FlowElement'):476        if self.id is not None and 'id' not in already_processed:477            already_processed.append('id')478            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'),))479        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:480            already_processed.append('xsi:type')481            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')482            outfile.write(' xsi:type="%s"' % self.extensiontype_)483    def exportChildren(self, outfile, level, namespace_='mstns:', name_='FlowElement', fromsubclass_=False):484        pass485    def hasContent_(self):486        if (487            ):488            return True489        else:490            return False491    def exportLiteral(self, outfile, level, name_='FlowElement'):492        level += 1493        self.exportLiteralAttributes(outfile, level, [], name_)494        if self.hasContent_():495            self.exportLiteralChildren(outfile, level, name_)496    def exportLiteralAttributes(self, outfile, level, already_processed, name_):497        if self.id is not None and 'id' not in already_processed:498            already_processed.append('id')499            showIndent(outfile, level)500            outfile.write('id = "%s",\n' % (self.id,))501    def exportLiteralChildren(self, outfile, level, name_):502        pass503    def build(self, node):504        self.buildAttributes(node, node.attrib, [])505        for child in node:506            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]507            self.buildChildren(child, node, nodeName_)508    def buildAttributes(self, node, attrs, already_processed):509        value = find_attr_value_('id', node)510        if value is not None and 'id' not in already_processed:511            already_processed.append('id')512            self.id = value513        value = find_attr_value_('xsi:type', node)514        if value is not None and 'xsi:type' not in already_processed:515            already_processed.append('xsi:type')516            self.extensiontype_ = value517    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):518        pass519# end class FlowElement520class Answer(GeneratedsSuper):521    subclass = None522    superclass = None523    def __init__(self, action=None, caption=None, id=None, reference=None):524        self.action = _cast(None, action)525        self.caption = _cast(None, caption)526        self.id = _cast(None, id)527        self.reference = _cast(None, reference)528        pass529    def factory(*args_, **kwargs_):530        if Answer.subclass:531            return Answer.subclass(*args_, **kwargs_)532        else:533            return Answer(*args_, **kwargs_)534    factory = staticmethod(factory)535    def get_action(self): return self.action536    def set_action(self, action): self.action = action537    def get_caption(self): return self.caption538    def set_caption(self, caption): self.caption = caption539    def get_id(self): return self.id540    def set_id(self, id): self.id = id541    def get_reference(self): return self.reference542    def set_reference(self, reference): self.reference = reference543    def export(self, outfile, level, namespace_='mstns:', name_='Answer', namespacedef_=''):544        showIndent(outfile, level)545        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))546        already_processed = []547        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Answer')548        if self.hasContent_():549            outfile.write('>\n')550            self.exportChildren(outfile, level + 1, namespace_, name_)551            outfile.write('</%s%s>\n' % (namespace_, name_))552        else:553            outfile.write('/>\n')554    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Answer'):555        if self.action is not None and 'action' not in already_processed:556            already_processed.append('action')557            outfile.write(' action=%s' % (self.gds_format_string(quote_attrib(self.action).encode(ExternalEncoding), input_name='action'),))558        if self.caption is not None and 'caption' not in already_processed:559            already_processed.append('caption')560            outfile.write(' caption=%s' % (self.gds_format_string(quote_attrib(self.caption).encode(ExternalEncoding), input_name='caption'),))561        if self.id is not None and 'id' not in already_processed:562            already_processed.append('id')563            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'),))564        if self.reference is not None and 'reference' not in already_processed:565            already_processed.append('reference')566            outfile.write(' reference=%s' % (self.gds_format_string(quote_attrib(self.reference).encode(ExternalEncoding), input_name='reference'),))567    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Answer', fromsubclass_=False):568        pass569    def hasContent_(self):570        if (571            ):572            return True573        else:574            return False575    def exportLiteral(self, outfile, level, name_='Answer'):576        level += 1577        self.exportLiteralAttributes(outfile, level, [], name_)578        if self.hasContent_():579            self.exportLiteralChildren(outfile, level, name_)580    def exportLiteralAttributes(self, outfile, level, already_processed, name_):581        if self.action is not None and 'action' not in already_processed:582            already_processed.append('action')583            showIndent(outfile, level)584            outfile.write('action = "%s",\n' % (self.action,))585        if self.caption is not None and 'caption' not in already_processed:586            already_processed.append('caption')587            showIndent(outfile, level)588            outfile.write('caption = "%s",\n' % (self.caption,))589        if self.id is not None and 'id' not in already_processed:590            already_processed.append('id')591            showIndent(outfile, level)592            outfile.write('id = "%s",\n' % (self.id,))593        if self.reference is not None and 'reference' not in already_processed:594            already_processed.append('reference')595            showIndent(outfile, level)596            outfile.write('reference = "%s",\n' % (self.reference,))597    def exportLiteralChildren(self, outfile, level, name_):598        pass599    def build(self, node):600        self.buildAttributes(node, node.attrib, [])601        for child in node:602            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]603            self.buildChildren(child, node, nodeName_)604    def buildAttributes(self, node, attrs, already_processed):605        value = find_attr_value_('action', node)606        if value is not None and 'action' not in already_processed:607            already_processed.append('action')608            self.action = value609        value = find_attr_value_('caption', node)610        if value is not None and 'caption' not in already_processed:611            already_processed.append('caption')612            self.caption = value613        value = find_attr_value_('id', node)614        if value is not None and 'id' not in already_processed:615            already_processed.append('id')616            self.id = value617        value = find_attr_value_('reference', node)618        if value is not None and 'reference' not in already_processed:619            already_processed.append('reference')620            self.reference = value621    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):622        pass623# end class Answer624class Message(FlowElement):625    subclass = None626    superclass = FlowElement627    def __init__(self, id=None, alertIntervalType=None, alertType=None, brandingKey=None, allowDismiss=None, vibrate=None, dismissReference=None, autoLock=None, content=None, answer=None, attachment=None):628        super(Message, self).__init__(id,)629        self.alertIntervalType = _cast(None, alertIntervalType)630        self.alertType = _cast(None, alertType)631        self.brandingKey = _cast(None, brandingKey)632        self.allowDismiss = _cast(bool, allowDismiss)633        self.vibrate = _cast(bool, vibrate)634        self.dismissReference = _cast(None, dismissReference)635        self.autoLock = _cast(bool, autoLock)636        self.content = content637        if answer is None:638            self.answer = []639        else:640            self.answer = answer641        if attachment is None:642            self.attachment = []643        else:644            self.attachment = attachment645    def factory(*args_, **kwargs_):646        if Message.subclass:647            return Message.subclass(*args_, **kwargs_)648        else:649            return Message(*args_, **kwargs_)650    factory = staticmethod(factory)651    def get_content(self): return self.content652    def set_content(self, content): self.content = content653    def get_answer(self): return self.answer654    def set_answer(self, answer): self.answer = answer655    def add_answer(self, value): self.answer.append(value)656    def insert_answer(self, index, value): self.answer[index] = value657    def get_attachment(self): return self.attachment658    def set_attachment(self, attachment): self.attachment = attachment659    def add_attachment(self, value): self.attachment.append(value)660    def insert_attachment(self, index, value): self.attachment[index] = value661    def get_alertIntervalType(self): return self.alertIntervalType662    def set_alertIntervalType(self, alertIntervalType): self.alertIntervalType = alertIntervalType663    def validate_AlertIntervalType(self, value):664        # Validate type AlertIntervalType, a restriction on xs:string.665        pass666    def get_alertType(self): return self.alertType667    def set_alertType(self, alertType): self.alertType = alertType668    def validate_AlertType(self, value):669        # Validate type AlertType, a restriction on xs:string.670        pass671    def get_brandingKey(self): return self.brandingKey672    def set_brandingKey(self, brandingKey): self.brandingKey = brandingKey673    def get_allowDismiss(self): return self.allowDismiss674    def set_allowDismiss(self, allowDismiss): self.allowDismiss = allowDismiss675    def get_vibrate(self): return self.vibrate676    def set_vibrate(self, vibrate): self.vibrate = vibrate677    def get_dismissReference(self): return self.dismissReference678    def set_dismissReference(self, dismissReference): self.dismissReference = dismissReference679    def get_autoLock(self): return self.autoLock680    def set_autoLock(self, autoLock): self.autoLock = autoLock681    def export(self, outfile, level, namespace_='mstns:', name_='Message', namespacedef_=''):682        showIndent(outfile, level)683        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))684        already_processed = []685        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Message')686        if self.hasContent_():687            outfile.write('>\n')688            self.exportChildren(outfile, level + 1, namespace_, name_)689            showIndent(outfile, level)690            outfile.write('</%s%s>\n' % (namespace_, name_))691        else:692            outfile.write('/>\n')693    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Message'):694        super(Message, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Message')695        if self.alertIntervalType is not None and 'alertIntervalType' not in already_processed:696            already_processed.append('alertIntervalType')697            outfile.write(' alertIntervalType=%s' % (quote_attrib(self.alertIntervalType),))698        if self.alertType is not None and 'alertType' not in already_processed:699            already_processed.append('alertType')700            outfile.write(' alertType=%s' % (quote_attrib(self.alertType),))701        if self.brandingKey is not None and 'brandingKey' not in already_processed:702            already_processed.append('brandingKey')703            outfile.write(' brandingKey=%s' % (self.gds_format_string(quote_attrib(self.brandingKey).encode(ExternalEncoding), input_name='brandingKey'),))704        if self.allowDismiss is not None and 'allowDismiss' not in already_processed:705            already_processed.append('allowDismiss')706            outfile.write(' allowDismiss="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.allowDismiss)), input_name='allowDismiss'))707        if self.vibrate is not None and 'vibrate' not in already_processed:708            already_processed.append('vibrate')709            outfile.write(' vibrate="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.vibrate)), input_name='vibrate'))710        if self.dismissReference is not None and 'dismissReference' not in already_processed:711            already_processed.append('dismissReference')712            outfile.write(' dismissReference=%s' % (self.gds_format_string(quote_attrib(self.dismissReference).encode(ExternalEncoding), input_name='dismissReference'),))713        if self.autoLock is not None and 'autoLock' not in already_processed:714            already_processed.append('autoLock')715            outfile.write(' autoLock="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.autoLock)), input_name='autoLock'))716    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Message', fromsubclass_=False):717        super(Message, self).exportChildren(outfile, level, namespace_, name_, True)718        if self.content is not None:719            self.content.export(outfile, level, namespace_, name_='content',)720        for answer_ in self.answer:721            answer_.export(outfile, level, namespace_, name_='answer')722        for attachment_ in self.attachment:723            attachment_.export(outfile, level, namespace_, name_='attachment')724    def hasContent_(self):725        if (726            self.content is not None or727            self.answer or728            self.attachment or729            super(Message, self).hasContent_()730            ):731            return True732        else:733            return False734    def exportLiteral(self, outfile, level, name_='Message'):735        level += 1736        self.exportLiteralAttributes(outfile, level, [], name_)737        if self.hasContent_():738            self.exportLiteralChildren(outfile, level, name_)739    def exportLiteralAttributes(self, outfile, level, already_processed, name_):740        if self.alertIntervalType is not None and 'alertIntervalType' not in already_processed:741            already_processed.append('alertIntervalType')742            showIndent(outfile, level)743            outfile.write('alertIntervalType = "%s",\n' % (self.alertIntervalType,))744        if self.alertType is not None and 'alertType' not in already_processed:745            already_processed.append('alertType')746            showIndent(outfile, level)747            outfile.write('alertType = "%s",\n' % (self.alertType,))748        if self.brandingKey is not None and 'brandingKey' not in already_processed:749            already_processed.append('brandingKey')750            showIndent(outfile, level)751            outfile.write('brandingKey = "%s",\n' % (self.brandingKey,))752        if self.allowDismiss is not None and 'allowDismiss' not in already_processed:753            already_processed.append('allowDismiss')754            showIndent(outfile, level)755            outfile.write('allowDismiss = %s,\n' % (self.allowDismiss,))756        if self.vibrate is not None and 'vibrate' not in already_processed:757            already_processed.append('vibrate')758            showIndent(outfile, level)759            outfile.write('vibrate = %s,\n' % (self.vibrate,))760        if self.dismissReference is not None and 'dismissReference' not in already_processed:761            already_processed.append('dismissReference')762            showIndent(outfile, level)763            outfile.write('dismissReference = "%s",\n' % (self.dismissReference,))764        if self.autoLock is not None and 'autoLock' not in already_processed:765            already_processed.append('autoLock')766            showIndent(outfile, level)767            outfile.write('autoLock = %s,\n' % (self.autoLock,))768        super(Message, self).exportLiteralAttributes(outfile, level, already_processed, name_)769    def exportLiteralChildren(self, outfile, level, name_):770        super(Message, self).exportLiteralChildren(outfile, level, name_)771        if self.content is not None:772            showIndent(outfile, level)773            outfile.write('content=model_.contentType(\n')774            self.content.exportLiteral(outfile, level, name_='content')775            showIndent(outfile, level)776            outfile.write('),\n')777        showIndent(outfile, level)778        outfile.write('answer=[\n')779        level += 1780        for answer_ in self.answer:781            showIndent(outfile, level)782            outfile.write('model_.Answer(\n')783            answer_.exportLiteral(outfile, level, name_='Answer')784            showIndent(outfile, level)785            outfile.write('),\n')786        level -= 1787        showIndent(outfile, level)788        outfile.write('],\n')789        showIndent(outfile, level)790        outfile.write('attachment=[\n')791        level += 1792        for attachment_ in self.attachment:793            showIndent(outfile, level)794            outfile.write('model_.Attachment(\n')795            attachment_.exportLiteral(outfile, level, name_='Attachment')796            showIndent(outfile, level)797            outfile.write('),\n')798        level -= 1799        showIndent(outfile, level)800        outfile.write('],\n')801    def build(self, node):802        self.buildAttributes(node, node.attrib, [])803        for child in node:804            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]805            self.buildChildren(child, node, nodeName_)806    def buildAttributes(self, node, attrs, already_processed):807        value = find_attr_value_('alertIntervalType', node)808        if value is not None and 'alertIntervalType' not in already_processed:809            already_processed.append('alertIntervalType')810            self.alertIntervalType = value811            self.validate_AlertIntervalType(self.alertIntervalType)  # validate type AlertIntervalType812        value = find_attr_value_('alertType', node)813        if value is not None and 'alertType' not in already_processed:814            already_processed.append('alertType')815            self.alertType = value816            self.validate_AlertType(self.alertType)  # validate type AlertType817        value = find_attr_value_('brandingKey', node)818        if value is not None and 'brandingKey' not in already_processed:819            already_processed.append('brandingKey')820            self.brandingKey = value821        value = find_attr_value_('allowDismiss', node)822        if value is not None and 'allowDismiss' not in already_processed:823            already_processed.append('allowDismiss')824            if value in ('true', '1'):825                self.allowDismiss = True826            elif value in ('false', '0'):827                self.allowDismiss = False828            else:829                raise_parse_error(node, 'Bad boolean attribute')830        value = find_attr_value_('vibrate', node)831        if value is not None and 'vibrate' not in already_processed:832            already_processed.append('vibrate')833            if value in ('true', '1'):834                self.vibrate = True835            elif value in ('false', '0'):836                self.vibrate = False837            else:838                raise_parse_error(node, 'Bad boolean attribute')839        value = find_attr_value_('dismissReference', node)840        if value is not None and 'dismissReference' not in already_processed:841            already_processed.append('dismissReference')842            self.dismissReference = value843        value = find_attr_value_('autoLock', node)844        if value is not None and 'autoLock' not in already_processed:845            already_processed.append('autoLock')846            if value in ('true', '1'):847                self.autoLock = True848            elif value in ('false', '0'):849                self.autoLock = False850            else:851                raise_parse_error(node, 'Bad boolean attribute')852        super(Message, self).buildAttributes(node, attrs, already_processed)853    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):854        if nodeName_ == 'content':855            obj_ = contentType.factory()856            obj_.build(child_)857            self.set_content(obj_)858        elif nodeName_ == 'answer':859            obj_ = Answer.factory()860            obj_.build(child_)861            self.answer.append(obj_)862        elif nodeName_ == 'attachment':863            obj_ = Attachment.factory()864            obj_.build(child_)865            self.attachment.append(obj_)866        super(Message, self).buildChildren(child_, node, nodeName_, True)867# end class Message868class ResultsFlush(FlowElement):869    subclass = None870    superclass = FlowElement871    def __init__(self, id=None, reference=None):872        super(ResultsFlush, self).__init__(id,)873        self.reference = _cast(None, reference)874        pass875    def factory(*args_, **kwargs_):876        if ResultsFlush.subclass:877            return ResultsFlush.subclass(*args_, **kwargs_)878        else:879            return ResultsFlush(*args_, **kwargs_)880    factory = staticmethod(factory)881    def get_reference(self): return self.reference882    def set_reference(self, reference): self.reference = reference883    def export(self, outfile, level, namespace_='mstns:', name_='ResultsFlush', namespacedef_=''):884        showIndent(outfile, level)885        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))886        already_processed = []887        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ResultsFlush')888        if self.hasContent_():889            outfile.write('>\n')890            self.exportChildren(outfile, level + 1, namespace_, name_)891            outfile.write('</%s%s>\n' % (namespace_, name_))892        else:893            outfile.write('/>\n')894    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='ResultsFlush'):895        super(ResultsFlush, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ResultsFlush')896        if self.reference is not None and 'reference' not in already_processed:897            already_processed.append('reference')898            outfile.write(' reference=%s' % (self.gds_format_string(quote_attrib(self.reference).encode(ExternalEncoding), input_name='reference'),))899    def exportChildren(self, outfile, level, namespace_='mstns:', name_='ResultsFlush', fromsubclass_=False):900        super(ResultsFlush, self).exportChildren(outfile, level, namespace_, name_, True)901        pass902    def hasContent_(self):903        if (904            super(ResultsFlush, self).hasContent_()905            ):906            return True907        else:908            return False909    def exportLiteral(self, outfile, level, name_='ResultsFlush'):910        level += 1911        self.exportLiteralAttributes(outfile, level, [], name_)912        if self.hasContent_():913            self.exportLiteralChildren(outfile, level, name_)914    def exportLiteralAttributes(self, outfile, level, already_processed, name_):915        if self.reference is not None and 'reference' not in already_processed:916            already_processed.append('reference')917            showIndent(outfile, level)918            outfile.write('reference = "%s",\n' % (self.reference,))919        super(ResultsFlush, self).exportLiteralAttributes(outfile, level, already_processed, name_)920    def exportLiteralChildren(self, outfile, level, name_):921        super(ResultsFlush, self).exportLiteralChildren(outfile, level, name_)922        pass923    def build(self, node):924        self.buildAttributes(node, node.attrib, [])925        for child in node:926            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]927            self.buildChildren(child, node, nodeName_)928    def buildAttributes(self, node, attrs, already_processed):929        value = find_attr_value_('reference', node)930        if value is not None and 'reference' not in already_processed:931            already_processed.append('reference')932            self.reference = value933        super(ResultsFlush, self).buildAttributes(node, attrs, already_processed)934    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):935        super(ResultsFlush, self).buildChildren(child_, node, nodeName_, True)936        pass937# end class ResultsFlush938class ResultsEmail(FlowElement):939    subclass = None940    superclass = FlowElement941    def __init__(self, id=None, reference=None, emailAdmins=None, email=None):942        super(ResultsEmail, self).__init__(id,)943        self.reference = _cast(None, reference)944        self.emailAdmins = _cast(bool, emailAdmins)945        if email is None:946            self.email = []947        else:948            self.email = email949    def factory(*args_, **kwargs_):950        if ResultsEmail.subclass:951            return ResultsEmail.subclass(*args_, **kwargs_)952        else:953            return ResultsEmail(*args_, **kwargs_)954    factory = staticmethod(factory)955    def get_email(self): return self.email956    def set_email(self, email): self.email = email957    def add_email(self, value): self.email.append(value)958    def insert_email(self, index, value): self.email[index] = value959    def get_reference(self): return self.reference960    def set_reference(self, reference): self.reference = reference961    def get_emailAdmins(self): return self.emailAdmins962    def set_emailAdmins(self, emailAdmins): self.emailAdmins = emailAdmins963    def export(self, outfile, level, namespace_='mstns:', name_='ResultsEmail', namespacedef_=''):964        showIndent(outfile, level)965        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))966        already_processed = []967        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ResultsEmail')968        if self.hasContent_():969            outfile.write('>\n')970            self.exportChildren(outfile, level + 1, namespace_, name_)971            showIndent(outfile, level)972            outfile.write('</%s%s>\n' % (namespace_, name_))973        else:974            outfile.write('/>\n')975    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='ResultsEmail'):976        super(ResultsEmail, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ResultsEmail')977        if self.reference is not None and 'reference' not in already_processed:978            already_processed.append('reference')979            outfile.write(' reference=%s' % (self.gds_format_string(quote_attrib(self.reference).encode(ExternalEncoding), input_name='reference'),))980        if self.emailAdmins is not None and 'emailAdmins' not in already_processed:981            already_processed.append('emailAdmins')982            outfile.write(' emailAdmins="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.emailAdmins)), input_name='emailAdmins'))983    def exportChildren(self, outfile, level, namespace_='mstns:', name_='ResultsEmail', fromsubclass_=False):984        super(ResultsEmail, self).exportChildren(outfile, level, namespace_, name_, True)985        for email_ in self.email:986            email_.export(outfile, level, namespace_, name_='email')987    def hasContent_(self):988        if (989            self.email or990            super(ResultsEmail, self).hasContent_()991            ):992            return True993        else:994            return False995    def exportLiteral(self, outfile, level, name_='ResultsEmail'):996        level += 1997        self.exportLiteralAttributes(outfile, level, [], name_)998        if self.hasContent_():999            self.exportLiteralChildren(outfile, level, name_)1000    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1001        if self.reference is not None and 'reference' not in already_processed:1002            already_processed.append('reference')1003            showIndent(outfile, level)1004            outfile.write('reference = "%s",\n' % (self.reference,))1005        if self.emailAdmins is not None and 'emailAdmins' not in already_processed:1006            already_processed.append('emailAdmins')1007            showIndent(outfile, level)1008            outfile.write('emailAdmins = %s,\n' % (self.emailAdmins,))1009        super(ResultsEmail, self).exportLiteralAttributes(outfile, level, already_processed, name_)1010    def exportLiteralChildren(self, outfile, level, name_):1011        super(ResultsEmail, self).exportLiteralChildren(outfile, level, name_)1012        showIndent(outfile, level)1013        outfile.write('email=[\n')1014        level += 11015        for email_ in self.email:1016            showIndent(outfile, level)1017            outfile.write('model_.Value(\n')1018            email_.exportLiteral(outfile, level, name_='Value')1019            showIndent(outfile, level)1020            outfile.write('),\n')1021        level -= 11022        showIndent(outfile, level)1023        outfile.write('],\n')1024    def build(self, node):1025        self.buildAttributes(node, node.attrib, [])1026        for child in node:1027            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1028            self.buildChildren(child, node, nodeName_)1029    def buildAttributes(self, node, attrs, already_processed):1030        value = find_attr_value_('reference', node)1031        if value is not None and 'reference' not in already_processed:1032            already_processed.append('reference')1033            self.reference = value1034        value = find_attr_value_('emailAdmins', node)1035        if value is not None and 'emailAdmins' not in already_processed:1036            already_processed.append('emailAdmins')1037            if value in ('true', '1'):1038                self.emailAdmins = True1039            elif value in ('false', '0'):1040                self.emailAdmins = False1041            else:1042                raise_parse_error(node, 'Bad boolean attribute')1043        super(ResultsEmail, self).buildAttributes(node, attrs, already_processed)1044    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1045        if nodeName_ == 'email':1046            class_obj_ = self.get_class_obj_(child_, Value)1047            obj_ = class_obj_.factory()1048            obj_.build(child_)1049            self.email.append(obj_)1050        super(ResultsEmail, self).buildChildren(child_, node, nodeName_, True)1051# end class ResultsEmail1052class FlowCode(FlowElement):1053    subclass = None1054    superclass = FlowElement1055    def __init__(self, id=None, exceptionReference=None, outlet=None, javascriptCode=None):1056        super(FlowCode, self).__init__(id,)1057        self.exceptionReference = _cast(None, exceptionReference)1058        if outlet is None:1059            self.outlet = []1060        else:1061            self.outlet = outlet1062        self.javascriptCode = javascriptCode1063    def factory(*args_, **kwargs_):1064        if FlowCode.subclass:1065            return FlowCode.subclass(*args_, **kwargs_)1066        else:1067            return FlowCode(*args_, **kwargs_)1068    factory = staticmethod(factory)1069    def get_outlet(self): return self.outlet1070    def set_outlet(self, outlet): self.outlet = outlet1071    def add_outlet(self, value): self.outlet.append(value)1072    def insert_outlet(self, index, value): self.outlet[index] = value1073    def get_javascriptCode(self): return self.javascriptCode1074    def set_javascriptCode(self, javascriptCode): self.javascriptCode = javascriptCode1075    def get_exceptionReference(self): return self.exceptionReference1076    def set_exceptionReference(self, exceptionReference): self.exceptionReference = exceptionReference1077    def export(self, outfile, level, namespace_='mstns:', name_='FlowCode', namespacedef_=''):1078        showIndent(outfile, level)1079        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1080        already_processed = []1081        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FlowCode')1082        if self.hasContent_():1083            outfile.write('>\n')1084            self.exportChildren(outfile, level + 1, namespace_, name_)1085            showIndent(outfile, level)1086            outfile.write('</%s%s>\n' % (namespace_, name_))1087        else:1088            outfile.write('/>\n')1089    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='FlowCode'):1090        super(FlowCode, self).exportAttributes(outfile, level, already_processed, namespace_, name_='FlowCode')1091        if self.exceptionReference is not None and 'exceptionReference' not in already_processed:1092            already_processed.append('exceptionReference')1093            outfile.write(' exceptionReference=%s' % (self.gds_format_string(quote_attrib(self.exceptionReference).encode(ExternalEncoding), input_name='exceptionReference'),))1094    def exportChildren(self, outfile, level, namespace_='mstns:', name_='FlowCode', fromsubclass_=False):1095        super(FlowCode, self).exportChildren(outfile, level, namespace_, name_, True)1096        for outlet_ in self.outlet:1097            outlet_.export(outfile, level, namespace_, name_='outlet')1098        if self.javascriptCode is not None:1099            self.javascriptCode.export(outfile, level, namespace_, name_='javascriptCode',)1100    def hasContent_(self):1101        if (1102            self.outlet or1103            self.javascriptCode is not None or1104            super(FlowCode, self).hasContent_()1105            ):1106            return True1107        else:1108            return False1109    def exportLiteral(self, outfile, level, name_='FlowCode'):1110        level += 11111        self.exportLiteralAttributes(outfile, level, [], name_)1112        if self.hasContent_():1113            self.exportLiteralChildren(outfile, level, name_)1114    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1115        if self.exceptionReference is not None and 'exceptionReference' not in already_processed:1116            already_processed.append('exceptionReference')1117            showIndent(outfile, level)1118            outfile.write('exceptionReference = "%s",\n' % (self.exceptionReference,))1119        super(FlowCode, self).exportLiteralAttributes(outfile, level, already_processed, name_)1120    def exportLiteralChildren(self, outfile, level, name_):1121        super(FlowCode, self).exportLiteralChildren(outfile, level, name_)1122        showIndent(outfile, level)1123        outfile.write('outlet=[\n')1124        level += 11125        for outlet_ in self.outlet:1126            showIndent(outfile, level)1127            outfile.write('model_.Outlet(\n')1128            outlet_.exportLiteral(outfile, level, name_='Outlet')1129            showIndent(outfile, level)1130            outfile.write('),\n')1131        level -= 11132        showIndent(outfile, level)1133        outfile.write('],\n')1134        if self.javascriptCode is not None:1135            showIndent(outfile, level)1136            outfile.write('javascriptCode=model_.javascriptCodeType(\n')1137            self.javascriptCode.exportLiteral(outfile, level, name_='javascriptCode')1138            showIndent(outfile, level)1139            outfile.write('),\n')1140    def build(self, node):1141        self.buildAttributes(node, node.attrib, [])1142        for child in node:1143            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1144            self.buildChildren(child, node, nodeName_)1145    def buildAttributes(self, node, attrs, already_processed):1146        value = find_attr_value_('exceptionReference', node)1147        if value is not None and 'exceptionReference' not in already_processed:1148            already_processed.append('exceptionReference')1149            self.exceptionReference = value1150        super(FlowCode, self).buildAttributes(node, attrs, already_processed)1151    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1152        if nodeName_ == 'outlet':1153            obj_ = Outlet.factory()1154            obj_.build(child_)1155            self.outlet.append(obj_)1156        elif nodeName_ == 'javascriptCode':1157            obj_ = javascriptCodeType.factory()1158            obj_.build(child_)1159            self.set_javascriptCode(obj_)1160        super(FlowCode, self).buildChildren(child_, node, nodeName_, True)1161# end class FlowCode1162class Widget(GeneratedsSuper):1163    subclass = None1164    superclass = None1165    def __init__(self, extensiontype_=None):1166        self.extensiontype_ = extensiontype_1167    def factory(*args_, **kwargs_):1168        if Widget.subclass:1169            return Widget.subclass(*args_, **kwargs_)1170        else:1171            return Widget(*args_, **kwargs_)1172    factory = staticmethod(factory)1173    def get_extensiontype_(self): return self.extensiontype_1174    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_1175    def export(self, outfile, level, namespace_='mstns:', name_='Widget', namespacedef_=''):1176        showIndent(outfile, level)1177        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1178        already_processed = []1179        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Widget')1180        if self.hasContent_():1181            outfile.write('>\n')1182            self.exportChildren(outfile, level + 1, namespace_, name_)1183            outfile.write('</%s%s>\n' % (namespace_, name_))1184        else:1185            outfile.write('/>\n')1186    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Widget'):1187        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:1188            already_processed.append('xsi:type')1189            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')1190            outfile.write(' xsi:type="%s"' % self.extensiontype_)1191        pass1192    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Widget', fromsubclass_=False):1193        pass1194    def hasContent_(self):1195        if (1196            ):1197            return True1198        else:1199            return False1200    def exportLiteral(self, outfile, level, name_='Widget'):1201        level += 11202        self.exportLiteralAttributes(outfile, level, [], name_)1203        if self.hasContent_():1204            self.exportLiteralChildren(outfile, level, name_)1205    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1206        pass1207    def exportLiteralChildren(self, outfile, level, name_):1208        pass1209    def build(self, node):1210        self.buildAttributes(node, node.attrib, [])1211        for child in node:1212            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1213            self.buildChildren(child, node, nodeName_)1214    def buildAttributes(self, node, attrs, already_processed):1215        value = find_attr_value_('xsi:type', node)1216        if value is not None and 'xsi:type' not in already_processed:1217            already_processed.append('xsi:type')1218            self.extensiontype_ = value1219    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1220        pass1221# end class Widget1222class BaseSliderWidget(Widget):1223    subclass = None1224    superclass = Widget1225    def __init__(self, max=None, step=None, precision=None, unit=None, min=None, extensiontype_=None):1226        super(BaseSliderWidget, self).__init__(extensiontype_,)1227        self.max = _cast(float, max)1228        self.step = _cast(float, step)1229        self.precision = _cast(int, precision)1230        self.unit = _cast(None, unit)1231        self.min = _cast(float, min)1232        self.extensiontype_ = extensiontype_1233    def factory(*args_, **kwargs_):1234        if BaseSliderWidget.subclass:1235            return BaseSliderWidget.subclass(*args_, **kwargs_)1236        else:1237            return BaseSliderWidget(*args_, **kwargs_)1238    factory = staticmethod(factory)1239    def get_max(self): return self.max1240    def set_max(self, max): self.max = max1241    def get_step(self): return self.step1242    def set_step(self, step): self.step = step1243    def get_precision(self): return self.precision1244    def set_precision(self, precision): self.precision = precision1245    def get_unit(self): return self.unit1246    def set_unit(self, unit): self.unit = unit1247    def get_min(self): return self.min1248    def set_min(self, min): self.min = min1249    def get_extensiontype_(self): return self.extensiontype_1250    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_1251    def export(self, outfile, level, namespace_='mstns:', name_='BaseSliderWidget', namespacedef_=''):1252        showIndent(outfile, level)1253        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1254        already_processed = []1255        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BaseSliderWidget')1256        if self.hasContent_():1257            outfile.write('>\n')1258            self.exportChildren(outfile, level + 1, namespace_, name_)1259            outfile.write('</%s%s>\n' % (namespace_, name_))1260        else:1261            outfile.write('/>\n')1262    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='BaseSliderWidget'):1263        super(BaseSliderWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='BaseSliderWidget')1264        if self.max is not None and 'max' not in already_processed:1265            already_processed.append('max')1266            outfile.write(' max="%s"' % self.gds_format_float(self.max, input_name='max'))1267        if self.step is not None and 'step' not in already_processed:1268            already_processed.append('step')1269            outfile.write(' step="%s"' % self.gds_format_float(self.step, input_name='step'))1270        if self.precision is not None and 'precision' not in already_processed:1271            already_processed.append('precision')1272            outfile.write(' precision="%s"' % self.gds_format_integer(self.precision, input_name='precision'))1273        if self.unit is not None and 'unit' not in already_processed:1274            already_processed.append('unit')1275            outfile.write(' unit=%s' % (self.gds_format_string(quote_attrib(self.unit).encode(ExternalEncoding), input_name='unit'),))1276        if self.min is not None and 'min' not in already_processed:1277            already_processed.append('min')1278            outfile.write(' min="%s"' % self.gds_format_float(self.min, input_name='min'))1279        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:1280            already_processed.append('xsi:type')1281            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')1282            outfile.write(' xsi:type="%s"' % self.extensiontype_)1283    def exportChildren(self, outfile, level, namespace_='mstns:', name_='BaseSliderWidget', fromsubclass_=False):1284        super(BaseSliderWidget, self).exportChildren(outfile, level, namespace_, name_, True)1285        pass1286    def hasContent_(self):1287        if (1288            super(BaseSliderWidget, self).hasContent_()1289            ):1290            return True1291        else:1292            return False1293    def exportLiteral(self, outfile, level, name_='BaseSliderWidget'):1294        level += 11295        self.exportLiteralAttributes(outfile, level, [], name_)1296        if self.hasContent_():1297            self.exportLiteralChildren(outfile, level, name_)1298    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1299        if self.max is not None and 'max' not in already_processed:1300            already_processed.append('max')1301            showIndent(outfile, level)1302            outfile.write('max = %f,\n' % (self.max,))1303        if self.step is not None and 'step' not in already_processed:1304            already_processed.append('step')1305            showIndent(outfile, level)1306            outfile.write('step = %f,\n' % (self.step,))1307        if self.precision is not None and 'precision' not in already_processed:1308            already_processed.append('precision')1309            showIndent(outfile, level)1310            outfile.write('precision = %d,\n' % (self.precision,))1311        if self.unit is not None and 'unit' not in already_processed:1312            already_processed.append('unit')1313            showIndent(outfile, level)1314            outfile.write('unit = "%s",\n' % (self.unit,))1315        if self.min is not None and 'min' not in already_processed:1316            already_processed.append('min')1317            showIndent(outfile, level)1318            outfile.write('min = %f,\n' % (self.min,))1319        super(BaseSliderWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1320    def exportLiteralChildren(self, outfile, level, name_):1321        super(BaseSliderWidget, self).exportLiteralChildren(outfile, level, name_)1322        pass1323    def build(self, node):1324        self.buildAttributes(node, node.attrib, [])1325        for child in node:1326            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1327            self.buildChildren(child, node, nodeName_)1328    def buildAttributes(self, node, attrs, already_processed):1329        value = find_attr_value_('max', node)1330        if value is not None and 'max' not in already_processed:1331            already_processed.append('max')1332            try:1333                self.max = float(value)1334            except ValueError, exp:1335                raise ValueError('Bad float/double attribute (max): %s' % exp)1336        value = find_attr_value_('step', node)1337        if value is not None and 'step' not in already_processed:1338            already_processed.append('step')1339            try:1340                self.step = float(value)1341            except ValueError, exp:1342                raise ValueError('Bad float/double attribute (step): %s' % exp)1343        value = find_attr_value_('precision', node)1344        if value is not None and 'precision' not in already_processed:1345            already_processed.append('precision')1346            try:1347                self.precision = int(value)1348            except ValueError, exp:1349                raise_parse_error(node, 'Bad integer attribute: %s' % exp)1350        value = find_attr_value_('unit', node)1351        if value is not None and 'unit' not in already_processed:1352            already_processed.append('unit')1353            self.unit = value1354        value = find_attr_value_('min', node)1355        if value is not None and 'min' not in already_processed:1356            already_processed.append('min')1357            try:1358                self.min = float(value)1359            except ValueError, exp:1360                raise ValueError('Bad float/double attribute (min): %s' % exp)1361        value = find_attr_value_('xsi:type', node)1362        if value is not None and 'xsi:type' not in already_processed:1363            already_processed.append('xsi:type')1364            self.extensiontype_ = value1365        super(BaseSliderWidget, self).buildAttributes(node, attrs, already_processed)1366    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1367        super(BaseSliderWidget, self).buildChildren(child_, node, nodeName_, True)1368        pass1369# end class BaseSliderWidget1370class SliderWidget(BaseSliderWidget):1371    subclass = None1372    superclass = BaseSliderWidget1373    def __init__(self, max=None, step=None, precision=None, unit=None, min=None, value=None):1374        super(SliderWidget, self).__init__(max, step, precision, unit, min,)1375        self.value = _cast(float, value)1376        pass1377    def factory(*args_, **kwargs_):1378        if SliderWidget.subclass:1379            return SliderWidget.subclass(*args_, **kwargs_)1380        else:1381            return SliderWidget(*args_, **kwargs_)1382    factory = staticmethod(factory)1383    def get_value(self): return self.value1384    def set_value(self, value): self.value = value1385    def export(self, outfile, level, namespace_='mstns:', name_='SliderWidget', namespacedef_=''):1386        showIndent(outfile, level)1387        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1388        already_processed = []1389        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SliderWidget')1390        if self.hasContent_():1391            outfile.write('>\n')1392            self.exportChildren(outfile, level + 1, namespace_, name_)1393            outfile.write('</%s%s>\n' % (namespace_, name_))1394        else:1395            outfile.write('/>\n')1396    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SliderWidget'):1397        super(SliderWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SliderWidget')1398        if self.value is not None and 'value' not in already_processed:1399            already_processed.append('value')1400            outfile.write(' value="%s"' % self.gds_format_float(self.value, input_name='value'))1401    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SliderWidget', fromsubclass_=False):1402        super(SliderWidget, self).exportChildren(outfile, level, namespace_, name_, True)1403        pass1404    def hasContent_(self):1405        if (1406            super(SliderWidget, self).hasContent_()1407            ):1408            return True1409        else:1410            return False1411    def exportLiteral(self, outfile, level, name_='SliderWidget'):1412        level += 11413        self.exportLiteralAttributes(outfile, level, [], name_)1414        if self.hasContent_():1415            self.exportLiteralChildren(outfile, level, name_)1416    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1417        if self.value is not None and 'value' not in already_processed:1418            already_processed.append('value')1419            showIndent(outfile, level)1420            outfile.write('value = %f,\n' % (self.value,))1421        super(SliderWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1422    def exportLiteralChildren(self, outfile, level, name_):1423        super(SliderWidget, self).exportLiteralChildren(outfile, level, name_)1424        pass1425    def build(self, node):1426        self.buildAttributes(node, node.attrib, [])1427        for child in node:1428            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1429            self.buildChildren(child, node, nodeName_)1430    def buildAttributes(self, node, attrs, already_processed):1431        value = find_attr_value_('value', node)1432        if value is not None and 'value' not in already_processed:1433            already_processed.append('value')1434            try:1435                self.value = float(value)1436            except ValueError, exp:1437                raise ValueError('Bad float/double attribute (value): %s' % exp)1438        super(SliderWidget, self).buildAttributes(node, attrs, already_processed)1439    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1440        super(SliderWidget, self).buildChildren(child_, node, nodeName_, True)1441        pass1442# end class SliderWidget1443class RangeSliderWidget(BaseSliderWidget):1444    subclass = None1445    superclass = BaseSliderWidget1446    def __init__(self, max=None, step=None, precision=None, unit=None, min=None, lowValue=None, highValue=None):1447        super(RangeSliderWidget, self).__init__(max, step, precision, unit, min,)1448        self.lowValue = _cast(float, lowValue)1449        self.highValue = _cast(float, highValue)1450        pass1451    def factory(*args_, **kwargs_):1452        if RangeSliderWidget.subclass:1453            return RangeSliderWidget.subclass(*args_, **kwargs_)1454        else:1455            return RangeSliderWidget(*args_, **kwargs_)1456    factory = staticmethod(factory)1457    def get_lowValue(self): return self.lowValue1458    def set_lowValue(self, lowValue): self.lowValue = lowValue1459    def get_highValue(self): return self.highValue1460    def set_highValue(self, highValue): self.highValue = highValue1461    def export(self, outfile, level, namespace_='mstns:', name_='RangeSliderWidget', namespacedef_=''):1462        showIndent(outfile, level)1463        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1464        already_processed = []1465        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RangeSliderWidget')1466        if self.hasContent_():1467            outfile.write('>\n')1468            self.exportChildren(outfile, level + 1, namespace_, name_)1469            outfile.write('</%s%s>\n' % (namespace_, name_))1470        else:1471            outfile.write('/>\n')1472    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='RangeSliderWidget'):1473        super(RangeSliderWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RangeSliderWidget')1474        if self.lowValue is not None and 'lowValue' not in already_processed:1475            already_processed.append('lowValue')1476            outfile.write(' lowValue="%s"' % self.gds_format_float(self.lowValue, input_name='lowValue'))1477        if self.highValue is not None and 'highValue' not in already_processed:1478            already_processed.append('highValue')1479            outfile.write(' highValue="%s"' % self.gds_format_float(self.highValue, input_name='highValue'))1480    def exportChildren(self, outfile, level, namespace_='mstns:', name_='RangeSliderWidget', fromsubclass_=False):1481        super(RangeSliderWidget, self).exportChildren(outfile, level, namespace_, name_, True)1482        pass1483    def hasContent_(self):1484        if (1485            super(RangeSliderWidget, self).hasContent_()1486            ):1487            return True1488        else:1489            return False1490    def exportLiteral(self, outfile, level, name_='RangeSliderWidget'):1491        level += 11492        self.exportLiteralAttributes(outfile, level, [], name_)1493        if self.hasContent_():1494            self.exportLiteralChildren(outfile, level, name_)1495    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1496        if self.lowValue is not None and 'lowValue' not in already_processed:1497            already_processed.append('lowValue')1498            showIndent(outfile, level)1499            outfile.write('lowValue = %f,\n' % (self.lowValue,))1500        if self.highValue is not None and 'highValue' not in already_processed:1501            already_processed.append('highValue')1502            showIndent(outfile, level)1503            outfile.write('highValue = %f,\n' % (self.highValue,))1504        super(RangeSliderWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1505    def exportLiteralChildren(self, outfile, level, name_):1506        super(RangeSliderWidget, self).exportLiteralChildren(outfile, level, name_)1507        pass1508    def build(self, node):1509        self.buildAttributes(node, node.attrib, [])1510        for child in node:1511            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1512            self.buildChildren(child, node, nodeName_)1513    def buildAttributes(self, node, attrs, already_processed):1514        value = find_attr_value_('lowValue', node)1515        if value is not None and 'lowValue' not in already_processed:1516            already_processed.append('lowValue')1517            try:1518                self.lowValue = float(value)1519            except ValueError, exp:1520                raise ValueError('Bad float/double attribute (lowValue): %s' % exp)1521        value = find_attr_value_('highValue', node)1522        if value is not None and 'highValue' not in already_processed:1523            already_processed.append('highValue')1524            try:1525                self.highValue = float(value)1526            except ValueError, exp:1527                raise ValueError('Bad float/double attribute (highValue): %s' % exp)1528        super(RangeSliderWidget, self).buildAttributes(node, attrs, already_processed)1529    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1530        super(RangeSliderWidget, self).buildChildren(child_, node, nodeName_, True)1531        pass1532# end class RangeSliderWidget1533class PhotoUploadWidget(Widget):1534    subclass = None1535    superclass = Widget1536    def __init__(self, ratio=None, camera=None, quality=None, gallery=None):1537        super(PhotoUploadWidget, self).__init__()1538        self.ratio = _cast(None, ratio)1539        self.camera = _cast(bool, camera)1540        self.quality = _cast(None, quality)1541        self.gallery = _cast(bool, gallery)1542        pass1543    def factory(*args_, **kwargs_):1544        if PhotoUploadWidget.subclass:1545            return PhotoUploadWidget.subclass(*args_, **kwargs_)1546        else:1547            return PhotoUploadWidget(*args_, **kwargs_)1548    factory = staticmethod(factory)1549    def get_ratio(self): return self.ratio1550    def set_ratio(self, ratio): self.ratio = ratio1551    def get_camera(self): return self.camera1552    def set_camera(self, camera): self.camera = camera1553    def get_quality(self): return self.quality1554    def set_quality(self, quality): self.quality = quality1555    def get_gallery(self): return self.gallery1556    def set_gallery(self, gallery): self.gallery = gallery1557    def export(self, outfile, level, namespace_='mstns:', name_='PhotoUploadWidget', namespacedef_=''):1558        showIndent(outfile, level)1559        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1560        already_processed = []1561        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PhotoUploadWidget')1562        if self.hasContent_():1563            outfile.write('>\n')1564            self.exportChildren(outfile, level + 1, namespace_, name_)1565            outfile.write('</%s%s>\n' % (namespace_, name_))1566        else:1567            outfile.write('/>\n')1568    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='PhotoUploadWidget'):1569        super(PhotoUploadWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PhotoUploadWidget')1570        if self.ratio is not None and 'ratio' not in already_processed:1571            already_processed.append('ratio')1572            outfile.write(' ratio=%s' % (self.gds_format_string(quote_attrib(self.ratio).encode(ExternalEncoding), input_name='ratio'),))1573        if self.camera is not None and 'camera' not in already_processed:1574            already_processed.append('camera')1575            outfile.write(' camera="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.camera)), input_name='camera'))1576        if self.quality is not None and 'quality' not in already_processed:1577            already_processed.append('quality')1578            outfile.write(' quality=%s' % (self.gds_format_string(quote_attrib(self.quality).encode(ExternalEncoding), input_name='quality'),))1579        if self.gallery is not None and 'gallery' not in already_processed:1580            already_processed.append('gallery')1581            outfile.write(' gallery="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.gallery)), input_name='gallery'))1582    def exportChildren(self, outfile, level, namespace_='mstns:', name_='PhotoUploadWidget', fromsubclass_=False):1583        super(PhotoUploadWidget, self).exportChildren(outfile, level, namespace_, name_, True)1584        pass1585    def hasContent_(self):1586        if (1587            super(PhotoUploadWidget, self).hasContent_()1588            ):1589            return True1590        else:1591            return False1592    def exportLiteral(self, outfile, level, name_='PhotoUploadWidget'):1593        level += 11594        self.exportLiteralAttributes(outfile, level, [], name_)1595        if self.hasContent_():1596            self.exportLiteralChildren(outfile, level, name_)1597    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1598        if self.ratio is not None and 'ratio' not in already_processed:1599            already_processed.append('ratio')1600            showIndent(outfile, level)1601            outfile.write('ratio = "%s",\n' % (self.ratio,))1602        if self.camera is not None and 'camera' not in already_processed:1603            already_processed.append('camera')1604            showIndent(outfile, level)1605            outfile.write('camera = %s,\n' % (self.camera,))1606        if self.quality is not None and 'quality' not in already_processed:1607            already_processed.append('quality')1608            showIndent(outfile, level)1609            outfile.write('quality = "%s",\n' % (self.quality,))1610        if self.gallery is not None and 'gallery' not in already_processed:1611            already_processed.append('gallery')1612            showIndent(outfile, level)1613            outfile.write('gallery = %s,\n' % (self.gallery,))1614        super(PhotoUploadWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1615    def exportLiteralChildren(self, outfile, level, name_):1616        super(PhotoUploadWidget, self).exportLiteralChildren(outfile, level, name_)1617        pass1618    def build(self, node):1619        self.buildAttributes(node, node.attrib, [])1620        for child in node:1621            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1622            self.buildChildren(child, node, nodeName_)1623    def buildAttributes(self, node, attrs, already_processed):1624        value = find_attr_value_('ratio', node)1625        if value is not None and 'ratio' not in already_processed:1626            already_processed.append('ratio')1627            self.ratio = value1628        value = find_attr_value_('camera', node)1629        if value is not None and 'camera' not in already_processed:1630            already_processed.append('camera')1631            if value in ('true', '1'):1632                self.camera = True1633            elif value in ('false', '0'):1634                self.camera = False1635            else:1636                raise_parse_error(node, 'Bad boolean attribute')1637        value = find_attr_value_('quality', node)1638        if value is not None and 'quality' not in already_processed:1639            already_processed.append('quality')1640            self.quality = value1641        value = find_attr_value_('gallery', node)1642        if value is not None and 'gallery' not in already_processed:1643            already_processed.append('gallery')1644            if value in ('true', '1'):1645                self.gallery = True1646            elif value in ('false', '0'):1647                self.gallery = False1648            else:1649                raise_parse_error(node, 'Bad boolean attribute')1650        super(PhotoUploadWidget, self).buildAttributes(node, attrs, already_processed)1651    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1652        super(PhotoUploadWidget, self).buildChildren(child_, node, nodeName_, True)1653        pass1654# end class PhotoUploadWidget1655class GPSLocationWidget(Widget):1656    subclass = None1657    superclass = Widget1658    def __init__(self, gps=None):1659        super(GPSLocationWidget, self).__init__()1660        self.gps = _cast(bool, gps)1661        pass1662    def factory(*args_, **kwargs_):1663        if GPSLocationWidget.subclass:1664            return GPSLocationWidget.subclass(*args_, **kwargs_)1665        else:1666            return GPSLocationWidget(*args_, **kwargs_)1667    factory = staticmethod(factory)1668    def get_gps(self): return self.gps1669    def set_gps(self, gps): self.gps = gps1670    def export(self, outfile, level, namespace_='mstns:', name_='GPSLocationWidget', namespacedef_=''):1671        showIndent(outfile, level)1672        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1673        already_processed = []1674        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GPSLocationWidget')1675        if self.hasContent_():1676            outfile.write('>\n')1677            self.exportChildren(outfile, level + 1, namespace_, name_)1678            outfile.write('</%s%s>\n' % (namespace_, name_))1679        else:1680            outfile.write('/>\n')1681    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='GPSLocationWidget'):1682        super(GPSLocationWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GPSLocationWidget')1683        if self.gps is not None and 'gps' not in already_processed:1684            already_processed.append('gps')1685            outfile.write(' gps="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.gps)), input_name='gps'))1686    def exportChildren(self, outfile, level, namespace_='mstns:', name_='GPSLocationWidget', fromsubclass_=False):1687        super(GPSLocationWidget, self).exportChildren(outfile, level, namespace_, name_, True)1688        pass1689    def hasContent_(self):1690        if (1691            super(GPSLocationWidget, self).hasContent_()1692            ):1693            return True1694        else:1695            return False1696    def exportLiteral(self, outfile, level, name_='GPSLocationWidget'):1697        level += 11698        self.exportLiteralAttributes(outfile, level, [], name_)1699        if self.hasContent_():1700            self.exportLiteralChildren(outfile, level, name_)1701    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1702        if self.gps is not None and 'gps' not in already_processed:1703            already_processed.append('gps')1704            showIndent(outfile, level)1705            outfile.write('gps = %s,\n' % (self.gps,))1706        super(GPSLocationWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1707    def exportLiteralChildren(self, outfile, level, name_):1708        super(GPSLocationWidget, self).exportLiteralChildren(outfile, level, name_)1709        pass1710    def build(self, node):1711        self.buildAttributes(node, node.attrib, [])1712        for child in node:1713            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1714            self.buildChildren(child, node, nodeName_)1715    def buildAttributes(self, node, attrs, already_processed):1716        value = find_attr_value_('gps', node)1717        if value is not None and 'gps' not in already_processed:1718            already_processed.append('gps')1719            if value in ('true', '1'):1720                self.gps = True1721            elif value in ('false', '0'):1722                self.gps = False1723            else:1724                raise_parse_error(node, 'Bad boolean attribute')1725        super(GPSLocationWidget, self).buildAttributes(node, attrs, already_processed)1726    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1727        super(GPSLocationWidget, self).buildChildren(child_, node, nodeName_, True)1728        pass1729# end class GPSLocationWidget1730class TextWidget(Widget):1731    subclass = None1732    superclass = Widget1733    def __init__(self, maxChars=None, placeholder=None, value=None, extensiontype_=None):1734        super(TextWidget, self).__init__(extensiontype_,)1735        self.maxChars = _cast(int, maxChars)1736        self.placeholder = _cast(None, placeholder)1737        self.value = _cast(None, value)1738        self.extensiontype_ = extensiontype_1739    def factory(*args_, **kwargs_):1740        if TextWidget.subclass:1741            return TextWidget.subclass(*args_, **kwargs_)1742        else:1743            return TextWidget(*args_, **kwargs_)1744    factory = staticmethod(factory)1745    def get_maxChars(self): return self.maxChars1746    def set_maxChars(self, maxChars): self.maxChars = maxChars1747    def get_placeholder(self): return self.placeholder1748    def set_placeholder(self, placeholder): self.placeholder = placeholder1749    def get_value(self): return self.value1750    def set_value(self, value): self.value = value1751    def get_extensiontype_(self): return self.extensiontype_1752    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_1753    def export(self, outfile, level, namespace_='mstns:', name_='TextWidget', namespacedef_=''):1754        showIndent(outfile, level)1755        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1756        already_processed = []1757        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TextWidget')1758        if self.hasContent_():1759            outfile.write('>\n')1760            self.exportChildren(outfile, level + 1, namespace_, name_)1761            outfile.write('</%s%s>\n' % (namespace_, name_))1762        else:1763            outfile.write('/>\n')1764    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='TextWidget'):1765        super(TextWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TextWidget')1766        if self.maxChars is not None and 'maxChars' not in already_processed:1767            already_processed.append('maxChars')1768            outfile.write(' maxChars="%s"' % self.gds_format_integer(self.maxChars, input_name='maxChars'))1769        if self.placeholder is not None and 'placeholder' not in already_processed:1770            already_processed.append('placeholder')1771            outfile.write(' placeholder=%s' % (self.gds_format_string(quote_attrib(self.placeholder).encode(ExternalEncoding), input_name='placeholder'),))1772        if self.value is not None and 'value' not in already_processed:1773            already_processed.append('value')1774            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))1775        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:1776            already_processed.append('xsi:type')1777            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')1778            outfile.write(' xsi:type="%s"' % self.extensiontype_)1779    def exportChildren(self, outfile, level, namespace_='mstns:', name_='TextWidget', fromsubclass_=False):1780        super(TextWidget, self).exportChildren(outfile, level, namespace_, name_, True)1781        pass1782    def hasContent_(self):1783        if (1784            super(TextWidget, self).hasContent_()1785            ):1786            return True1787        else:1788            return False1789    def exportLiteral(self, outfile, level, name_='TextWidget'):1790        level += 11791        self.exportLiteralAttributes(outfile, level, [], name_)1792        if self.hasContent_():1793            self.exportLiteralChildren(outfile, level, name_)1794    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1795        if self.maxChars is not None and 'maxChars' not in already_processed:1796            already_processed.append('maxChars')1797            showIndent(outfile, level)1798            outfile.write('maxChars = %d,\n' % (self.maxChars,))1799        if self.placeholder is not None and 'placeholder' not in already_processed:1800            already_processed.append('placeholder')1801            showIndent(outfile, level)1802            outfile.write('placeholder = "%s",\n' % (self.placeholder,))1803        if self.value is not None and 'value' not in already_processed:1804            already_processed.append('value')1805            showIndent(outfile, level)1806            outfile.write('value = "%s",\n' % (self.value,))1807        super(TextWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1808    def exportLiteralChildren(self, outfile, level, name_):1809        super(TextWidget, self).exportLiteralChildren(outfile, level, name_)1810        pass1811    def build(self, node):1812        self.buildAttributes(node, node.attrib, [])1813        for child in node:1814            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1815            self.buildChildren(child, node, nodeName_)1816    def buildAttributes(self, node, attrs, already_processed):1817        value = find_attr_value_('maxChars', node)1818        if value is not None and 'maxChars' not in already_processed:1819            already_processed.append('maxChars')1820            try:1821                self.maxChars = int(value)1822            except ValueError, exp:1823                raise_parse_error(node, 'Bad integer attribute: %s' % exp)1824        value = find_attr_value_('placeholder', node)1825        if value is not None and 'placeholder' not in already_processed:1826            already_processed.append('placeholder')1827            self.placeholder = value1828        value = find_attr_value_('value', node)1829        if value is not None and 'value' not in already_processed:1830            already_processed.append('value')1831            self.value = value1832        value = find_attr_value_('xsi:type', node)1833        if value is not None and 'xsi:type' not in already_processed:1834            already_processed.append('xsi:type')1835            self.extensiontype_ = value1836        super(TextWidget, self).buildAttributes(node, attrs, already_processed)1837    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1838        super(TextWidget, self).buildChildren(child_, node, nodeName_, True)1839        pass1840# end class TextWidget1841class TextLineWidget(TextWidget):1842    subclass = None1843    superclass = TextWidget1844    def __init__(self, maxChars=None, placeholder=None, value=None):1845        super(TextLineWidget, self).__init__(maxChars, placeholder, value,)1846        pass1847    def factory(*args_, **kwargs_):1848        if TextLineWidget.subclass:1849            return TextLineWidget.subclass(*args_, **kwargs_)1850        else:1851            return TextLineWidget(*args_, **kwargs_)1852    factory = staticmethod(factory)1853    def export(self, outfile, level, namespace_='mstns:', name_='TextLineWidget', namespacedef_=''):1854        showIndent(outfile, level)1855        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1856        already_processed = []1857        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TextLineWidget')1858        if self.hasContent_():1859            outfile.write('>\n')1860            self.exportChildren(outfile, level + 1, namespace_, name_)1861            outfile.write('</%s%s>\n' % (namespace_, name_))1862        else:1863            outfile.write('/>\n')1864    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='TextLineWidget'):1865        super(TextLineWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TextLineWidget')1866    def exportChildren(self, outfile, level, namespace_='mstns:', name_='TextLineWidget', fromsubclass_=False):1867        super(TextLineWidget, self).exportChildren(outfile, level, namespace_, name_, True)1868        pass1869    def hasContent_(self):1870        if (1871            super(TextLineWidget, self).hasContent_()1872            ):1873            return True1874        else:1875            return False1876    def exportLiteral(self, outfile, level, name_='TextLineWidget'):1877        level += 11878        self.exportLiteralAttributes(outfile, level, [], name_)1879        if self.hasContent_():1880            self.exportLiteralChildren(outfile, level, name_)1881    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1882        super(TextLineWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1883    def exportLiteralChildren(self, outfile, level, name_):1884        super(TextLineWidget, self).exportLiteralChildren(outfile, level, name_)1885        pass1886    def build(self, node):1887        self.buildAttributes(node, node.attrib, [])1888        for child in node:1889            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1890            self.buildChildren(child, node, nodeName_)1891    def buildAttributes(self, node, attrs, already_processed):1892        super(TextLineWidget, self).buildAttributes(node, attrs, already_processed)1893    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1894        super(TextLineWidget, self).buildChildren(child_, node, nodeName_, True)1895        pass1896# end class TextLineWidget1897class TextBlockWidget(TextWidget):1898    subclass = None1899    superclass = TextWidget1900    def __init__(self, maxChars=None, placeholder=None, value=None):1901        super(TextBlockWidget, self).__init__(maxChars, placeholder, value,)1902        pass1903    def factory(*args_, **kwargs_):1904        if TextBlockWidget.subclass:1905            return TextBlockWidget.subclass(*args_, **kwargs_)1906        else:1907            return TextBlockWidget(*args_, **kwargs_)1908    factory = staticmethod(factory)1909    def export(self, outfile, level, namespace_='mstns:', name_='TextBlockWidget', namespacedef_=''):1910        showIndent(outfile, level)1911        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1912        already_processed = []1913        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TextBlockWidget')1914        if self.hasContent_():1915            outfile.write('>\n')1916            self.exportChildren(outfile, level + 1, namespace_, name_)1917            outfile.write('</%s%s>\n' % (namespace_, name_))1918        else:1919            outfile.write('/>\n')1920    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='TextBlockWidget'):1921        super(TextBlockWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TextBlockWidget')1922    def exportChildren(self, outfile, level, namespace_='mstns:', name_='TextBlockWidget', fromsubclass_=False):1923        super(TextBlockWidget, self).exportChildren(outfile, level, namespace_, name_, True)1924        pass1925    def hasContent_(self):1926        if (1927            super(TextBlockWidget, self).hasContent_()1928            ):1929            return True1930        else:1931            return False1932    def exportLiteral(self, outfile, level, name_='TextBlockWidget'):1933        level += 11934        self.exportLiteralAttributes(outfile, level, [], name_)1935        if self.hasContent_():1936            self.exportLiteralChildren(outfile, level, name_)1937    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1938        super(TextBlockWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)1939    def exportLiteralChildren(self, outfile, level, name_):1940        super(TextBlockWidget, self).exportLiteralChildren(outfile, level, name_)1941        pass1942    def build(self, node):1943        self.buildAttributes(node, node.attrib, [])1944        for child in node:1945            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1946            self.buildChildren(child, node, nodeName_)1947    def buildAttributes(self, node, attrs, already_processed):1948        super(TextBlockWidget, self).buildAttributes(node, attrs, already_processed)1949    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1950        super(TextBlockWidget, self).buildChildren(child_, node, nodeName_, True)1951        pass1952# end class TextBlockWidget1953class Value(GeneratedsSuper):1954    subclass = None1955    superclass = None1956    def __init__(self, value=None, extensiontype_=None):1957        self.value = _cast(None, value)1958        self.extensiontype_ = extensiontype_1959    def factory(*args_, **kwargs_):1960        if Value.subclass:1961            return Value.subclass(*args_, **kwargs_)1962        else:1963            return Value(*args_, **kwargs_)1964    factory = staticmethod(factory)1965    def get_value(self): return self.value1966    def set_value(self, value): self.value = value1967    def get_extensiontype_(self): return self.extensiontype_1968    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_1969    def export(self, outfile, level, namespace_='mstns:', name_='Value', namespacedef_=''):1970        showIndent(outfile, level)1971        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))1972        already_processed = []1973        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Value')1974        if self.hasContent_():1975            outfile.write('>\n')1976            self.exportChildren(outfile, level + 1, namespace_, name_)1977            outfile.write('</%s%s>\n' % (namespace_, name_))1978        else:1979            outfile.write('/>\n')1980    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Value'):1981        if self.value is not None and 'value' not in already_processed:1982            already_processed.append('value')1983            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))1984        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:1985            already_processed.append('xsi:type')1986            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')1987            outfile.write(' xsi:type="%s"' % self.extensiontype_)1988    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Value', fromsubclass_=False):1989        pass1990    def hasContent_(self):1991        if (1992            ):1993            return True1994        else:1995            return False1996    def exportLiteral(self, outfile, level, name_='Value'):1997        level += 11998        self.exportLiteralAttributes(outfile, level, [], name_)1999        if self.hasContent_():2000            self.exportLiteralChildren(outfile, level, name_)2001    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2002        if self.value is not None and 'value' not in already_processed:2003            already_processed.append('value')2004            showIndent(outfile, level)2005            outfile.write('value = "%s",\n' % (self.value,))2006    def exportLiteralChildren(self, outfile, level, name_):2007        pass2008    def build(self, node):2009        self.buildAttributes(node, node.attrib, [])2010        for child in node:2011            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2012            self.buildChildren(child, node, nodeName_)2013    def buildAttributes(self, node, attrs, already_processed):2014        value = find_attr_value_('value', node)2015        if value is not None and 'value' not in already_processed:2016            already_processed.append('value')2017            self.value = value2018        value = find_attr_value_('xsi:type', node)2019        if value is not None and 'xsi:type' not in already_processed:2020            already_processed.append('xsi:type')2021            self.extensiontype_ = value2022    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2023        pass2024# end class Value2025class FloatValue(GeneratedsSuper):2026    subclass = None2027    superclass = None2028    def __init__(self, value=None):2029        self.value = _cast(float, value)2030        pass2031    def factory(*args_, **kwargs_):2032        if FloatValue.subclass:2033            return FloatValue.subclass(*args_, **kwargs_)2034        else:2035            return FloatValue(*args_, **kwargs_)2036    factory = staticmethod(factory)2037    def get_value(self): return self.value2038    def set_value(self, value): self.value = value2039    def export(self, outfile, level, namespace_='mstns:', name_='FloatValue', namespacedef_=''):2040        showIndent(outfile, level)2041        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2042        already_processed = []2043        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FloatValue')2044        if self.hasContent_():2045            outfile.write('>\n')2046            self.exportChildren(outfile, level + 1, namespace_, name_)2047            outfile.write('</%s%s>\n' % (namespace_, name_))2048        else:2049            outfile.write('/>\n')2050    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='FloatValue'):2051        if self.value is not None and 'value' not in already_processed:2052            already_processed.append('value')2053            outfile.write(' value="%s"' % self.gds_format_float(self.value, input_name='value'))2054    def exportChildren(self, outfile, level, namespace_='mstns:', name_='FloatValue', fromsubclass_=False):2055        pass2056    def hasContent_(self):2057        if (2058            ):2059            return True2060        else:2061            return False2062    def exportLiteral(self, outfile, level, name_='FloatValue'):2063        level += 12064        self.exportLiteralAttributes(outfile, level, [], name_)2065        if self.hasContent_():2066            self.exportLiteralChildren(outfile, level, name_)2067    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2068        if self.value is not None and 'value' not in already_processed:2069            already_processed.append('value')2070            showIndent(outfile, level)2071            outfile.write('value = %f,\n' % (self.value,))2072    def exportLiteralChildren(self, outfile, level, name_):2073        pass2074    def build(self, node):2075        self.buildAttributes(node, node.attrib, [])2076        for child in node:2077            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2078            self.buildChildren(child, node, nodeName_)2079    def buildAttributes(self, node, attrs, already_processed):2080        value = find_attr_value_('value', node)2081        if value is not None and 'value' not in already_processed:2082            already_processed.append('value')2083            try:2084                self.value = float(value)2085            except ValueError, exp:2086                raise ValueError('Bad float/double attribute (value): %s' % exp)2087    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2088        pass2089# end class FloatValue2090class AdvancedOrderCategory(GeneratedsSuper):2091    subclass = None2092    superclass = None2093    def __init__(self, id=None, name=None, item=None):2094        self.id = _cast(None, id)2095        self.name = _cast(None, name)2096        if item is None:2097            self.item = []2098        else:2099            self.item = item2100    def factory(*args_, **kwargs_):2101        if AdvancedOrderCategory.subclass:2102            return AdvancedOrderCategory.subclass(*args_, **kwargs_)2103        else:2104            return AdvancedOrderCategory(*args_, **kwargs_)2105    factory = staticmethod(factory)2106    def get_item(self): return self.item2107    def set_item(self, item): self.item = item2108    def add_item(self, value): self.item.append(value)2109    def insert_item(self, index, value): self.item[index] = value2110    def get_id(self): return self.id2111    def set_id(self, id): self.id = id2112    def get_name(self): return self.name2113    def set_name(self, name): self.name = name2114    def export(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderCategory', namespacedef_=''):2115        showIndent(outfile, level)2116        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2117        already_processed = []2118        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AdvancedOrderCategory')2119        if self.hasContent_():2120            outfile.write('>\n')2121            self.exportChildren(outfile, level + 1, namespace_, name_)2122            showIndent(outfile, level)2123            outfile.write('</%s%s>\n' % (namespace_, name_))2124        else:2125            outfile.write('/>\n')2126    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='AdvancedOrderCategory'):2127        if self.id is not None and 'id' not in already_processed:2128            already_processed.append('id')2129            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'),))2130        if self.name is not None and 'name' not in already_processed:2131            already_processed.append('name')2132            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'),))2133    def exportChildren(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderCategory', fromsubclass_=False):2134        for item_ in self.item:2135            item_.export(outfile, level, namespace_, name_='item')2136    def hasContent_(self):2137        if (2138            self.item2139            ):2140            return True2141        else:2142            return False2143    def exportLiteral(self, outfile, level, name_='AdvancedOrderCategory'):2144        level += 12145        self.exportLiteralAttributes(outfile, level, [], name_)2146        if self.hasContent_():2147            self.exportLiteralChildren(outfile, level, name_)2148    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2149        if self.id is not None and 'id' not in already_processed:2150            already_processed.append('id')2151            showIndent(outfile, level)2152            outfile.write('id = "%s",\n' % (self.id,))2153        if self.name is not None and 'name' not in already_processed:2154            already_processed.append('name')2155            showIndent(outfile, level)2156            outfile.write('name = "%s",\n' % (self.name,))2157    def exportLiteralChildren(self, outfile, level, name_):2158        showIndent(outfile, level)2159        outfile.write('item=[\n')2160        level += 12161        for item_ in self.item:2162            showIndent(outfile, level)2163            outfile.write('model_.AdvancedOrderItem(\n')2164            item_.exportLiteral(outfile, level, name_='AdvancedOrderItem')2165            showIndent(outfile, level)2166            outfile.write('),\n')2167        level -= 12168        showIndent(outfile, level)2169        outfile.write('],\n')2170    def build(self, node):2171        self.buildAttributes(node, node.attrib, [])2172        for child in node:2173            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2174            self.buildChildren(child, node, nodeName_)2175    def buildAttributes(self, node, attrs, already_processed):2176        value = find_attr_value_('id', node)2177        if value is not None and 'id' not in already_processed:2178            already_processed.append('id')2179            self.id = value2180        value = find_attr_value_('name', node)2181        if value is not None and 'name' not in already_processed:2182            already_processed.append('name')2183            self.name = value2184    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2185        if nodeName_ == 'item':2186            obj_ = AdvancedOrderItem.factory()2187            obj_.build(child_)2188            self.item.append(obj_)2189# end class AdvancedOrderCategory2190class AdvancedOrderItem(GeneratedsSuper):2191    subclass = None2192    superclass = None2193    def __init__(self, stepUnit=None, description=None, stepUnitConversion=None, imageUrl=None, value=None, hasPrice=True, step=None, unitPrice=None, id=None, unit=None, name=None):2194        self.stepUnit = _cast(None, stepUnit)2195        self.description = _cast(None, description)2196        self.stepUnitConversion = _cast(int, stepUnitConversion)2197        self.imageUrl = _cast(None, imageUrl)2198        self.value = _cast(int, value)2199        self.hasPrice = _cast(bool, hasPrice)2200        self.step = _cast(int, step)2201        self.unitPrice = _cast(int, unitPrice)2202        self.id = _cast(None, id)2203        self.unit = _cast(None, unit)2204        self.name = _cast(None, name)2205        pass2206    def factory(*args_, **kwargs_):2207        if AdvancedOrderItem.subclass:2208            return AdvancedOrderItem.subclass(*args_, **kwargs_)2209        else:2210            return AdvancedOrderItem(*args_, **kwargs_)2211    factory = staticmethod(factory)2212    def get_stepUnit(self): return self.stepUnit2213    def set_stepUnit(self, stepUnit): self.stepUnit = stepUnit2214    def get_description(self): return self.description2215    def set_description(self, description): self.description = description2216    def get_stepUnitConversion(self): return self.stepUnitConversion2217    def set_stepUnitConversion(self, stepUnitConversion): self.stepUnitConversion = stepUnitConversion2218    def get_imageUrl(self): return self.imageUrl2219    def set_imageUrl(self, imageUrl): self.imageUrl = imageUrl2220    def get_value(self): return self.value2221    def set_value(self, value): self.value = value2222    def get_hasPrice(self): return self.hasPrice2223    def set_hasPrice(self, hasPrice): self.hasPrice = hasPrice2224    def get_step(self): return self.step2225    def set_step(self, step): self.step = step2226    def get_unitPrice(self): return self.unitPrice2227    def set_unitPrice(self, unitPrice): self.unitPrice = unitPrice2228    def get_id(self): return self.id2229    def set_id(self, id): self.id = id2230    def get_unit(self): return self.unit2231    def set_unit(self, unit): self.unit = unit2232    def get_name(self): return self.name2233    def set_name(self, name): self.name = name2234    def export(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderItem', namespacedef_=''):2235        showIndent(outfile, level)2236        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2237        already_processed = []2238        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AdvancedOrderItem')2239        if self.hasContent_():2240            outfile.write('>\n')2241            self.exportChildren(outfile, level + 1, namespace_, name_)2242            outfile.write('</%s%s>\n' % (namespace_, name_))2243        else:2244            outfile.write('/>\n')2245    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='AdvancedOrderItem'):2246        if self.stepUnit is not None and 'stepUnit' not in already_processed:2247            already_processed.append('stepUnit')2248            outfile.write(' stepUnit=%s' % (self.gds_format_string(quote_attrib(self.stepUnit).encode(ExternalEncoding), input_name='stepUnit'),))2249        if self.description is not None and 'description' not in already_processed:2250            already_processed.append('description')2251            outfile.write(' description=%s' % (self.gds_format_string(quote_attrib(self.description).encode(ExternalEncoding), input_name='description'),))2252        if self.stepUnitConversion is not None and 'stepUnitConversion' not in already_processed:2253            already_processed.append('stepUnitConversion')2254            outfile.write(' stepUnitConversion="%s"' % self.gds_format_integer(self.stepUnitConversion, input_name='stepUnitConversion'))2255        if self.imageUrl is not None and 'imageUrl' not in already_processed:2256            already_processed.append('imageUrl')2257            outfile.write(' imageUrl=%s' % (self.gds_format_string(quote_attrib(self.imageUrl).encode(ExternalEncoding), input_name='imageUrl'),))2258        if self.value is not None and 'value' not in already_processed:2259            already_processed.append('value')2260            outfile.write(' value="%s"' % self.gds_format_integer(self.value, input_name='value'))2261        if self.hasPrice is not None and 'hasPrice' not in already_processed:2262            already_processed.append('hasPrice')2263            outfile.write(' hasPrice="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.hasPrice)), input_name='hasPrice'))2264        if self.step is not None and 'step' not in already_processed:2265            already_processed.append('step')2266            outfile.write(' step="%s"' % self.gds_format_integer(self.step, input_name='step'))2267        if self.unitPrice is not None and 'unitPrice' not in already_processed:2268            already_processed.append('unitPrice')2269            outfile.write(' unitPrice="%s"' % self.gds_format_integer(self.unitPrice, input_name='unitPrice'))2270        if self.id is not None and 'id' not in already_processed:2271            already_processed.append('id')2272            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'),))2273        if self.unit is not None and 'unit' not in already_processed:2274            already_processed.append('unit')2275            outfile.write(' unit=%s' % (self.gds_format_string(quote_attrib(self.unit).encode(ExternalEncoding), input_name='unit'),))2276        if self.name is not None and 'name' not in already_processed:2277            already_processed.append('name')2278            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'),))2279    def exportChildren(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderItem', fromsubclass_=False):2280        pass2281    def hasContent_(self):2282        if (2283            ):2284            return True2285        else:2286            return False2287    def exportLiteral(self, outfile, level, name_='AdvancedOrderItem'):2288        level += 12289        self.exportLiteralAttributes(outfile, level, [], name_)2290        if self.hasContent_():2291            self.exportLiteralChildren(outfile, level, name_)2292    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2293        if self.stepUnit is not None and 'stepUnit' not in already_processed:2294            already_processed.append('stepUnit')2295            showIndent(outfile, level)2296            outfile.write('stepUnit = "%s",\n' % (self.stepUnit,))2297        if self.description is not None and 'description' not in already_processed:2298            already_processed.append('description')2299            showIndent(outfile, level)2300            outfile.write('description = "%s",\n' % (self.description,))2301        if self.stepUnitConversion is not None and 'stepUnitConversion' not in already_processed:2302            already_processed.append('stepUnitConversion')2303            showIndent(outfile, level)2304            outfile.write('stepUnitConversion = %d,\n' % (self.stepUnitConversion,))2305        if self.imageUrl is not None and 'imageUrl' not in already_processed:2306            already_processed.append('imageUrl')2307            showIndent(outfile, level)2308            outfile.write('imageUrl = "%s",\n' % (self.imageUrl,))2309        if self.value is not None and 'value' not in already_processed:2310            already_processed.append('value')2311            showIndent(outfile, level)2312            outfile.write('value = %d,\n' % (self.value,))2313        if self.hasPrice is not None and 'hasPrice' not in already_processed:2314            already_processed.append('hasPrice')2315            showIndent(outfile, level)2316            outfile.write('hasPrice = %s,\n' % (self.hasPrice,))2317        if self.step is not None and 'step' not in already_processed:2318            already_processed.append('step')2319            showIndent(outfile, level)2320            outfile.write('step = %d,\n' % (self.step,))2321        if self.unitPrice is not None and 'unitPrice' not in already_processed:2322            already_processed.append('unitPrice')2323            showIndent(outfile, level)2324            outfile.write('unitPrice = %d,\n' % (self.unitPrice,))2325        if self.id is not None and 'id' not in already_processed:2326            already_processed.append('id')2327            showIndent(outfile, level)2328            outfile.write('id = "%s",\n' % (self.id,))2329        if self.unit is not None and 'unit' not in already_processed:2330            already_processed.append('unit')2331            showIndent(outfile, level)2332            outfile.write('unit = "%s",\n' % (self.unit,))2333        if self.name is not None and 'name' not in already_processed:2334            already_processed.append('name')2335            showIndent(outfile, level)2336            outfile.write('name = "%s",\n' % (self.name,))2337    def exportLiteralChildren(self, outfile, level, name_):2338        pass2339    def build(self, node):2340        self.buildAttributes(node, node.attrib, [])2341        for child in node:2342            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2343            self.buildChildren(child, node, nodeName_)2344    def buildAttributes(self, node, attrs, already_processed):2345        value = find_attr_value_('stepUnit', node)2346        if value is not None and 'stepUnit' not in already_processed:2347            already_processed.append('stepUnit')2348            self.stepUnit = value2349        value = find_attr_value_('description', node)2350        if value is not None and 'description' not in already_processed:2351            already_processed.append('description')2352            self.description = value2353        value = find_attr_value_('stepUnitConversion', node)2354        if value is not None and 'stepUnitConversion' not in already_processed:2355            already_processed.append('stepUnitConversion')2356            try:2357                self.stepUnitConversion = int(value)2358            except ValueError, exp:2359                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2360        value = find_attr_value_('imageUrl', node)2361        if value is not None and 'imageUrl' not in already_processed:2362            already_processed.append('imageUrl')2363            self.imageUrl = value2364        value = find_attr_value_('value', node)2365        if value is not None and 'value' not in already_processed:2366            already_processed.append('value')2367            try:2368                self.value = int(value)2369            except ValueError, exp:2370                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2371        value = find_attr_value_('hasPrice', node)2372        if value is not None and 'hasPrice' not in already_processed:2373            already_processed.append('hasPrice')2374            if value in ('true', '1'):2375                self.hasPrice = True2376            elif value in ('false', '0'):2377                self.hasPrice = False2378            else:2379                raise_parse_error(node, 'Bad boolean attribute')2380        value = find_attr_value_('step', node)2381        if value is not None and 'step' not in already_processed:2382            already_processed.append('step')2383            try:2384                self.step = int(value)2385            except ValueError, exp:2386                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2387        value = find_attr_value_('unitPrice', node)2388        if value is not None and 'unitPrice' not in already_processed:2389            already_processed.append('unitPrice')2390            try:2391                self.unitPrice = int(value)2392            except ValueError, exp:2393                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2394        value = find_attr_value_('id', node)2395        if value is not None and 'id' not in already_processed:2396            already_processed.append('id')2397            self.id = value2398        value = find_attr_value_('unit', node)2399        if value is not None and 'unit' not in already_processed:2400            already_processed.append('unit')2401            self.unit = value2402        value = find_attr_value_('name', node)2403        if value is not None and 'name' not in already_processed:2404            already_processed.append('name')2405            self.name = value2406    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2407        pass2408# end class AdvancedOrderItem2409class TextAutocompleteWidget(TextWidget):2410    subclass = None2411    superclass = TextWidget2412    def __init__(self, maxChars=None, placeholder=None, value=None, suggestion=None):2413        super(TextAutocompleteWidget, self).__init__(maxChars, placeholder, value,)2414        if suggestion is None:2415            self.suggestion = []2416        else:2417            self.suggestion = suggestion2418    def factory(*args_, **kwargs_):2419        if TextAutocompleteWidget.subclass:2420            return TextAutocompleteWidget.subclass(*args_, **kwargs_)2421        else:2422            return TextAutocompleteWidget(*args_, **kwargs_)2423    factory = staticmethod(factory)2424    def get_suggestion(self): return self.suggestion2425    def set_suggestion(self, suggestion): self.suggestion = suggestion2426    def add_suggestion(self, value): self.suggestion.append(value)2427    def insert_suggestion(self, index, value): self.suggestion[index] = value2428    def export(self, outfile, level, namespace_='mstns:', name_='TextAutocompleteWidget', namespacedef_=''):2429        showIndent(outfile, level)2430        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2431        already_processed = []2432        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TextAutocompleteWidget')2433        if self.hasContent_():2434            outfile.write('>\n')2435            self.exportChildren(outfile, level + 1, namespace_, name_)2436            showIndent(outfile, level)2437            outfile.write('</%s%s>\n' % (namespace_, name_))2438        else:2439            outfile.write('/>\n')2440    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='TextAutocompleteWidget'):2441        super(TextAutocompleteWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TextAutocompleteWidget')2442    def exportChildren(self, outfile, level, namespace_='mstns:', name_='TextAutocompleteWidget', fromsubclass_=False):2443        super(TextAutocompleteWidget, self).exportChildren(outfile, level, namespace_, name_, True)2444        for suggestion_ in self.suggestion:2445            suggestion_.export(outfile, level, namespace_, name_='suggestion')2446    def hasContent_(self):2447        if (2448            self.suggestion or2449            super(TextAutocompleteWidget, self).hasContent_()2450            ):2451            return True2452        else:2453            return False2454    def exportLiteral(self, outfile, level, name_='TextAutocompleteWidget'):2455        level += 12456        self.exportLiteralAttributes(outfile, level, [], name_)2457        if self.hasContent_():2458            self.exportLiteralChildren(outfile, level, name_)2459    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2460        super(TextAutocompleteWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)2461    def exportLiteralChildren(self, outfile, level, name_):2462        super(TextAutocompleteWidget, self).exportLiteralChildren(outfile, level, name_)2463        showIndent(outfile, level)2464        outfile.write('suggestion=[\n')2465        level += 12466        for suggestion_ in self.suggestion:2467            showIndent(outfile, level)2468            outfile.write('model_.Value(\n')2469            suggestion_.exportLiteral(outfile, level, name_='Value')2470            showIndent(outfile, level)2471            outfile.write('),\n')2472        level -= 12473        showIndent(outfile, level)2474        outfile.write('],\n')2475    def build(self, node):2476        self.buildAttributes(node, node.attrib, [])2477        for child in node:2478            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2479            self.buildChildren(child, node, nodeName_)2480    def buildAttributes(self, node, attrs, already_processed):2481        super(TextAutocompleteWidget, self).buildAttributes(node, attrs, already_processed)2482    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2483        if nodeName_ == 'suggestion':2484            class_obj_ = self.get_class_obj_(child_, Value)2485            obj_ = class_obj_.factory()2486            obj_.build(child_)2487            self.suggestion.append(obj_)2488        super(TextAutocompleteWidget, self).buildChildren(child_, node, nodeName_, True)2489# end class TextAutocompleteWidget2490class Choice(Value):2491    subclass = None2492    superclass = Value2493    def __init__(self, value=None, label=None):2494        super(Choice, self).__init__(value,)2495        self.label = _cast(None, label)2496        pass2497    def factory(*args_, **kwargs_):2498        if Choice.subclass:2499            return Choice.subclass(*args_, **kwargs_)2500        else:2501            return Choice(*args_, **kwargs_)2502    factory = staticmethod(factory)2503    def get_label(self): return self.label2504    def set_label(self, label): self.label = label2505    def export(self, outfile, level, namespace_='mstns:', name_='Choice', namespacedef_=''):2506        showIndent(outfile, level)2507        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2508        already_processed = []2509        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Choice')2510        if self.hasContent_():2511            outfile.write('>\n')2512            self.exportChildren(outfile, level + 1, namespace_, name_)2513            outfile.write('</%s%s>\n' % (namespace_, name_))2514        else:2515            outfile.write('/>\n')2516    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Choice'):2517        super(Choice, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Choice')2518        if self.label is not None and 'label' not in already_processed:2519            already_processed.append('label')2520            outfile.write(' label=%s' % (self.gds_format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'),))2521    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Choice', fromsubclass_=False):2522        super(Choice, self).exportChildren(outfile, level, namespace_, name_, True)2523        pass2524    def hasContent_(self):2525        if (2526            super(Choice, self).hasContent_()2527            ):2528            return True2529        else:2530            return False2531    def exportLiteral(self, outfile, level, name_='Choice'):2532        level += 12533        self.exportLiteralAttributes(outfile, level, [], name_)2534        if self.hasContent_():2535            self.exportLiteralChildren(outfile, level, name_)2536    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2537        if self.label is not None and 'label' not in already_processed:2538            already_processed.append('label')2539            showIndent(outfile, level)2540            outfile.write('label = "%s",\n' % (self.label,))2541        super(Choice, self).exportLiteralAttributes(outfile, level, already_processed, name_)2542    def exportLiteralChildren(self, outfile, level, name_):2543        super(Choice, self).exportLiteralChildren(outfile, level, name_)2544        pass2545    def build(self, node):2546        self.buildAttributes(node, node.attrib, [])2547        for child in node:2548            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2549            self.buildChildren(child, node, nodeName_)2550    def buildAttributes(self, node, attrs, already_processed):2551        value = find_attr_value_('label', node)2552        if value is not None and 'label' not in already_processed:2553            already_processed.append('label')2554            self.label = value2555        super(Choice, self).buildAttributes(node, attrs, already_processed)2556    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2557        super(Choice, self).buildChildren(child_, node, nodeName_, True)2558        pass2559# end class Choice2560class SelectWidget(Widget):2561    subclass = None2562    superclass = Widget2563    def __init__(self, choice=None, extensiontype_=None):2564        super(SelectWidget, self).__init__(extensiontype_,)2565        if choice is None:2566            self.choice = []2567        else:2568            self.choice = choice2569        self.extensiontype_ = extensiontype_2570    def factory(*args_, **kwargs_):2571        if SelectWidget.subclass:2572            return SelectWidget.subclass(*args_, **kwargs_)2573        else:2574            return SelectWidget(*args_, **kwargs_)2575    factory = staticmethod(factory)2576    def get_choice(self): return self.choice2577    def set_choice(self, choice): self.choice = choice2578    def add_choice(self, value): self.choice.append(value)2579    def insert_choice(self, index, value): self.choice[index] = value2580    def get_extensiontype_(self): return self.extensiontype_2581    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_2582    def export(self, outfile, level, namespace_='mstns:', name_='SelectWidget', namespacedef_=''):2583        showIndent(outfile, level)2584        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2585        already_processed = []2586        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectWidget')2587        if self.hasContent_():2588            outfile.write('>\n')2589            self.exportChildren(outfile, level + 1, namespace_, name_)2590            showIndent(outfile, level)2591            outfile.write('</%s%s>\n' % (namespace_, name_))2592        else:2593            outfile.write('/>\n')2594    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectWidget'):2595        super(SelectWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectWidget')2596        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:2597            already_processed.append('xsi:type')2598            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')2599            outfile.write(' xsi:type="%s"' % self.extensiontype_)2600    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectWidget', fromsubclass_=False):2601        super(SelectWidget, self).exportChildren(outfile, level, namespace_, name_, True)2602        for choice_ in self.choice:2603            choice_.export(outfile, level, namespace_, name_='choice')2604    def hasContent_(self):2605        if (2606            self.choice or2607            super(SelectWidget, self).hasContent_()2608            ):2609            return True2610        else:2611            return False2612    def exportLiteral(self, outfile, level, name_='SelectWidget'):2613        level += 12614        self.exportLiteralAttributes(outfile, level, [], name_)2615        if self.hasContent_():2616            self.exportLiteralChildren(outfile, level, name_)2617    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2618        super(SelectWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)2619    def exportLiteralChildren(self, outfile, level, name_):2620        super(SelectWidget, self).exportLiteralChildren(outfile, level, name_)2621        showIndent(outfile, level)2622        outfile.write('choice=[\n')2623        level += 12624        for choice_ in self.choice:2625            showIndent(outfile, level)2626            outfile.write('model_.Choice(\n')2627            choice_.exportLiteral(outfile, level, name_='Choice')2628            showIndent(outfile, level)2629            outfile.write('),\n')2630        level -= 12631        showIndent(outfile, level)2632        outfile.write('],\n')2633    def build(self, node):2634        self.buildAttributes(node, node.attrib, [])2635        for child in node:2636            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2637            self.buildChildren(child, node, nodeName_)2638    def buildAttributes(self, node, attrs, already_processed):2639        value = find_attr_value_('xsi:type', node)2640        if value is not None and 'xsi:type' not in already_processed:2641            already_processed.append('xsi:type')2642            self.extensiontype_ = value2643        super(SelectWidget, self).buildAttributes(node, attrs, already_processed)2644    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2645        if nodeName_ == 'choice':2646            obj_ = Choice.factory()2647            obj_.build(child_)2648            self.choice.append(obj_)2649        super(SelectWidget, self).buildChildren(child_, node, nodeName_, True)2650# end class SelectWidget2651class SelectSingleWidget(SelectWidget):2652    subclass = None2653    superclass = SelectWidget2654    def __init__(self, choice=None, value=None):2655        super(SelectSingleWidget, self).__init__(choice,)2656        self.value = _cast(None, value)2657        pass2658    def factory(*args_, **kwargs_):2659        if SelectSingleWidget.subclass:2660            return SelectSingleWidget.subclass(*args_, **kwargs_)2661        else:2662            return SelectSingleWidget(*args_, **kwargs_)2663    factory = staticmethod(factory)2664    def get_value(self): return self.value2665    def set_value(self, value): self.value = value2666    def export(self, outfile, level, namespace_='mstns:', name_='SelectSingleWidget', namespacedef_=''):2667        showIndent(outfile, level)2668        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2669        already_processed = []2670        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectSingleWidget')2671        if self.hasContent_():2672            outfile.write('>\n')2673            self.exportChildren(outfile, level + 1, namespace_, name_)2674            showIndent(outfile, level)2675            outfile.write('</%s%s>\n' % (namespace_, name_))2676        else:2677            outfile.write('/>\n')2678    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectSingleWidget'):2679        super(SelectSingleWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectSingleWidget')2680        if self.value is not None and 'value' not in already_processed:2681            already_processed.append('value')2682            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))2683    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectSingleWidget', fromsubclass_=False):2684        super(SelectSingleWidget, self).exportChildren(outfile, level, namespace_, name_, True)2685    def hasContent_(self):2686        if (2687            super(SelectSingleWidget, self).hasContent_()2688            ):2689            return True2690        else:2691            return False2692    def exportLiteral(self, outfile, level, name_='SelectSingleWidget'):2693        level += 12694        self.exportLiteralAttributes(outfile, level, [], name_)2695        if self.hasContent_():2696            self.exportLiteralChildren(outfile, level, name_)2697    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2698        if self.value is not None and 'value' not in already_processed:2699            already_processed.append('value')2700            showIndent(outfile, level)2701            outfile.write('value = "%s",\n' % (self.value,))2702        super(SelectSingleWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)2703    def exportLiteralChildren(self, outfile, level, name_):2704        super(SelectSingleWidget, self).exportLiteralChildren(outfile, level, name_)2705    def build(self, node):2706        self.buildAttributes(node, node.attrib, [])2707        for child in node:2708            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2709            self.buildChildren(child, node, nodeName_)2710    def buildAttributes(self, node, attrs, already_processed):2711        value = find_attr_value_('value', node)2712        if value is not None and 'value' not in already_processed:2713            already_processed.append('value')2714            self.value = value2715        super(SelectSingleWidget, self).buildAttributes(node, attrs, already_processed)2716    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2717        super(SelectSingleWidget, self).buildChildren(child_, node, nodeName_, True)2718        pass2719# end class SelectSingleWidget2720class SelectMultiWidget(SelectWidget):2721    subclass = None2722    superclass = SelectWidget2723    def __init__(self, choice=None, value=None):2724        super(SelectMultiWidget, self).__init__(choice,)2725        if value is None:2726            self.value = []2727        else:2728            self.value = value2729    def factory(*args_, **kwargs_):2730        if SelectMultiWidget.subclass:2731            return SelectMultiWidget.subclass(*args_, **kwargs_)2732        else:2733            return SelectMultiWidget(*args_, **kwargs_)2734    factory = staticmethod(factory)2735    def get_value(self): return self.value2736    def set_value(self, value): self.value = value2737    def add_value(self, value): self.value.append(value)2738    def insert_value(self, index, value): self.value[index] = value2739    def export(self, outfile, level, namespace_='mstns:', name_='SelectMultiWidget', namespacedef_=''):2740        showIndent(outfile, level)2741        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2742        already_processed = []2743        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectMultiWidget')2744        if self.hasContent_():2745            outfile.write('>\n')2746            self.exportChildren(outfile, level + 1, namespace_, name_)2747            showIndent(outfile, level)2748            outfile.write('</%s%s>\n' % (namespace_, name_))2749        else:2750            outfile.write('/>\n')2751    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectMultiWidget'):2752        super(SelectMultiWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectMultiWidget')2753    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectMultiWidget', fromsubclass_=False):2754        super(SelectMultiWidget, self).exportChildren(outfile, level, namespace_, name_, True)2755        for value_ in self.value:2756            value_.export(outfile, level, namespace_, name_='value')2757    def hasContent_(self):2758        if (2759            self.value or2760            super(SelectMultiWidget, self).hasContent_()2761            ):2762            return True2763        else:2764            return False2765    def exportLiteral(self, outfile, level, name_='SelectMultiWidget'):2766        level += 12767        self.exportLiteralAttributes(outfile, level, [], name_)2768        if self.hasContent_():2769            self.exportLiteralChildren(outfile, level, name_)2770    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2771        super(SelectMultiWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)2772    def exportLiteralChildren(self, outfile, level, name_):2773        super(SelectMultiWidget, self).exportLiteralChildren(outfile, level, name_)2774        showIndent(outfile, level)2775        outfile.write('value=[\n')2776        level += 12777        for value_ in self.value:2778            showIndent(outfile, level)2779            outfile.write('model_.Value(\n')2780            value_.exportLiteral(outfile, level, name_='Value')2781            showIndent(outfile, level)2782            outfile.write('),\n')2783        level -= 12784        showIndent(outfile, level)2785        outfile.write('],\n')2786    def build(self, node):2787        self.buildAttributes(node, node.attrib, [])2788        for child in node:2789            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2790            self.buildChildren(child, node, nodeName_)2791    def buildAttributes(self, node, attrs, already_processed):2792        super(SelectMultiWidget, self).buildAttributes(node, attrs, already_processed)2793    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2794        if nodeName_ == 'value':2795            class_obj_ = self.get_class_obj_(child_, Value)2796            obj_ = class_obj_.factory()2797            obj_.build(child_)2798            self.value.append(obj_)2799        super(SelectMultiWidget, self).buildChildren(child_, node, nodeName_, True)2800# end class SelectMultiWidget2801class SelectDateWidget(Widget):2802    subclass = None2803    superclass = Widget2804    def __init__(self, minuteInterval=None, maxDate=None, mode=None, date=None, unit=None, minDate=None):2805        super(SelectDateWidget, self).__init__()2806        self.minuteInterval = _cast(int, minuteInterval)2807        self.maxDate = _cast(int, maxDate)2808        self.mode = _cast(None, mode)2809        self.date = _cast(int, date)2810        self.unit = _cast(None, unit)2811        self.minDate = _cast(int, minDate)2812        pass2813    def factory(*args_, **kwargs_):2814        if SelectDateWidget.subclass:2815            return SelectDateWidget.subclass(*args_, **kwargs_)2816        else:2817            return SelectDateWidget(*args_, **kwargs_)2818    factory = staticmethod(factory)2819    def get_minuteInterval(self): return self.minuteInterval2820    def set_minuteInterval(self, minuteInterval): self.minuteInterval = minuteInterval2821    def get_maxDate(self): return self.maxDate2822    def set_maxDate(self, maxDate): self.maxDate = maxDate2823    def get_mode(self): return self.mode2824    def set_mode(self, mode): self.mode = mode2825    def get_date(self): return self.date2826    def set_date(self, date): self.date = date2827    def get_unit(self): return self.unit2828    def set_unit(self, unit): self.unit = unit2829    def get_minDate(self): return self.minDate2830    def set_minDate(self, minDate): self.minDate = minDate2831    def export(self, outfile, level, namespace_='mstns:', name_='SelectDateWidget', namespacedef_=''):2832        showIndent(outfile, level)2833        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2834        already_processed = []2835        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectDateWidget')2836        if self.hasContent_():2837            outfile.write('>\n')2838            self.exportChildren(outfile, level + 1, namespace_, name_)2839            outfile.write('</%s%s>\n' % (namespace_, name_))2840        else:2841            outfile.write('/>\n')2842    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectDateWidget'):2843        super(SelectDateWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectDateWidget')2844        if self.minuteInterval is not None and 'minuteInterval' not in already_processed:2845            already_processed.append('minuteInterval')2846            outfile.write(' minuteInterval="%s"' % self.gds_format_integer(self.minuteInterval, input_name='minuteInterval'))2847        if self.maxDate is not None and 'maxDate' not in already_processed:2848            already_processed.append('maxDate')2849            outfile.write(' maxDate="%s"' % self.gds_format_integer(self.maxDate, input_name='maxDate'))2850        if self.mode is not None and 'mode' not in already_processed:2851            already_processed.append('mode')2852            outfile.write(' mode=%s' % (self.gds_format_string(quote_attrib(self.mode).encode(ExternalEncoding), input_name='mode'),))2853        if self.date is not None and 'date' not in already_processed:2854            already_processed.append('date')2855            outfile.write(' date="%s"' % self.gds_format_integer(self.date, input_name='date'))2856        if self.unit is not None and 'unit' not in already_processed:2857            already_processed.append('unit')2858            outfile.write(' unit=%s' % (self.gds_format_string(quote_attrib(self.unit).encode(ExternalEncoding), input_name='unit'),))2859        if self.minDate is not None and 'minDate' not in already_processed:2860            already_processed.append('minDate')2861            outfile.write(' minDate="%s"' % self.gds_format_integer(self.minDate, input_name='minDate'))2862    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectDateWidget', fromsubclass_=False):2863        super(SelectDateWidget, self).exportChildren(outfile, level, namespace_, name_, True)2864        pass2865    def hasContent_(self):2866        if (2867            super(SelectDateWidget, self).hasContent_()2868            ):2869            return True2870        else:2871            return False2872    def exportLiteral(self, outfile, level, name_='SelectDateWidget'):2873        level += 12874        self.exportLiteralAttributes(outfile, level, [], name_)2875        if self.hasContent_():2876            self.exportLiteralChildren(outfile, level, name_)2877    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2878        if self.minuteInterval is not None and 'minuteInterval' not in already_processed:2879            already_processed.append('minuteInterval')2880            showIndent(outfile, level)2881            outfile.write('minuteInterval = %d,\n' % (self.minuteInterval,))2882        if self.maxDate is not None and 'maxDate' not in already_processed:2883            already_processed.append('maxDate')2884            showIndent(outfile, level)2885            outfile.write('maxDate = %d,\n' % (self.maxDate,))2886        if self.mode is not None and 'mode' not in already_processed:2887            already_processed.append('mode')2888            showIndent(outfile, level)2889            outfile.write('mode = "%s",\n' % (self.mode,))2890        if self.date is not None and 'date' not in already_processed:2891            already_processed.append('date')2892            showIndent(outfile, level)2893            outfile.write('date = %d,\n' % (self.date,))2894        if self.unit is not None and 'unit' not in already_processed:2895            already_processed.append('unit')2896            showIndent(outfile, level)2897            outfile.write('unit = "%s",\n' % (self.unit,))2898        if self.minDate is not None and 'minDate' not in already_processed:2899            already_processed.append('minDate')2900            showIndent(outfile, level)2901            outfile.write('minDate = %d,\n' % (self.minDate,))2902        super(SelectDateWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)2903    def exportLiteralChildren(self, outfile, level, name_):2904        super(SelectDateWidget, self).exportLiteralChildren(outfile, level, name_)2905        pass2906    def build(self, node):2907        self.buildAttributes(node, node.attrib, [])2908        for child in node:2909            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2910            self.buildChildren(child, node, nodeName_)2911    def buildAttributes(self, node, attrs, already_processed):2912        value = find_attr_value_('minuteInterval', node)2913        if value is not None and 'minuteInterval' not in already_processed:2914            already_processed.append('minuteInterval')2915            try:2916                self.minuteInterval = int(value)2917            except ValueError, exp:2918                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2919        value = find_attr_value_('maxDate', node)2920        if value is not None and 'maxDate' not in already_processed:2921            already_processed.append('maxDate')2922            try:2923                self.maxDate = int(value)2924            except ValueError, exp:2925                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2926        value = find_attr_value_('mode', node)2927        if value is not None and 'mode' not in already_processed:2928            already_processed.append('mode')2929            self.mode = value2930        value = find_attr_value_('date', node)2931        if value is not None and 'date' not in already_processed:2932            already_processed.append('date')2933            try:2934                self.date = int(value)2935            except ValueError, exp:2936                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2937        value = find_attr_value_('unit', node)2938        if value is not None and 'unit' not in already_processed:2939            already_processed.append('unit')2940            self.unit = value2941        value = find_attr_value_('minDate', node)2942        if value is not None and 'minDate' not in already_processed:2943            already_processed.append('minDate')2944            try:2945                self.minDate = int(value)2946            except ValueError, exp:2947                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2948        super(SelectDateWidget, self).buildAttributes(node, attrs, already_processed)2949    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2950        super(SelectDateWidget, self).buildChildren(child_, node, nodeName_, True)2951        pass2952# end class SelectDateWidget2953class MyDigiPassWidget(Widget):2954    subclass = None2955    superclass = Widget2956    def __init__(self, scope=None):2957        super(MyDigiPassWidget, self).__init__()2958        self.scope = _cast(None, scope)2959        pass2960    def factory(*args_, **kwargs_):2961        if MyDigiPassWidget.subclass:2962            return MyDigiPassWidget.subclass(*args_, **kwargs_)2963        else:2964            return MyDigiPassWidget(*args_, **kwargs_)2965    factory = staticmethod(factory)2966    def get_scope(self): return self.scope2967    def set_scope(self, scope): self.scope = scope2968    def export(self, outfile, level, namespace_='mstns:', name_='MyDigiPassWidget', namespacedef_=''):2969        showIndent(outfile, level)2970        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))2971        already_processed = []2972        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassWidget')2973        if self.hasContent_():2974            outfile.write('>\n')2975            self.exportChildren(outfile, level + 1, namespace_, name_)2976            outfile.write('</%s%s>\n' % (namespace_, name_))2977        else:2978            outfile.write('/>\n')2979    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MyDigiPassWidget'):2980        super(MyDigiPassWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassWidget')2981        if self.scope is not None and 'scope' not in already_processed:2982            already_processed.append('scope')2983            outfile.write(' scope=%s' % (self.gds_format_string(quote_attrib(self.scope).encode(ExternalEncoding), input_name='scope'),))2984    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MyDigiPassWidget', fromsubclass_=False):2985        super(MyDigiPassWidget, self).exportChildren(outfile, level, namespace_, name_, True)2986        pass2987    def hasContent_(self):2988        if (2989            super(MyDigiPassWidget, self).hasContent_()2990            ):2991            return True2992        else:2993            return False2994    def exportLiteral(self, outfile, level, name_='MyDigiPassWidget'):2995        level += 12996        self.exportLiteralAttributes(outfile, level, [], name_)2997        if self.hasContent_():2998            self.exportLiteralChildren(outfile, level, name_)2999    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3000        if self.scope is not None and 'scope' not in already_processed:3001            already_processed.append('scope')3002            showIndent(outfile, level)3003            outfile.write('scope = "%s",\n' % (self.scope,))3004        super(MyDigiPassWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)3005    def exportLiteralChildren(self, outfile, level, name_):3006        super(MyDigiPassWidget, self).exportLiteralChildren(outfile, level, name_)3007        pass3008    def build(self, node):3009        self.buildAttributes(node, node.attrib, [])3010        for child in node:3011            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3012            self.buildChildren(child, node, nodeName_)3013    def buildAttributes(self, node, attrs, already_processed):3014        value = find_attr_value_('scope', node)3015        if value is not None and 'scope' not in already_processed:3016            already_processed.append('scope')3017            self.scope = value3018        super(MyDigiPassWidget, self).buildAttributes(node, attrs, already_processed)3019    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3020        super(MyDigiPassWidget, self).buildChildren(child_, node, nodeName_, True)3021        pass3022# end class MyDigiPassWidget3023class AdvancedOrderWidget(Widget):3024    subclass = None3025    superclass = Widget3026    def __init__(self, currency=None, leapTime=None, category=None):3027        super(AdvancedOrderWidget, self).__init__()3028        self.currency = _cast(None, currency)3029        self.leapTime = _cast(int, leapTime)3030        if category is None:3031            self.category = []3032        else:3033            self.category = category3034    def factory(*args_, **kwargs_):3035        if AdvancedOrderWidget.subclass:3036            return AdvancedOrderWidget.subclass(*args_, **kwargs_)3037        else:3038            return AdvancedOrderWidget(*args_, **kwargs_)3039    factory = staticmethod(factory)3040    def get_category(self): return self.category3041    def set_category(self, category): self.category = category3042    def add_category(self, value): self.category.append(value)3043    def insert_category(self, index, value): self.category[index] = value3044    def get_currency(self): return self.currency3045    def set_currency(self, currency): self.currency = currency3046    def get_leapTime(self): return self.leapTime3047    def set_leapTime(self, leapTime): self.leapTime = leapTime3048    def export(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderWidget', namespacedef_=''):3049        showIndent(outfile, level)3050        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3051        already_processed = []3052        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AdvancedOrderWidget')3053        if self.hasContent_():3054            outfile.write('>\n')3055            self.exportChildren(outfile, level + 1, namespace_, name_)3056            showIndent(outfile, level)3057            outfile.write('</%s%s>\n' % (namespace_, name_))3058        else:3059            outfile.write('/>\n')3060    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='AdvancedOrderWidget'):3061        super(AdvancedOrderWidget, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AdvancedOrderWidget')3062        if self.currency is not None and 'currency' not in already_processed:3063            already_processed.append('currency')3064            outfile.write(' currency=%s' % (self.gds_format_string(quote_attrib(self.currency).encode(ExternalEncoding), input_name='currency'),))3065        if self.leapTime is not None and 'leapTime' not in already_processed:3066            already_processed.append('leapTime')3067            outfile.write(' leapTime="%s"' % self.gds_format_integer(self.leapTime, input_name='leapTime'))3068    def exportChildren(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderWidget', fromsubclass_=False):3069        super(AdvancedOrderWidget, self).exportChildren(outfile, level, namespace_, name_, True)3070        for category_ in self.category:3071            category_.export(outfile, level, namespace_, name_='category')3072    def hasContent_(self):3073        if (3074            self.category or3075            super(AdvancedOrderWidget, self).hasContent_()3076            ):3077            return True3078        else:3079            return False3080    def exportLiteral(self, outfile, level, name_='AdvancedOrderWidget'):3081        level += 13082        self.exportLiteralAttributes(outfile, level, [], name_)3083        if self.hasContent_():3084            self.exportLiteralChildren(outfile, level, name_)3085    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3086        if self.currency is not None and 'currency' not in already_processed:3087            already_processed.append('currency')3088            showIndent(outfile, level)3089            outfile.write('currency = "%s",\n' % (self.currency,))3090        if self.leapTime is not None and 'leapTime' not in already_processed:3091            already_processed.append('leapTime')3092            showIndent(outfile, level)3093            outfile.write('leapTime = %d,\n' % (self.leapTime,))3094        super(AdvancedOrderWidget, self).exportLiteralAttributes(outfile, level, already_processed, name_)3095    def exportLiteralChildren(self, outfile, level, name_):3096        super(AdvancedOrderWidget, self).exportLiteralChildren(outfile, level, name_)3097        showIndent(outfile, level)3098        outfile.write('category=[\n')3099        level += 13100        for category_ in self.category:3101            showIndent(outfile, level)3102            outfile.write('model_.AdvancedOrderCategory(\n')3103            category_.exportLiteral(outfile, level, name_='AdvancedOrderCategory')3104            showIndent(outfile, level)3105            outfile.write('),\n')3106        level -= 13107        showIndent(outfile, level)3108        outfile.write('],\n')3109    def build(self, node):3110        self.buildAttributes(node, node.attrib, [])3111        for child in node:3112            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3113            self.buildChildren(child, node, nodeName_)3114    def buildAttributes(self, node, attrs, already_processed):3115        value = find_attr_value_('currency', node)3116        if value is not None and 'currency' not in already_processed:3117            already_processed.append('currency')3118            self.currency = value3119        value = find_attr_value_('leapTime', node)3120        if value is not None and 'leapTime' not in already_processed:3121            already_processed.append('leapTime')3122            try:3123                self.leapTime = int(value)3124            except ValueError, exp:3125                raise_parse_error(node, 'Bad integer attribute: %s' % exp)3126        super(AdvancedOrderWidget, self).buildAttributes(node, attrs, already_processed)3127    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3128        if nodeName_ == 'category':3129            obj_ = AdvancedOrderCategory.factory()3130            obj_.build(child_)3131            self.category.append(obj_)3132        super(AdvancedOrderWidget, self).buildChildren(child_, node, nodeName_, True)3133# end class AdvancedOrderWidget3134class Form(GeneratedsSuper):3135    subclass = None3136    superclass = None3137    def __init__(self, positiveButtonConfirmation=None, negativeButtonCaption=None, positiveButtonCaption=None, negativeButtonConfirmation=None, widget=None, javascriptValidation=None):3138        self.positiveButtonConfirmation = _cast(None, positiveButtonConfirmation)3139        self.negativeButtonCaption = _cast(None, negativeButtonCaption)3140        self.positiveButtonCaption = _cast(None, positiveButtonCaption)3141        self.negativeButtonConfirmation = _cast(None, negativeButtonConfirmation)3142        self.widget = widget3143        self.javascriptValidation = javascriptValidation3144    def factory(*args_, **kwargs_):3145        if Form.subclass:3146            return Form.subclass(*args_, **kwargs_)3147        else:3148            return Form(*args_, **kwargs_)3149    factory = staticmethod(factory)3150    def get_widget(self): return self.widget3151    def set_widget(self, widget): self.widget = widget3152    def get_javascriptValidation(self): return self.javascriptValidation3153    def set_javascriptValidation(self, javascriptValidation): self.javascriptValidation = javascriptValidation3154    def get_positiveButtonConfirmation(self): return self.positiveButtonConfirmation3155    def set_positiveButtonConfirmation(self, positiveButtonConfirmation): self.positiveButtonConfirmation = positiveButtonConfirmation3156    def get_negativeButtonCaption(self): return self.negativeButtonCaption3157    def set_negativeButtonCaption(self, negativeButtonCaption): self.negativeButtonCaption = negativeButtonCaption3158    def get_positiveButtonCaption(self): return self.positiveButtonCaption3159    def set_positiveButtonCaption(self, positiveButtonCaption): self.positiveButtonCaption = positiveButtonCaption3160    def get_negativeButtonConfirmation(self): return self.negativeButtonConfirmation3161    def set_negativeButtonConfirmation(self, negativeButtonConfirmation): self.negativeButtonConfirmation = negativeButtonConfirmation3162    def export(self, outfile, level, namespace_='mstns:', name_='Form', namespacedef_=''):3163        showIndent(outfile, level)3164        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3165        already_processed = []3166        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Form')3167        if self.hasContent_():3168            outfile.write('>\n')3169            self.exportChildren(outfile, level + 1, namespace_, name_)3170            showIndent(outfile, level)3171            outfile.write('</%s%s>\n' % (namespace_, name_))3172        else:3173            outfile.write('/>\n')3174    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Form'):3175        if self.positiveButtonConfirmation is not None and 'positiveButtonConfirmation' not in already_processed:3176            already_processed.append('positiveButtonConfirmation')3177            outfile.write(' positiveButtonConfirmation=%s' % (self.gds_format_string(quote_attrib(self.positiveButtonConfirmation).encode(ExternalEncoding), input_name='positiveButtonConfirmation'),))3178        if self.negativeButtonCaption is not None and 'negativeButtonCaption' not in already_processed:3179            already_processed.append('negativeButtonCaption')3180            outfile.write(' negativeButtonCaption=%s' % (self.gds_format_string(quote_attrib(self.negativeButtonCaption).encode(ExternalEncoding), input_name='negativeButtonCaption'),))3181        if self.positiveButtonCaption is not None and 'positiveButtonCaption' not in already_processed:3182            already_processed.append('positiveButtonCaption')3183            outfile.write(' positiveButtonCaption=%s' % (self.gds_format_string(quote_attrib(self.positiveButtonCaption).encode(ExternalEncoding), input_name='positiveButtonCaption'),))3184        if self.negativeButtonConfirmation is not None and 'negativeButtonConfirmation' not in already_processed:3185            already_processed.append('negativeButtonConfirmation')3186            outfile.write(' negativeButtonConfirmation=%s' % (self.gds_format_string(quote_attrib(self.negativeButtonConfirmation).encode(ExternalEncoding), input_name='negativeButtonConfirmation'),))3187    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Form', fromsubclass_=False):3188        if self.widget is not None:3189            self.widget.export(outfile, level, namespace_, name_='widget',)3190        if self.javascriptValidation is not None:3191            showIndent(outfile, level)3192            outfile.write('<%sjavascriptValidation>%s</%sjavascriptValidation>\n' % (namespace_, self.gds_format_string(quote_xml(self.javascriptValidation).encode(ExternalEncoding), input_name='javascriptValidation'), namespace_))3193    def hasContent_(self):3194        if (3195            self.widget is not None or3196            self.javascriptValidation is not None3197            ):3198            return True3199        else:3200            return False3201    def exportLiteral(self, outfile, level, name_='Form'):3202        level += 13203        self.exportLiteralAttributes(outfile, level, [], name_)3204        if self.hasContent_():3205            self.exportLiteralChildren(outfile, level, name_)3206    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3207        if self.positiveButtonConfirmation is not None and 'positiveButtonConfirmation' not in already_processed:3208            already_processed.append('positiveButtonConfirmation')3209            showIndent(outfile, level)3210            outfile.write('positiveButtonConfirmation = "%s",\n' % (self.positiveButtonConfirmation,))3211        if self.negativeButtonCaption is not None and 'negativeButtonCaption' not in already_processed:3212            already_processed.append('negativeButtonCaption')3213            showIndent(outfile, level)3214            outfile.write('negativeButtonCaption = "%s",\n' % (self.negativeButtonCaption,))3215        if self.positiveButtonCaption is not None and 'positiveButtonCaption' not in already_processed:3216            already_processed.append('positiveButtonCaption')3217            showIndent(outfile, level)3218            outfile.write('positiveButtonCaption = "%s",\n' % (self.positiveButtonCaption,))3219        if self.negativeButtonConfirmation is not None and 'negativeButtonConfirmation' not in already_processed:3220            already_processed.append('negativeButtonConfirmation')3221            showIndent(outfile, level)3222            outfile.write('negativeButtonConfirmation = "%s",\n' % (self.negativeButtonConfirmation,))3223    def exportLiteralChildren(self, outfile, level, name_):3224        if self.widget is not None:3225            showIndent(outfile, level)3226            outfile.write('widget=model_.Widget(\n')3227            self.widget.exportLiteral(outfile, level, name_='widget')3228            showIndent(outfile, level)3229            outfile.write('),\n')3230        if self.javascriptValidation is not None:3231            showIndent(outfile, level)3232            outfile.write('javascriptValidation=%s,\n' % quote_python(self.javascriptValidation).encode(ExternalEncoding))3233    def build(self, node):3234        self.buildAttributes(node, node.attrib, [])3235        for child in node:3236            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3237            self.buildChildren(child, node, nodeName_)3238    def buildAttributes(self, node, attrs, already_processed):3239        value = find_attr_value_('positiveButtonConfirmation', node)3240        if value is not None and 'positiveButtonConfirmation' not in already_processed:3241            already_processed.append('positiveButtonConfirmation')3242            self.positiveButtonConfirmation = value3243        value = find_attr_value_('negativeButtonCaption', node)3244        if value is not None and 'negativeButtonCaption' not in already_processed:3245            already_processed.append('negativeButtonCaption')3246            self.negativeButtonCaption = value3247        value = find_attr_value_('positiveButtonCaption', node)3248        if value is not None and 'positiveButtonCaption' not in already_processed:3249            already_processed.append('positiveButtonCaption')3250            self.positiveButtonCaption = value3251        value = find_attr_value_('negativeButtonConfirmation', node)3252        if value is not None and 'negativeButtonConfirmation' not in already_processed:3253            already_processed.append('negativeButtonConfirmation')3254            self.negativeButtonConfirmation = value3255    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3256        if nodeName_ == 'widget':3257            class_obj_ = self.get_class_obj_(child_, Widget)3258            obj_ = class_obj_.factory()3259            obj_.build(child_)3260            self.set_widget(obj_)3261        elif nodeName_ == 'javascriptValidation':3262            javascriptValidation_ = child_.text3263            javascriptValidation_ = self.gds_validate_string(javascriptValidation_, node, 'javascriptValidation')3264            self.javascriptValidation = javascriptValidation_3265# end class Form3266class FormMessage(FlowElement):3267    subclass = None3268    superclass = FlowElement3269    def __init__(self, id=None, alertIntervalType=None, alertType=None, brandingKey=None, positiveReference=None, vibrate=None, member=None, autoLock=None, negativeReference=None, content=None, form=None, attachment=None):3270        super(FormMessage, self).__init__(id,)3271        self.alertIntervalType = _cast(None, alertIntervalType)3272        self.alertType = _cast(None, alertType)3273        self.brandingKey = _cast(None, brandingKey)3274        self.positiveReference = _cast(None, positiveReference)3275        self.vibrate = _cast(bool, vibrate)3276        self.member = _cast(None, member)3277        self.autoLock = _cast(bool, autoLock)3278        self.negativeReference = _cast(None, negativeReference)3279        self.content = content3280        self.form = form3281        if attachment is None:3282            self.attachment = []3283        else:3284            self.attachment = attachment3285    def factory(*args_, **kwargs_):3286        if FormMessage.subclass:3287            return FormMessage.subclass(*args_, **kwargs_)3288        else:3289            return FormMessage(*args_, **kwargs_)3290    factory = staticmethod(factory)3291    def get_content(self): return self.content3292    def set_content(self, content): self.content = content3293    def get_form(self): return self.form3294    def set_form(self, form): self.form = form3295    def get_attachment(self): return self.attachment3296    def set_attachment(self, attachment): self.attachment = attachment3297    def add_attachment(self, value): self.attachment.append(value)3298    def insert_attachment(self, index, value): self.attachment[index] = value3299    def get_alertIntervalType(self): return self.alertIntervalType3300    def set_alertIntervalType(self, alertIntervalType): self.alertIntervalType = alertIntervalType3301    def validate_AlertIntervalType(self, value):3302        # Validate type AlertIntervalType, a restriction on xs:string.3303        pass3304    def get_alertType(self): return self.alertType3305    def set_alertType(self, alertType): self.alertType = alertType3306    def validate_AlertType(self, value):3307        # Validate type AlertType, a restriction on xs:string.3308        pass3309    def get_brandingKey(self): return self.brandingKey3310    def set_brandingKey(self, brandingKey): self.brandingKey = brandingKey3311    def get_positiveReference(self): return self.positiveReference3312    def set_positiveReference(self, positiveReference): self.positiveReference = positiveReference3313    def get_vibrate(self): return self.vibrate3314    def set_vibrate(self, vibrate): self.vibrate = vibrate3315    def get_member(self): return self.member3316    def set_member(self, member): self.member = member3317    def get_autoLock(self): return self.autoLock3318    def set_autoLock(self, autoLock): self.autoLock = autoLock3319    def get_negativeReference(self): return self.negativeReference3320    def set_negativeReference(self, negativeReference): self.negativeReference = negativeReference3321    def export(self, outfile, level, namespace_='mstns:', name_='FormMessage', namespacedef_=''):3322        showIndent(outfile, level)3323        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3324        already_processed = []3325        self.exportAttributes(outfile, level, already_processed, namespace_, name_='FormMessage')3326        if self.hasContent_():3327            outfile.write('>\n')3328            self.exportChildren(outfile, level + 1, namespace_, name_)3329            showIndent(outfile, level)3330            outfile.write('</%s%s>\n' % (namespace_, name_))3331        else:3332            outfile.write('/>\n')3333    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='FormMessage'):3334        super(FormMessage, self).exportAttributes(outfile, level, already_processed, namespace_, name_='FormMessage')3335        if self.alertIntervalType is not None and 'alertIntervalType' not in already_processed:3336            already_processed.append('alertIntervalType')3337            outfile.write(' alertIntervalType=%s' % (quote_attrib(self.alertIntervalType),))3338        if self.alertType is not None and 'alertType' not in already_processed:3339            already_processed.append('alertType')3340            outfile.write(' alertType=%s' % (quote_attrib(self.alertType),))3341        if self.brandingKey is not None and 'brandingKey' not in already_processed:3342            already_processed.append('brandingKey')3343            outfile.write(' brandingKey=%s' % (self.gds_format_string(quote_attrib(self.brandingKey).encode(ExternalEncoding), input_name='brandingKey'),))3344        if self.positiveReference is not None and 'positiveReference' not in already_processed:3345            already_processed.append('positiveReference')3346            outfile.write(' positiveReference=%s' % (self.gds_format_string(quote_attrib(self.positiveReference).encode(ExternalEncoding), input_name='positiveReference'),))3347        if self.vibrate is not None and 'vibrate' not in already_processed:3348            already_processed.append('vibrate')3349            outfile.write(' vibrate="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.vibrate)), input_name='vibrate'))3350        if self.member is not None and 'member' not in already_processed:3351            already_processed.append('member')3352            outfile.write(' member=%s' % (self.gds_format_string(quote_attrib(self.member).encode(ExternalEncoding), input_name='member'),))3353        if self.autoLock is not None and 'autoLock' not in already_processed:3354            already_processed.append('autoLock')3355            outfile.write(' autoLock="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.autoLock)), input_name='autoLock'))3356        if self.negativeReference is not None and 'negativeReference' not in already_processed:3357            already_processed.append('negativeReference')3358            outfile.write(' negativeReference=%s' % (self.gds_format_string(quote_attrib(self.negativeReference).encode(ExternalEncoding), input_name='negativeReference'),))3359    def exportChildren(self, outfile, level, namespace_='mstns:', name_='FormMessage', fromsubclass_=False):3360        super(FormMessage, self).exportChildren(outfile, level, namespace_, name_, True)3361        if self.content is not None:3362            self.content.export(outfile, level, namespace_, name_='content',)3363        if self.form is not None:3364            self.form.export(outfile, level, namespace_, name_='form',)3365        for attachment_ in self.attachment:3366            attachment_.export(outfile, level, namespace_, name_='attachment')3367    def hasContent_(self):3368        if (3369            self.content is not None or3370            self.form is not None or3371            self.attachment or3372            super(FormMessage, self).hasContent_()3373            ):3374            return True3375        else:3376            return False3377    def exportLiteral(self, outfile, level, name_='FormMessage'):3378        level += 13379        self.exportLiteralAttributes(outfile, level, [], name_)3380        if self.hasContent_():3381            self.exportLiteralChildren(outfile, level, name_)3382    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3383        if self.alertIntervalType is not None and 'alertIntervalType' not in already_processed:3384            already_processed.append('alertIntervalType')3385            showIndent(outfile, level)3386            outfile.write('alertIntervalType = "%s",\n' % (self.alertIntervalType,))3387        if self.alertType is not None and 'alertType' not in already_processed:3388            already_processed.append('alertType')3389            showIndent(outfile, level)3390            outfile.write('alertType = "%s",\n' % (self.alertType,))3391        if self.brandingKey is not None and 'brandingKey' not in already_processed:3392            already_processed.append('brandingKey')3393            showIndent(outfile, level)3394            outfile.write('brandingKey = "%s",\n' % (self.brandingKey,))3395        if self.positiveReference is not None and 'positiveReference' not in already_processed:3396            already_processed.append('positiveReference')3397            showIndent(outfile, level)3398            outfile.write('positiveReference = "%s",\n' % (self.positiveReference,))3399        if self.vibrate is not None and 'vibrate' not in already_processed:3400            already_processed.append('vibrate')3401            showIndent(outfile, level)3402            outfile.write('vibrate = %s,\n' % (self.vibrate,))3403        if self.member is not None and 'member' not in already_processed:3404            already_processed.append('member')3405            showIndent(outfile, level)3406            outfile.write('member = "%s",\n' % (self.member,))3407        if self.autoLock is not None and 'autoLock' not in already_processed:3408            already_processed.append('autoLock')3409            showIndent(outfile, level)3410            outfile.write('autoLock = %s,\n' % (self.autoLock,))3411        if self.negativeReference is not None and 'negativeReference' not in already_processed:3412            already_processed.append('negativeReference')3413            showIndent(outfile, level)3414            outfile.write('negativeReference = "%s",\n' % (self.negativeReference,))3415        super(FormMessage, self).exportLiteralAttributes(outfile, level, already_processed, name_)3416    def exportLiteralChildren(self, outfile, level, name_):3417        super(FormMessage, self).exportLiteralChildren(outfile, level, name_)3418        if self.content is not None:3419            showIndent(outfile, level)3420            outfile.write('content=model_.contentType1(\n')3421            self.content.exportLiteral(outfile, level, name_='content')3422            showIndent(outfile, level)3423            outfile.write('),\n')3424        if self.form is not None:3425            showIndent(outfile, level)3426            outfile.write('form=model_.Form(\n')3427            self.form.exportLiteral(outfile, level, name_='form')3428            showIndent(outfile, level)3429            outfile.write('),\n')3430        showIndent(outfile, level)3431        outfile.write('attachment=[\n')3432        level += 13433        for attachment_ in self.attachment:3434            showIndent(outfile, level)3435            outfile.write('model_.Attachment(\n')3436            attachment_.exportLiteral(outfile, level, name_='Attachment')3437            showIndent(outfile, level)3438            outfile.write('),\n')3439        level -= 13440        showIndent(outfile, level)3441        outfile.write('],\n')3442    def build(self, node):3443        self.buildAttributes(node, node.attrib, [])3444        for child in node:3445            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3446            self.buildChildren(child, node, nodeName_)3447    def buildAttributes(self, node, attrs, already_processed):3448        value = find_attr_value_('alertIntervalType', node)3449        if value is not None and 'alertIntervalType' not in already_processed:3450            already_processed.append('alertIntervalType')3451            self.alertIntervalType = value3452            self.validate_AlertIntervalType(self.alertIntervalType)  # validate type AlertIntervalType3453        value = find_attr_value_('alertType', node)3454        if value is not None and 'alertType' not in already_processed:3455            already_processed.append('alertType')3456            self.alertType = value3457            self.validate_AlertType(self.alertType)  # validate type AlertType3458        value = find_attr_value_('brandingKey', node)3459        if value is not None and 'brandingKey' not in already_processed:3460            already_processed.append('brandingKey')3461            self.brandingKey = value3462        value = find_attr_value_('positiveReference', node)3463        if value is not None and 'positiveReference' not in already_processed:3464            already_processed.append('positiveReference')3465            self.positiveReference = value3466        value = find_attr_value_('vibrate', node)3467        if value is not None and 'vibrate' not in already_processed:3468            already_processed.append('vibrate')3469            if value in ('true', '1'):3470                self.vibrate = True3471            elif value in ('false', '0'):3472                self.vibrate = False3473            else:3474                raise_parse_error(node, 'Bad boolean attribute')3475        value = find_attr_value_('member', node)3476        if value is not None and 'member' not in already_processed:3477            already_processed.append('member')3478            self.member = value3479        value = find_attr_value_('autoLock', node)3480        if value is not None and 'autoLock' not in already_processed:3481            already_processed.append('autoLock')3482            if value in ('true', '1'):3483                self.autoLock = True3484            elif value in ('false', '0'):3485                self.autoLock = False3486            else:3487                raise_parse_error(node, 'Bad boolean attribute')3488        value = find_attr_value_('negativeReference', node)3489        if value is not None and 'negativeReference' not in already_processed:3490            already_processed.append('negativeReference')3491            self.negativeReference = value3492        super(FormMessage, self).buildAttributes(node, attrs, already_processed)3493    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3494        if nodeName_ == 'content':3495            obj_ = contentType1.factory()3496            obj_.build(child_)3497            self.set_content(obj_)3498        elif nodeName_ == 'form':3499            obj_ = Form.factory()3500            obj_.build(child_)3501            self.set_form(obj_)3502        elif nodeName_ == 'attachment':3503            obj_ = Attachment.factory()3504            obj_.build(child_)3505            self.attachment.append(obj_)3506        super(FormMessage, self).buildChildren(child_, node, nodeName_, True)3507# end class FormMessage3508class Outlet(GeneratedsSuper):3509    subclass = None3510    superclass = None3511    def __init__(self, reference=None, name=None, value=None):3512        self.reference = _cast(None, reference)3513        self.name = _cast(None, name)3514        self.value = _cast(None, value)3515        pass3516    def factory(*args_, **kwargs_):3517        if Outlet.subclass:3518            return Outlet.subclass(*args_, **kwargs_)3519        else:3520            return Outlet(*args_, **kwargs_)3521    factory = staticmethod(factory)3522    def get_reference(self): return self.reference3523    def set_reference(self, reference): self.reference = reference3524    def get_name(self): return self.name3525    def set_name(self, name): self.name = name3526    def get_value(self): return self.value3527    def set_value(self, value): self.value = value3528    def export(self, outfile, level, namespace_='mstns:', name_='Outlet', namespacedef_=''):3529        showIndent(outfile, level)3530        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3531        already_processed = []3532        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Outlet')3533        if self.hasContent_():3534            outfile.write('>\n')3535            self.exportChildren(outfile, level + 1, namespace_, name_)3536            outfile.write('</%s%s>\n' % (namespace_, name_))3537        else:3538            outfile.write('/>\n')3539    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Outlet'):3540        if self.reference is not None and 'reference' not in already_processed:3541            already_processed.append('reference')3542            outfile.write(' reference=%s' % (self.gds_format_string(quote_attrib(self.reference).encode(ExternalEncoding), input_name='reference'),))3543        if self.name is not None and 'name' not in already_processed:3544            already_processed.append('name')3545            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'),))3546        if self.value is not None and 'value' not in already_processed:3547            already_processed.append('value')3548            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))3549    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Outlet', fromsubclass_=False):3550        pass3551    def hasContent_(self):3552        if (3553            ):3554            return True3555        else:3556            return False3557    def exportLiteral(self, outfile, level, name_='Outlet'):3558        level += 13559        self.exportLiteralAttributes(outfile, level, [], name_)3560        if self.hasContent_():3561            self.exportLiteralChildren(outfile, level, name_)3562    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3563        if self.reference is not None and 'reference' not in already_processed:3564            already_processed.append('reference')3565            showIndent(outfile, level)3566            outfile.write('reference = "%s",\n' % (self.reference,))3567        if self.name is not None and 'name' not in already_processed:3568            already_processed.append('name')3569            showIndent(outfile, level)3570            outfile.write('name = "%s",\n' % (self.name,))3571        if self.value is not None and 'value' not in already_processed:3572            already_processed.append('value')3573            showIndent(outfile, level)3574            outfile.write('value = "%s",\n' % (self.value,))3575    def exportLiteralChildren(self, outfile, level, name_):3576        pass3577    def build(self, node):3578        self.buildAttributes(node, node.attrib, [])3579        for child in node:3580            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3581            self.buildChildren(child, node, nodeName_)3582    def buildAttributes(self, node, attrs, already_processed):3583        value = find_attr_value_('reference', node)3584        if value is not None and 'reference' not in already_processed:3585            already_processed.append('reference')3586            self.reference = value3587        value = find_attr_value_('name', node)3588        if value is not None and 'name' not in already_processed:3589            already_processed.append('name')3590            self.name = value3591        value = find_attr_value_('value', node)3592        if value is not None and 'value' not in already_processed:3593            already_processed.append('value')3594            self.value = value3595    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3596        pass3597# end class Outlet3598class End(FlowElement):3599    subclass = None3600    superclass = FlowElement3601    def __init__(self, id=None, waitForFollowUpMessage=False):3602        super(End, self).__init__(id,)3603        self.waitForFollowUpMessage = _cast(bool, waitForFollowUpMessage)3604        pass3605    def factory(*args_, **kwargs_):3606        if End.subclass:3607            return End.subclass(*args_, **kwargs_)3608        else:3609            return End(*args_, **kwargs_)3610    factory = staticmethod(factory)3611    def get_waitForFollowUpMessage(self): return self.waitForFollowUpMessage3612    def set_waitForFollowUpMessage(self, waitForFollowUpMessage): self.waitForFollowUpMessage = waitForFollowUpMessage3613    def export(self, outfile, level, namespace_='mstns:', name_='End', namespacedef_=''):3614        showIndent(outfile, level)3615        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3616        already_processed = []3617        self.exportAttributes(outfile, level, already_processed, namespace_, name_='End')3618        if self.hasContent_():3619            outfile.write('>\n')3620            self.exportChildren(outfile, level + 1, namespace_, name_)3621            outfile.write('</%s%s>\n' % (namespace_, name_))3622        else:3623            outfile.write('/>\n')3624    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='End'):3625        super(End, self).exportAttributes(outfile, level, already_processed, namespace_, name_='End')3626        if self.waitForFollowUpMessage is not None and 'waitForFollowUpMessage' not in already_processed:3627            already_processed.append('waitForFollowUpMessage')3628            outfile.write(' waitForFollowUpMessage="%s"' % self.gds_format_boolean(self.gds_str_lower(str(self.waitForFollowUpMessage)), input_name='waitForFollowUpMessage'))3629    def exportChildren(self, outfile, level, namespace_='mstns:', name_='End', fromsubclass_=False):3630        super(End, self).exportChildren(outfile, level, namespace_, name_, True)3631        pass3632    def hasContent_(self):3633        if (3634            super(End, self).hasContent_()3635            ):3636            return True3637        else:3638            return False3639    def exportLiteral(self, outfile, level, name_='End'):3640        level += 13641        self.exportLiteralAttributes(outfile, level, [], name_)3642        if self.hasContent_():3643            self.exportLiteralChildren(outfile, level, name_)3644    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3645        if self.waitForFollowUpMessage is not None and 'waitForFollowUpMessage' not in already_processed:3646            already_processed.append('waitForFollowUpMessage')3647            showIndent(outfile, level)3648            outfile.write('waitForFollowUpMessage = %s,\n' % (self.waitForFollowUpMessage,))3649        super(End, self).exportLiteralAttributes(outfile, level, already_processed, name_)3650    def exportLiteralChildren(self, outfile, level, name_):3651        super(End, self).exportLiteralChildren(outfile, level, name_)3652        pass3653    def build(self, node):3654        self.buildAttributes(node, node.attrib, [])3655        for child in node:3656            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3657            self.buildChildren(child, node, nodeName_)3658    def buildAttributes(self, node, attrs, already_processed):3659        value = find_attr_value_('waitForFollowUpMessage', node)3660        if value is not None and 'waitForFollowUpMessage' not in already_processed:3661            already_processed.append('waitForFollowUpMessage')3662            if value in ('true', '1'):3663                self.waitForFollowUpMessage = True3664            elif value in ('false', '0'):3665                self.waitForFollowUpMessage = False3666            else:3667                raise_parse_error(node, 'Bad boolean attribute')3668        super(End, self).buildAttributes(node, attrs, already_processed)3669    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3670        super(End, self).buildChildren(child_, node, nodeName_, True)3671        pass3672# end class End3673class MessageFlowDefinition(GeneratedsSuper):3674    subclass = None3675    superclass = None3676    def __init__(self, name=None, language=None, startReference=None, end=None, message=None, formMessage=None, resultsFlush=None, resultsEmail=None, flowCode=None):3677        self.name = _cast(None, name)3678        self.language = _cast(None, language)3679        self.startReference = _cast(None, startReference)3680        if end is None:3681            self.end = []3682        else:3683            self.end = end3684        if message is None:3685            self.message = []3686        else:3687            self.message = message3688        if formMessage is None:3689            self.formMessage = []3690        else:3691            self.formMessage = formMessage3692        if resultsFlush is None:3693            self.resultsFlush = []3694        else:3695            self.resultsFlush = resultsFlush3696        if resultsEmail is None:3697            self.resultsEmail = []3698        else:3699            self.resultsEmail = resultsEmail3700        if flowCode is None:3701            self.flowCode = []3702        else:3703            self.flowCode = flowCode3704    def factory(*args_, **kwargs_):3705        if MessageFlowDefinition.subclass:3706            return MessageFlowDefinition.subclass(*args_, **kwargs_)3707        else:3708            return MessageFlowDefinition(*args_, **kwargs_)3709    factory = staticmethod(factory)3710    def get_end(self): return self.end3711    def set_end(self, end): self.end = end3712    def add_end(self, value): self.end.append(value)3713    def insert_end(self, index, value): self.end[index] = value3714    def get_message(self): return self.message3715    def set_message(self, message): self.message = message3716    def add_message(self, value): self.message.append(value)3717    def insert_message(self, index, value): self.message[index] = value3718    def get_formMessage(self): return self.formMessage3719    def set_formMessage(self, formMessage): self.formMessage = formMessage3720    def add_formMessage(self, value): self.formMessage.append(value)3721    def insert_formMessage(self, index, value): self.formMessage[index] = value3722    def get_resultsFlush(self): return self.resultsFlush3723    def set_resultsFlush(self, resultsFlush): self.resultsFlush = resultsFlush3724    def add_resultsFlush(self, value): self.resultsFlush.append(value)3725    def insert_resultsFlush(self, index, value): self.resultsFlush[index] = value3726    def get_resultsEmail(self): return self.resultsEmail3727    def set_resultsEmail(self, resultsEmail): self.resultsEmail = resultsEmail3728    def add_resultsEmail(self, value): self.resultsEmail.append(value)3729    def insert_resultsEmail(self, index, value): self.resultsEmail[index] = value3730    def get_flowCode(self): return self.flowCode3731    def set_flowCode(self, flowCode): self.flowCode = flowCode3732    def add_flowCode(self, value): self.flowCode.append(value)3733    def insert_flowCode(self, index, value): self.flowCode[index] = value3734    def get_name(self): return self.name3735    def set_name(self, name): self.name = name3736    def get_language(self): return self.language3737    def set_language(self, language): self.language = language3738    def get_startReference(self): return self.startReference3739    def set_startReference(self, startReference): self.startReference = startReference3740    def export(self, outfile, level, namespace_='mstns:', name_='MessageFlowDefinition', namespacedef_=''):3741        showIndent(outfile, level)3742        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3743        already_processed = []3744        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageFlowDefinition')3745        if self.hasContent_():3746            outfile.write('>\n')3747            self.exportChildren(outfile, level + 1, namespace_, name_)3748            showIndent(outfile, level)3749            outfile.write('</%s%s>\n' % (namespace_, name_))3750        else:3751            outfile.write('/>\n')3752    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MessageFlowDefinition'):3753        if self.name is not None and 'name' not in already_processed:3754            already_processed.append('name')3755            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'),))3756        if self.language is not None and 'language' not in already_processed:3757            already_processed.append('language')3758            outfile.write(' language=%s' % (self.gds_format_string(quote_attrib(self.language).encode(ExternalEncoding), input_name='language'),))3759        if self.startReference is not None and 'startReference' not in already_processed:3760            already_processed.append('startReference')3761            outfile.write(' startReference=%s' % (self.gds_format_string(quote_attrib(self.startReference).encode(ExternalEncoding), input_name='startReference'),))3762    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MessageFlowDefinition', fromsubclass_=False):3763        for end_ in self.end:3764            end_.export(outfile, level, namespace_, name_='end')3765        for message_ in self.message:3766            message_.export(outfile, level, namespace_, name_='message')3767        for formMessage_ in self.formMessage:3768            formMessage_.export(outfile, level, namespace_, name_='formMessage')3769        for resultsFlush_ in self.resultsFlush:3770            resultsFlush_.export(outfile, level, namespace_, name_='resultsFlush')3771        for resultsEmail_ in self.resultsEmail:3772            resultsEmail_.export(outfile, level, namespace_, name_='resultsEmail')3773        for flowCode_ in self.flowCode:3774            flowCode_.export(outfile, level, namespace_, name_='flowCode')3775    def hasContent_(self):3776        if (3777            self.end or3778            self.message or3779            self.formMessage or3780            self.resultsFlush or3781            self.resultsEmail or3782            self.flowCode3783            ):3784            return True3785        else:3786            return False3787    def exportLiteral(self, outfile, level, name_='MessageFlowDefinition'):3788        level += 13789        self.exportLiteralAttributes(outfile, level, [], name_)3790        if self.hasContent_():3791            self.exportLiteralChildren(outfile, level, name_)3792    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3793        if self.name is not None and 'name' not in already_processed:3794            already_processed.append('name')3795            showIndent(outfile, level)3796            outfile.write('name = "%s",\n' % (self.name,))3797        if self.language is not None and 'language' not in already_processed:3798            already_processed.append('language')3799            showIndent(outfile, level)3800            outfile.write('language = "%s",\n' % (self.language,))3801        if self.startReference is not None and 'startReference' not in already_processed:3802            already_processed.append('startReference')3803            showIndent(outfile, level)3804            outfile.write('startReference = "%s",\n' % (self.startReference,))3805    def exportLiteralChildren(self, outfile, level, name_):3806        showIndent(outfile, level)3807        outfile.write('end=[\n')3808        level += 13809        for end_ in self.end:3810            showIndent(outfile, level)3811            outfile.write('model_.End(\n')3812            end_.exportLiteral(outfile, level, name_='End')3813            showIndent(outfile, level)3814            outfile.write('),\n')3815        level -= 13816        showIndent(outfile, level)3817        outfile.write('],\n')3818        showIndent(outfile, level)3819        outfile.write('message=[\n')3820        level += 13821        for message_ in self.message:3822            showIndent(outfile, level)3823            outfile.write('model_.Message(\n')3824            message_.exportLiteral(outfile, level, name_='Message')3825            showIndent(outfile, level)3826            outfile.write('),\n')3827        level -= 13828        showIndent(outfile, level)3829        outfile.write('],\n')3830        showIndent(outfile, level)3831        outfile.write('formMessage=[\n')3832        level += 13833        for formMessage_ in self.formMessage:3834            showIndent(outfile, level)3835            outfile.write('model_.FormMessage(\n')3836            formMessage_.exportLiteral(outfile, level, name_='FormMessage')3837            showIndent(outfile, level)3838            outfile.write('),\n')3839        level -= 13840        showIndent(outfile, level)3841        outfile.write('],\n')3842        showIndent(outfile, level)3843        outfile.write('resultsFlush=[\n')3844        level += 13845        for resultsFlush_ in self.resultsFlush:3846            showIndent(outfile, level)3847            outfile.write('model_.ResultsFlush(\n')3848            resultsFlush_.exportLiteral(outfile, level, name_='ResultsFlush')3849            showIndent(outfile, level)3850            outfile.write('),\n')3851        level -= 13852        showIndent(outfile, level)3853        outfile.write('],\n')3854        showIndent(outfile, level)3855        outfile.write('resultsEmail=[\n')3856        level += 13857        for resultsEmail_ in self.resultsEmail:3858            showIndent(outfile, level)3859            outfile.write('model_.ResultsEmail(\n')3860            resultsEmail_.exportLiteral(outfile, level, name_='ResultsEmail')3861            showIndent(outfile, level)3862            outfile.write('),\n')3863        level -= 13864        showIndent(outfile, level)3865        outfile.write('],\n')3866        showIndent(outfile, level)3867        outfile.write('flowCode=[\n')3868        level += 13869        for flowCode_ in self.flowCode:3870            showIndent(outfile, level)3871            outfile.write('model_.FlowCode(\n')3872            flowCode_.exportLiteral(outfile, level, name_='FlowCode')3873            showIndent(outfile, level)3874            outfile.write('),\n')3875        level -= 13876        showIndent(outfile, level)3877        outfile.write('],\n')3878    def build(self, node):3879        self.buildAttributes(node, node.attrib, [])3880        for child in node:3881            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3882            self.buildChildren(child, node, nodeName_)3883    def buildAttributes(self, node, attrs, already_processed):3884        value = find_attr_value_('name', node)3885        if value is not None and 'name' not in already_processed:3886            already_processed.append('name')3887            self.name = value3888        value = find_attr_value_('language', node)3889        if value is not None and 'language' not in already_processed:3890            already_processed.append('language')3891            self.language = value3892        value = find_attr_value_('startReference', node)3893        if value is not None and 'startReference' not in already_processed:3894            already_processed.append('startReference')3895            self.startReference = value3896    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3897        if nodeName_ == 'end':3898            obj_ = End.factory()3899            obj_.build(child_)3900            self.end.append(obj_)3901        elif nodeName_ == 'message':3902            obj_ = Message.factory()3903            obj_.build(child_)3904            self.message.append(obj_)3905        elif nodeName_ == 'formMessage':3906            obj_ = FormMessage.factory()3907            obj_.build(child_)3908            self.formMessage.append(obj_)3909        elif nodeName_ == 'resultsFlush':3910            obj_ = ResultsFlush.factory()3911            obj_.build(child_)3912            self.resultsFlush.append(obj_)3913        elif nodeName_ == 'resultsEmail':3914            obj_ = ResultsEmail.factory()3915            obj_.build(child_)3916            self.resultsEmail.append(obj_)3917        elif nodeName_ == 'flowCode':3918            obj_ = FlowCode.factory()3919            obj_.build(child_)3920            self.flowCode.append(obj_)3921# end class MessageFlowDefinition3922class MessageFlowDefinitionSet(GeneratedsSuper):3923    subclass = None3924    superclass = None3925    def __init__(self, definition=None):3926        if definition is None:3927            self.definition = []3928        else:3929            self.definition = definition3930    def factory(*args_, **kwargs_):3931        if MessageFlowDefinitionSet.subclass:3932            return MessageFlowDefinitionSet.subclass(*args_, **kwargs_)3933        else:3934            return MessageFlowDefinitionSet(*args_, **kwargs_)3935    factory = staticmethod(factory)3936    def get_definition(self): return self.definition3937    def set_definition(self, definition): self.definition = definition3938    def add_definition(self, value): self.definition.append(value)3939    def insert_definition(self, index, value): self.definition[index] = value3940    def export(self, outfile, level, namespace_='mstns:', name_='MessageFlowDefinitionSet', namespacedef_=''):3941        showIndent(outfile, level)3942        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))3943        already_processed = []3944        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageFlowDefinitionSet')3945        if self.hasContent_():3946            outfile.write('>\n')3947            self.exportChildren(outfile, level + 1, namespace_, name_)3948            showIndent(outfile, level)3949            outfile.write('</%s%s>\n' % (namespace_, name_))3950        else:3951            outfile.write('/>\n')3952    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MessageFlowDefinitionSet'):3953        pass3954    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MessageFlowDefinitionSet', fromsubclass_=False):3955        for definition_ in self.definition:3956            definition_.export(outfile, level, namespace_, name_='definition')3957    def hasContent_(self):3958        if (3959            self.definition3960            ):3961            return True3962        else:3963            return False3964    def exportLiteral(self, outfile, level, name_='MessageFlowDefinitionSet'):3965        level += 13966        self.exportLiteralAttributes(outfile, level, [], name_)3967        if self.hasContent_():3968            self.exportLiteralChildren(outfile, level, name_)3969    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3970        pass3971    def exportLiteralChildren(self, outfile, level, name_):3972        showIndent(outfile, level)3973        outfile.write('definition=[\n')3974        level += 13975        for definition_ in self.definition:3976            showIndent(outfile, level)3977            outfile.write('model_.MessageFlowDefinition(\n')3978            definition_.exportLiteral(outfile, level, name_='MessageFlowDefinition')3979            showIndent(outfile, level)3980            outfile.write('),\n')3981        level -= 13982        showIndent(outfile, level)3983        outfile.write('],\n')3984    def build(self, node):3985        self.buildAttributes(node, node.attrib, [])3986        for child in node:3987            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3988            self.buildChildren(child, node, nodeName_)3989    def buildAttributes(self, node, attrs, already_processed):3990        pass3991    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3992        if nodeName_ == 'definition':3993            obj_ = MessageFlowDefinition.factory()3994            obj_.build(child_)3995            self.definition.append(obj_)3996# end class MessageFlowDefinitionSet3997class Step(GeneratedsSuper):3998    subclass = None3999    superclass = None4000    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, extensiontype_=None):4001        self.definition = _cast(None, definition)4002        self.previousStep = _cast(None, previousStep)4003        self.button = _cast(None, button)4004        self.nextStep = _cast(None, nextStep)4005        self.message = _cast(None, message)4006        self.creationTimestamp = _cast(int, creationTimestamp)4007        self.id = _cast(None, id)4008        self.extensiontype_ = extensiontype_4009    def factory(*args_, **kwargs_):4010        if Step.subclass:4011            return Step.subclass(*args_, **kwargs_)4012        else:4013            return Step(*args_, **kwargs_)4014    factory = staticmethod(factory)4015    def get_definition(self): return self.definition4016    def set_definition(self, definition): self.definition = definition4017    def get_previousStep(self): return self.previousStep4018    def set_previousStep(self, previousStep): self.previousStep = previousStep4019    def get_button(self): return self.button4020    def set_button(self, button): self.button = button4021    def get_nextStep(self): return self.nextStep4022    def set_nextStep(self, nextStep): self.nextStep = nextStep4023    def get_message(self): return self.message4024    def set_message(self, message): self.message = message4025    def get_creationTimestamp(self): return self.creationTimestamp4026    def set_creationTimestamp(self, creationTimestamp): self.creationTimestamp = creationTimestamp4027    def get_id(self): return self.id4028    def set_id(self, id): self.id = id4029    def get_extensiontype_(self): return self.extensiontype_4030    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_4031    def export(self, outfile, level, namespace_='mstns:', name_='Step', namespacedef_=''):4032        showIndent(outfile, level)4033        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4034        already_processed = []4035        self.exportAttributes(outfile, level, already_processed, namespace_, name_='Step')4036        if self.hasContent_():4037            outfile.write('>\n')4038            self.exportChildren(outfile, level + 1, namespace_, name_)4039            outfile.write('</%s%s>\n' % (namespace_, name_))4040        else:4041            outfile.write('/>\n')4042    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='Step'):4043        if self.definition is not None and 'definition' not in already_processed:4044            already_processed.append('definition')4045            outfile.write(' definition=%s' % (self.gds_format_string(quote_attrib(self.definition).encode(ExternalEncoding), input_name='definition'),))4046        if self.previousStep is not None and 'previousStep' not in already_processed:4047            already_processed.append('previousStep')4048            outfile.write(' previousStep=%s' % (self.gds_format_string(quote_attrib(self.previousStep).encode(ExternalEncoding), input_name='previousStep'),))4049        if self.button is not None and 'button' not in already_processed:4050            already_processed.append('button')4051            outfile.write(' button=%s' % (self.gds_format_string(quote_attrib(self.button).encode(ExternalEncoding), input_name='button'),))4052        if self.nextStep is not None and 'nextStep' not in already_processed:4053            already_processed.append('nextStep')4054            outfile.write(' nextStep=%s' % (self.gds_format_string(quote_attrib(self.nextStep).encode(ExternalEncoding), input_name='nextStep'),))4055        if self.message is not None and 'message' not in already_processed:4056            already_processed.append('message')4057            outfile.write(' message=%s' % (self.gds_format_string(quote_attrib(self.message).encode(ExternalEncoding), input_name='message'),))4058        if self.creationTimestamp is not None and 'creationTimestamp' not in already_processed:4059            already_processed.append('creationTimestamp')4060            outfile.write(' creationTimestamp="%s"' % self.gds_format_integer(self.creationTimestamp, input_name='creationTimestamp'))4061        if self.id is not None and 'id' not in already_processed:4062            already_processed.append('id')4063            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'),))4064        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:4065            already_processed.append('xsi:type')4066            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')4067            outfile.write(' xsi:type="%s"' % self.extensiontype_)4068    def exportChildren(self, outfile, level, namespace_='mstns:', name_='Step', fromsubclass_=False):4069        pass4070    def hasContent_(self):4071        if (4072            ):4073            return True4074        else:4075            return False4076    def exportLiteral(self, outfile, level, name_='Step'):4077        level += 14078        self.exportLiteralAttributes(outfile, level, [], name_)4079        if self.hasContent_():4080            self.exportLiteralChildren(outfile, level, name_)4081    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4082        if self.definition is not None and 'definition' not in already_processed:4083            already_processed.append('definition')4084            showIndent(outfile, level)4085            outfile.write('definition = "%s",\n' % (self.definition,))4086        if self.previousStep is not None and 'previousStep' not in already_processed:4087            already_processed.append('previousStep')4088            showIndent(outfile, level)4089            outfile.write('previousStep = "%s",\n' % (self.previousStep,))4090        if self.button is not None and 'button' not in already_processed:4091            already_processed.append('button')4092            showIndent(outfile, level)4093            outfile.write('button = "%s",\n' % (self.button,))4094        if self.nextStep is not None and 'nextStep' not in already_processed:4095            already_processed.append('nextStep')4096            showIndent(outfile, level)4097            outfile.write('nextStep = "%s",\n' % (self.nextStep,))4098        if self.message is not None and 'message' not in already_processed:4099            already_processed.append('message')4100            showIndent(outfile, level)4101            outfile.write('message = "%s",\n' % (self.message,))4102        if self.creationTimestamp is not None and 'creationTimestamp' not in already_processed:4103            already_processed.append('creationTimestamp')4104            showIndent(outfile, level)4105            outfile.write('creationTimestamp = %d,\n' % (self.creationTimestamp,))4106        if self.id is not None and 'id' not in already_processed:4107            already_processed.append('id')4108            showIndent(outfile, level)4109            outfile.write('id = "%s",\n' % (self.id,))4110    def exportLiteralChildren(self, outfile, level, name_):4111        pass4112    def build(self, node):4113        self.buildAttributes(node, node.attrib, [])4114        for child in node:4115            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4116            self.buildChildren(child, node, nodeName_)4117    def buildAttributes(self, node, attrs, already_processed):4118        value = find_attr_value_('definition', node)4119        if value is not None and 'definition' not in already_processed:4120            already_processed.append('definition')4121            self.definition = value4122        value = find_attr_value_('previousStep', node)4123        if value is not None and 'previousStep' not in already_processed:4124            already_processed.append('previousStep')4125            self.previousStep = value4126        value = find_attr_value_('button', node)4127        if value is not None and 'button' not in already_processed:4128            already_processed.append('button')4129            self.button = value4130        value = find_attr_value_('nextStep', node)4131        if value is not None and 'nextStep' not in already_processed:4132            already_processed.append('nextStep')4133            self.nextStep = value4134        value = find_attr_value_('message', node)4135        if value is not None and 'message' not in already_processed:4136            already_processed.append('message')4137            self.message = value4138        value = find_attr_value_('creationTimestamp', node)4139        if value is not None and 'creationTimestamp' not in already_processed:4140            already_processed.append('creationTimestamp')4141            try:4142                self.creationTimestamp = int(value)4143            except ValueError, exp:4144                raise_parse_error(node, 'Bad integer attribute: %s' % exp)4145        value = find_attr_value_('id', node)4146        if value is not None and 'id' not in already_processed:4147            already_processed.append('id')4148            self.id = value4149        value = find_attr_value_('xsi:type', node)4150        if value is not None and 'xsi:type' not in already_processed:4151            already_processed.append('xsi:type')4152            self.extensiontype_ = value4153    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4154        pass4155# end class Step4156class BaseMessageStep(Step):4157    subclass = None4158    superclass = Step4159    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, extensiontype_=None):4160        super(BaseMessageStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, extensiontype_,)4161        self.receivedTimestamp = _cast(int, receivedTimestamp)4162        self.acknowledgedTimestamp = _cast(int, acknowledgedTimestamp)4163        self.extensiontype_ = extensiontype_4164    def factory(*args_, **kwargs_):4165        if BaseMessageStep.subclass:4166            return BaseMessageStep.subclass(*args_, **kwargs_)4167        else:4168            return BaseMessageStep(*args_, **kwargs_)4169    factory = staticmethod(factory)4170    def get_receivedTimestamp(self): return self.receivedTimestamp4171    def set_receivedTimestamp(self, receivedTimestamp): self.receivedTimestamp = receivedTimestamp4172    def get_acknowledgedTimestamp(self): return self.acknowledgedTimestamp4173    def set_acknowledgedTimestamp(self, acknowledgedTimestamp): self.acknowledgedTimestamp = acknowledgedTimestamp4174    def get_extensiontype_(self): return self.extensiontype_4175    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_4176    def export(self, outfile, level, namespace_='mstns:', name_='BaseMessageStep', namespacedef_=''):4177        showIndent(outfile, level)4178        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4179        already_processed = []4180        self.exportAttributes(outfile, level, already_processed, namespace_, name_='BaseMessageStep')4181        if self.hasContent_():4182            outfile.write('>\n')4183            self.exportChildren(outfile, level + 1, namespace_, name_)4184            outfile.write('</%s%s>\n' % (namespace_, name_))4185        else:4186            outfile.write('/>\n')4187    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='BaseMessageStep'):4188        super(BaseMessageStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='BaseMessageStep')4189        if self.receivedTimestamp is not None and 'receivedTimestamp' not in already_processed:4190            already_processed.append('receivedTimestamp')4191            outfile.write(' receivedTimestamp="%s"' % self.gds_format_integer(self.receivedTimestamp, input_name='receivedTimestamp'))4192        if self.acknowledgedTimestamp is not None and 'acknowledgedTimestamp' not in already_processed:4193            already_processed.append('acknowledgedTimestamp')4194            outfile.write(' acknowledgedTimestamp="%s"' % self.gds_format_integer(self.acknowledgedTimestamp, input_name='acknowledgedTimestamp'))4195        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:4196            already_processed.append('xsi:type')4197            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')4198            outfile.write(' xsi:type="%s"' % self.extensiontype_)4199    def exportChildren(self, outfile, level, namespace_='mstns:', name_='BaseMessageStep', fromsubclass_=False):4200        super(BaseMessageStep, self).exportChildren(outfile, level, namespace_, name_, True)4201        pass4202    def hasContent_(self):4203        if (4204            super(BaseMessageStep, self).hasContent_()4205            ):4206            return True4207        else:4208            return False4209    def exportLiteral(self, outfile, level, name_='BaseMessageStep'):4210        level += 14211        self.exportLiteralAttributes(outfile, level, [], name_)4212        if self.hasContent_():4213            self.exportLiteralChildren(outfile, level, name_)4214    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4215        if self.receivedTimestamp is not None and 'receivedTimestamp' not in already_processed:4216            already_processed.append('receivedTimestamp')4217            showIndent(outfile, level)4218            outfile.write('receivedTimestamp = %d,\n' % (self.receivedTimestamp,))4219        if self.acknowledgedTimestamp is not None and 'acknowledgedTimestamp' not in already_processed:4220            already_processed.append('acknowledgedTimestamp')4221            showIndent(outfile, level)4222            outfile.write('acknowledgedTimestamp = %d,\n' % (self.acknowledgedTimestamp,))4223        super(BaseMessageStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4224    def exportLiteralChildren(self, outfile, level, name_):4225        super(BaseMessageStep, self).exportLiteralChildren(outfile, level, name_)4226        pass4227    def build(self, node):4228        self.buildAttributes(node, node.attrib, [])4229        for child in node:4230            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4231            self.buildChildren(child, node, nodeName_)4232    def buildAttributes(self, node, attrs, already_processed):4233        value = find_attr_value_('receivedTimestamp', node)4234        if value is not None and 'receivedTimestamp' not in already_processed:4235            already_processed.append('receivedTimestamp')4236            try:4237                self.receivedTimestamp = int(value)4238            except ValueError, exp:4239                raise_parse_error(node, 'Bad integer attribute: %s' % exp)4240        value = find_attr_value_('acknowledgedTimestamp', node)4241        if value is not None and 'acknowledgedTimestamp' not in already_processed:4242            already_processed.append('acknowledgedTimestamp')4243            try:4244                self.acknowledgedTimestamp = int(value)4245            except ValueError, exp:4246                raise_parse_error(node, 'Bad integer attribute: %s' % exp)4247        value = find_attr_value_('xsi:type', node)4248        if value is not None and 'xsi:type' not in already_processed:4249            already_processed.append('xsi:type')4250            self.extensiontype_ = value4251        super(BaseMessageStep, self).buildAttributes(node, attrs, already_processed)4252    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4253        super(BaseMessageStep, self).buildChildren(child_, node, nodeName_, True)4254        pass4255# end class BaseMessageStep4256class MessageStep(BaseMessageStep):4257    subclass = None4258    superclass = BaseMessageStep4259    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, answer=None):4260        super(MessageStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp,)4261        self.answer = _cast(None, answer)4262        pass4263    def factory(*args_, **kwargs_):4264        if MessageStep.subclass:4265            return MessageStep.subclass(*args_, **kwargs_)4266        else:4267            return MessageStep(*args_, **kwargs_)4268    factory = staticmethod(factory)4269    def get_answer(self): return self.answer4270    def set_answer(self, answer): self.answer = answer4271    def export(self, outfile, level, namespace_='mstns:', name_='MessageStep', namespacedef_=''):4272        showIndent(outfile, level)4273        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4274        already_processed = []4275        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageStep')4276        if self.hasContent_():4277            outfile.write('>\n')4278            self.exportChildren(outfile, level + 1, namespace_, name_)4279            outfile.write('</%s%s>\n' % (namespace_, name_))4280        else:4281            outfile.write('/>\n')4282    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MessageStep'):4283        super(MessageStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MessageStep')4284        if self.answer is not None and 'answer' not in already_processed:4285            already_processed.append('answer')4286            outfile.write(' answer=%s' % (self.gds_format_string(quote_attrib(self.answer).encode(ExternalEncoding), input_name='answer'),))4287    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MessageStep', fromsubclass_=False):4288        super(MessageStep, self).exportChildren(outfile, level, namespace_, name_, True)4289        pass4290    def hasContent_(self):4291        if (4292            super(MessageStep, self).hasContent_()4293            ):4294            return True4295        else:4296            return False4297    def exportLiteral(self, outfile, level, name_='MessageStep'):4298        level += 14299        self.exportLiteralAttributes(outfile, level, [], name_)4300        if self.hasContent_():4301            self.exportLiteralChildren(outfile, level, name_)4302    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4303        if self.answer is not None and 'answer' not in already_processed:4304            already_processed.append('answer')4305            showIndent(outfile, level)4306            outfile.write('answer = "%s",\n' % (self.answer,))4307        super(MessageStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4308    def exportLiteralChildren(self, outfile, level, name_):4309        super(MessageStep, self).exportLiteralChildren(outfile, level, name_)4310        pass4311    def build(self, node):4312        self.buildAttributes(node, node.attrib, [])4313        for child in node:4314            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4315            self.buildChildren(child, node, nodeName_)4316    def buildAttributes(self, node, attrs, already_processed):4317        value = find_attr_value_('answer', node)4318        if value is not None and 'answer' not in already_processed:4319            already_processed.append('answer')4320            self.answer = value4321        super(MessageStep, self).buildAttributes(node, attrs, already_processed)4322    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4323        super(MessageStep, self).buildChildren(child_, node, nodeName_, True)4324        pass4325# end class MessageStep4326class WidgetStep(BaseMessageStep):4327    subclass = None4328    superclass = BaseMessageStep4329    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, extensiontype_=None):4330        super(WidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, extensiontype_,)4331        self.formButton = _cast(None, formButton)4332        self.displayValue = _cast(None, displayValue)4333        self.extensiontype_ = extensiontype_4334    def factory(*args_, **kwargs_):4335        if WidgetStep.subclass:4336            return WidgetStep.subclass(*args_, **kwargs_)4337        else:4338            return WidgetStep(*args_, **kwargs_)4339    factory = staticmethod(factory)4340    def get_formButton(self): return self.formButton4341    def set_formButton(self, formButton): self.formButton = formButton4342    def validate_FormButton(self, value):4343        # Validate type FormButton, a restriction on xs:string.4344        pass4345    def get_displayValue(self): return self.displayValue4346    def set_displayValue(self, displayValue): self.displayValue = displayValue4347    def get_extensiontype_(self): return self.extensiontype_4348    def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_4349    def export(self, outfile, level, namespace_='mstns:', name_='WidgetStep', namespacedef_=''):4350        showIndent(outfile, level)4351        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4352        already_processed = []4353        self.exportAttributes(outfile, level, already_processed, namespace_, name_='WidgetStep')4354        if self.hasContent_():4355            outfile.write('>\n')4356            self.exportChildren(outfile, level + 1, namespace_, name_)4357            outfile.write('</%s%s>\n' % (namespace_, name_))4358        else:4359            outfile.write('/>\n')4360    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='WidgetStep'):4361        super(WidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='WidgetStep')4362        if self.formButton is not None and 'formButton' not in already_processed:4363            already_processed.append('formButton')4364            outfile.write(' formButton=%s' % (quote_attrib(self.formButton),))4365        if self.displayValue is not None and 'displayValue' not in already_processed:4366            already_processed.append('displayValue')4367            outfile.write(' displayValue=%s' % (self.gds_format_string(quote_attrib(self.displayValue).encode(ExternalEncoding), input_name='displayValue'),))4368        if self.extensiontype_ is not None and 'xsi:type' not in already_processed:4369            already_processed.append('xsi:type')4370            outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')4371            outfile.write(' xsi:type="%s"' % self.extensiontype_)4372    def exportChildren(self, outfile, level, namespace_='mstns:', name_='WidgetStep', fromsubclass_=False):4373        super(WidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)4374        pass4375    def hasContent_(self):4376        if (4377            super(WidgetStep, self).hasContent_()4378            ):4379            return True4380        else:4381            return False4382    def exportLiteral(self, outfile, level, name_='WidgetStep'):4383        level += 14384        self.exportLiteralAttributes(outfile, level, [], name_)4385        if self.hasContent_():4386            self.exportLiteralChildren(outfile, level, name_)4387    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4388        if self.formButton is not None and 'formButton' not in already_processed:4389            already_processed.append('formButton')4390            showIndent(outfile, level)4391            outfile.write('formButton = "%s",\n' % (self.formButton,))4392        if self.displayValue is not None and 'displayValue' not in already_processed:4393            already_processed.append('displayValue')4394            showIndent(outfile, level)4395            outfile.write('displayValue = "%s",\n' % (self.displayValue,))4396        super(WidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4397    def exportLiteralChildren(self, outfile, level, name_):4398        super(WidgetStep, self).exportLiteralChildren(outfile, level, name_)4399        pass4400    def build(self, node):4401        self.buildAttributes(node, node.attrib, [])4402        for child in node:4403            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4404            self.buildChildren(child, node, nodeName_)4405    def buildAttributes(self, node, attrs, already_processed):4406        value = find_attr_value_('formButton', node)4407        if value is not None and 'formButton' not in already_processed:4408            already_processed.append('formButton')4409            self.formButton = value4410            self.validate_FormButton(self.formButton)  # validate type FormButton4411        value = find_attr_value_('displayValue', node)4412        if value is not None and 'displayValue' not in already_processed:4413            already_processed.append('displayValue')4414            self.displayValue = value4415        value = find_attr_value_('xsi:type', node)4416        if value is not None and 'xsi:type' not in already_processed:4417            already_processed.append('xsi:type')4418            self.extensiontype_ = value4419        super(WidgetStep, self).buildAttributes(node, attrs, already_processed)4420    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4421        super(WidgetStep, self).buildChildren(child_, node, nodeName_, True)4422        pass4423# end class WidgetStep4424class TextWidgetStep(WidgetStep):4425    subclass = None4426    superclass = WidgetStep4427    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, value=None):4428        super(TextWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)4429        self.value = _cast(None, value)4430        pass4431    def factory(*args_, **kwargs_):4432        if TextWidgetStep.subclass:4433            return TextWidgetStep.subclass(*args_, **kwargs_)4434        else:4435            return TextWidgetStep(*args_, **kwargs_)4436    factory = staticmethod(factory)4437    def get_value(self): return self.value4438    def set_value(self, value): self.value = value4439    def export(self, outfile, level, namespace_='mstns:', name_='TextWidgetStep', namespacedef_=''):4440        showIndent(outfile, level)4441        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4442        already_processed = []4443        self.exportAttributes(outfile, level, already_processed, namespace_, name_='TextWidgetStep')4444        if self.hasContent_():4445            outfile.write('>\n')4446            self.exportChildren(outfile, level + 1, namespace_, name_)4447            outfile.write('</%s%s>\n' % (namespace_, name_))4448        else:4449            outfile.write('/>\n')4450    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='TextWidgetStep'):4451        super(TextWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TextWidgetStep')4452        if self.value is not None and 'value' not in already_processed:4453            already_processed.append('value')4454            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))4455    def exportChildren(self, outfile, level, namespace_='mstns:', name_='TextWidgetStep', fromsubclass_=False):4456        super(TextWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)4457        pass4458    def hasContent_(self):4459        if (4460            super(TextWidgetStep, self).hasContent_()4461            ):4462            return True4463        else:4464            return False4465    def exportLiteral(self, outfile, level, name_='TextWidgetStep'):4466        level += 14467        self.exportLiteralAttributes(outfile, level, [], name_)4468        if self.hasContent_():4469            self.exportLiteralChildren(outfile, level, name_)4470    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4471        if self.value is not None and 'value' not in already_processed:4472            already_processed.append('value')4473            showIndent(outfile, level)4474            outfile.write('value = "%s",\n' % (self.value,))4475        super(TextWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4476    def exportLiteralChildren(self, outfile, level, name_):4477        super(TextWidgetStep, self).exportLiteralChildren(outfile, level, name_)4478        pass4479    def build(self, node):4480        self.buildAttributes(node, node.attrib, [])4481        for child in node:4482            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4483            self.buildChildren(child, node, nodeName_)4484    def buildAttributes(self, node, attrs, already_processed):4485        value = find_attr_value_('value', node)4486        if value is not None and 'value' not in already_processed:4487            already_processed.append('value')4488            self.value = value4489        super(TextWidgetStep, self).buildAttributes(node, attrs, already_processed)4490    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4491        super(TextWidgetStep, self).buildChildren(child_, node, nodeName_, True)4492        pass4493# end class TextWidgetStep4494class SliderWidgetStep(WidgetStep):4495    subclass = None4496    superclass = WidgetStep4497    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, value=None):4498        super(SliderWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)4499        self.value = _cast(float, value)4500        pass4501    def factory(*args_, **kwargs_):4502        if SliderWidgetStep.subclass:4503            return SliderWidgetStep.subclass(*args_, **kwargs_)4504        else:4505            return SliderWidgetStep(*args_, **kwargs_)4506    factory = staticmethod(factory)4507    def get_value(self): return self.value4508    def set_value(self, value): self.value = value4509    def export(self, outfile, level, namespace_='mstns:', name_='SliderWidgetStep', namespacedef_=''):4510        showIndent(outfile, level)4511        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4512        already_processed = []4513        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SliderWidgetStep')4514        if self.hasContent_():4515            outfile.write('>\n')4516            self.exportChildren(outfile, level + 1, namespace_, name_)4517            outfile.write('</%s%s>\n' % (namespace_, name_))4518        else:4519            outfile.write('/>\n')4520    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SliderWidgetStep'):4521        super(SliderWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SliderWidgetStep')4522        if self.value is not None and 'value' not in already_processed:4523            already_processed.append('value')4524            outfile.write(' value="%s"' % self.gds_format_float(self.value, input_name='value'))4525    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SliderWidgetStep', fromsubclass_=False):4526        super(SliderWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)4527        pass4528    def hasContent_(self):4529        if (4530            super(SliderWidgetStep, self).hasContent_()4531            ):4532            return True4533        else:4534            return False4535    def exportLiteral(self, outfile, level, name_='SliderWidgetStep'):4536        level += 14537        self.exportLiteralAttributes(outfile, level, [], name_)4538        if self.hasContent_():4539            self.exportLiteralChildren(outfile, level, name_)4540    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4541        if self.value is not None and 'value' not in already_processed:4542            already_processed.append('value')4543            showIndent(outfile, level)4544            outfile.write('value = %f,\n' % (self.value,))4545        super(SliderWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4546    def exportLiteralChildren(self, outfile, level, name_):4547        super(SliderWidgetStep, self).exportLiteralChildren(outfile, level, name_)4548        pass4549    def build(self, node):4550        self.buildAttributes(node, node.attrib, [])4551        for child in node:4552            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4553            self.buildChildren(child, node, nodeName_)4554    def buildAttributes(self, node, attrs, already_processed):4555        value = find_attr_value_('value', node)4556        if value is not None and 'value' not in already_processed:4557            already_processed.append('value')4558            try:4559                self.value = float(value)4560            except ValueError, exp:4561                raise ValueError('Bad float/double attribute (value): %s' % exp)4562        super(SliderWidgetStep, self).buildAttributes(node, attrs, already_processed)4563    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4564        super(SliderWidgetStep, self).buildChildren(child_, node, nodeName_, True)4565        pass4566# end class SliderWidgetStep4567class RangeSliderWidgetStep(WidgetStep):4568    subclass = None4569    superclass = WidgetStep4570    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, value=None):4571        super(RangeSliderWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)4572        if value is None:4573            self.value = []4574        else:4575            self.value = value4576    def factory(*args_, **kwargs_):4577        if RangeSliderWidgetStep.subclass:4578            return RangeSliderWidgetStep.subclass(*args_, **kwargs_)4579        else:4580            return RangeSliderWidgetStep(*args_, **kwargs_)4581    factory = staticmethod(factory)4582    def get_value(self): return self.value4583    def set_value(self, value): self.value = value4584    def add_value(self, value): self.value.append(value)4585    def insert_value(self, index, value): self.value[index] = value4586    def export(self, outfile, level, namespace_='mstns:', name_='RangeSliderWidgetStep', namespacedef_=''):4587        showIndent(outfile, level)4588        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4589        already_processed = []4590        self.exportAttributes(outfile, level, already_processed, namespace_, name_='RangeSliderWidgetStep')4591        if self.hasContent_():4592            outfile.write('>\n')4593            self.exportChildren(outfile, level + 1, namespace_, name_)4594            showIndent(outfile, level)4595            outfile.write('</%s%s>\n' % (namespace_, name_))4596        else:4597            outfile.write('/>\n')4598    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='RangeSliderWidgetStep'):4599        super(RangeSliderWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RangeSliderWidgetStep')4600    def exportChildren(self, outfile, level, namespace_='mstns:', name_='RangeSliderWidgetStep', fromsubclass_=False):4601        super(RangeSliderWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)4602        for value_ in self.value:4603            value_.export(outfile, level, namespace_, name_='value')4604    def hasContent_(self):4605        if (4606            self.value or4607            super(RangeSliderWidgetStep, self).hasContent_()4608            ):4609            return True4610        else:4611            return False4612    def exportLiteral(self, outfile, level, name_='RangeSliderWidgetStep'):4613        level += 14614        self.exportLiteralAttributes(outfile, level, [], name_)4615        if self.hasContent_():4616            self.exportLiteralChildren(outfile, level, name_)4617    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4618        super(RangeSliderWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4619    def exportLiteralChildren(self, outfile, level, name_):4620        super(RangeSliderWidgetStep, self).exportLiteralChildren(outfile, level, name_)4621        showIndent(outfile, level)4622        outfile.write('value=[\n')4623        level += 14624        for value_ in self.value:4625            showIndent(outfile, level)4626            outfile.write('model_.FloatValue(\n')4627            value_.exportLiteral(outfile, level, name_='FloatValue')4628            showIndent(outfile, level)4629            outfile.write('),\n')4630        level -= 14631        showIndent(outfile, level)4632        outfile.write('],\n')4633    def build(self, node):4634        self.buildAttributes(node, node.attrib, [])4635        for child in node:4636            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4637            self.buildChildren(child, node, nodeName_)4638    def buildAttributes(self, node, attrs, already_processed):4639        super(RangeSliderWidgetStep, self).buildAttributes(node, attrs, already_processed)4640    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4641        if nodeName_ == 'value':4642            obj_ = FloatValue.factory()4643            obj_.build(child_)4644            self.value.append(obj_)4645        super(RangeSliderWidgetStep, self).buildChildren(child_, node, nodeName_, True)4646# end class RangeSliderWidgetStep4647class PhotoUploadWidgetStep(WidgetStep):4648    subclass = None4649    superclass = WidgetStep4650    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, value=None):4651        super(PhotoUploadWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)4652        self.value = _cast(None, value)4653        pass4654    def factory(*args_, **kwargs_):4655        if PhotoUploadWidgetStep.subclass:4656            return PhotoUploadWidgetStep.subclass(*args_, **kwargs_)4657        else:4658            return PhotoUploadWidgetStep(*args_, **kwargs_)4659    factory = staticmethod(factory)4660    def get_value(self): return self.value4661    def set_value(self, value): self.value = value4662    def export(self, outfile, level, namespace_='mstns:', name_='PhotoUploadWidgetStep', namespacedef_=''):4663        showIndent(outfile, level)4664        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4665        already_processed = []4666        self.exportAttributes(outfile, level, already_processed, namespace_, name_='PhotoUploadWidgetStep')4667        if self.hasContent_():4668            outfile.write('>\n')4669            self.exportChildren(outfile, level + 1, namespace_, name_)4670            outfile.write('</%s%s>\n' % (namespace_, name_))4671        else:4672            outfile.write('/>\n')4673    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='PhotoUploadWidgetStep'):4674        super(PhotoUploadWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='PhotoUploadWidgetStep')4675        if self.value is not None and 'value' not in already_processed:4676            already_processed.append('value')4677            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))4678    def exportChildren(self, outfile, level, namespace_='mstns:', name_='PhotoUploadWidgetStep', fromsubclass_=False):4679        super(PhotoUploadWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)4680        pass4681    def hasContent_(self):4682        if (4683            super(PhotoUploadWidgetStep, self).hasContent_()4684            ):4685            return True4686        else:4687            return False4688    def exportLiteral(self, outfile, level, name_='PhotoUploadWidgetStep'):4689        level += 14690        self.exportLiteralAttributes(outfile, level, [], name_)4691        if self.hasContent_():4692            self.exportLiteralChildren(outfile, level, name_)4693    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4694        if self.value is not None and 'value' not in already_processed:4695            already_processed.append('value')4696            showIndent(outfile, level)4697            outfile.write('value = "%s",\n' % (self.value,))4698        super(PhotoUploadWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4699    def exportLiteralChildren(self, outfile, level, name_):4700        super(PhotoUploadWidgetStep, self).exportLiteralChildren(outfile, level, name_)4701        pass4702    def build(self, node):4703        self.buildAttributes(node, node.attrib, [])4704        for child in node:4705            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4706            self.buildChildren(child, node, nodeName_)4707    def buildAttributes(self, node, attrs, already_processed):4708        value = find_attr_value_('value', node)4709        if value is not None and 'value' not in already_processed:4710            already_processed.append('value')4711            self.value = value4712        super(PhotoUploadWidgetStep, self).buildAttributes(node, attrs, already_processed)4713    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4714        super(PhotoUploadWidgetStep, self).buildChildren(child_, node, nodeName_, True)4715        pass4716# end class PhotoUploadWidgetStep4717class GPSLocationWidgetStep(WidgetStep):4718    subclass = None4719    superclass = WidgetStep4720    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, timestamp=None, altitude=None, longitude=None, horizontalAccuracy=None, latitude=None, verticalAccuracy=None):4721        super(GPSLocationWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)4722        self.timestamp = _cast(int, timestamp)4723        self.altitude = _cast(float, altitude)4724        self.longitude = _cast(float, longitude)4725        self.horizontalAccuracy = _cast(float, horizontalAccuracy)4726        self.latitude = _cast(float, latitude)4727        self.verticalAccuracy = _cast(float, verticalAccuracy)4728        pass4729    def factory(*args_, **kwargs_):4730        if GPSLocationWidgetStep.subclass:4731            return GPSLocationWidgetStep.subclass(*args_, **kwargs_)4732        else:4733            return GPSLocationWidgetStep(*args_, **kwargs_)4734    factory = staticmethod(factory)4735    def get_timestamp(self): return self.timestamp4736    def set_timestamp(self, timestamp): self.timestamp = timestamp4737    def get_altitude(self): return self.altitude4738    def set_altitude(self, altitude): self.altitude = altitude4739    def get_longitude(self): return self.longitude4740    def set_longitude(self, longitude): self.longitude = longitude4741    def get_horizontalAccuracy(self): return self.horizontalAccuracy4742    def set_horizontalAccuracy(self, horizontalAccuracy): self.horizontalAccuracy = horizontalAccuracy4743    def get_latitude(self): return self.latitude4744    def set_latitude(self, latitude): self.latitude = latitude4745    def get_verticalAccuracy(self): return self.verticalAccuracy4746    def set_verticalAccuracy(self, verticalAccuracy): self.verticalAccuracy = verticalAccuracy4747    def export(self, outfile, level, namespace_='mstns:', name_='GPSLocationWidgetStep', namespacedef_=''):4748        showIndent(outfile, level)4749        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4750        already_processed = []4751        self.exportAttributes(outfile, level, already_processed, namespace_, name_='GPSLocationWidgetStep')4752        if self.hasContent_():4753            outfile.write('>\n')4754            self.exportChildren(outfile, level + 1, namespace_, name_)4755            outfile.write('</%s%s>\n' % (namespace_, name_))4756        else:4757            outfile.write('/>\n')4758    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='GPSLocationWidgetStep'):4759        super(GPSLocationWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='GPSLocationWidgetStep')4760        if self.timestamp is not None and 'timestamp' not in already_processed:4761            already_processed.append('timestamp')4762            outfile.write(' timestamp="%s"' % self.gds_format_integer(self.timestamp, input_name='timestamp'))4763        if self.altitude is not None and 'altitude' not in already_processed:4764            already_processed.append('altitude')4765            outfile.write(' altitude="%s"' % self.gds_format_float(self.altitude, input_name='altitude'))4766        if self.longitude is not None and 'longitude' not in already_processed:4767            already_processed.append('longitude')4768            outfile.write(' longitude="%s"' % self.gds_format_float(self.longitude, input_name='longitude'))4769        if self.horizontalAccuracy is not None and 'horizontalAccuracy' not in already_processed:4770            already_processed.append('horizontalAccuracy')4771            outfile.write(' horizontalAccuracy="%s"' % self.gds_format_float(self.horizontalAccuracy, input_name='horizontalAccuracy'))4772        if self.latitude is not None and 'latitude' not in already_processed:4773            already_processed.append('latitude')4774            outfile.write(' latitude="%s"' % self.gds_format_float(self.latitude, input_name='latitude'))4775        if self.verticalAccuracy is not None and 'verticalAccuracy' not in already_processed:4776            already_processed.append('verticalAccuracy')4777            outfile.write(' verticalAccuracy="%s"' % self.gds_format_float(self.verticalAccuracy, input_name='verticalAccuracy'))4778    def exportChildren(self, outfile, level, namespace_='mstns:', name_='GPSLocationWidgetStep', fromsubclass_=False):4779        super(GPSLocationWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)4780        pass4781    def hasContent_(self):4782        if (4783            super(GPSLocationWidgetStep, self).hasContent_()4784            ):4785            return True4786        else:4787            return False4788    def exportLiteral(self, outfile, level, name_='GPSLocationWidgetStep'):4789        level += 14790        self.exportLiteralAttributes(outfile, level, [], name_)4791        if self.hasContent_():4792            self.exportLiteralChildren(outfile, level, name_)4793    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4794        if self.timestamp is not None and 'timestamp' not in already_processed:4795            already_processed.append('timestamp')4796            showIndent(outfile, level)4797            outfile.write('timestamp = %d,\n' % (self.timestamp,))4798        if self.altitude is not None and 'altitude' not in already_processed:4799            already_processed.append('altitude')4800            showIndent(outfile, level)4801            outfile.write('altitude = %f,\n' % (self.altitude,))4802        if self.longitude is not None and 'longitude' not in already_processed:4803            already_processed.append('longitude')4804            showIndent(outfile, level)4805            outfile.write('longitude = %f,\n' % (self.longitude,))4806        if self.horizontalAccuracy is not None and 'horizontalAccuracy' not in already_processed:4807            already_processed.append('horizontalAccuracy')4808            showIndent(outfile, level)4809            outfile.write('horizontalAccuracy = %f,\n' % (self.horizontalAccuracy,))4810        if self.latitude is not None and 'latitude' not in already_processed:4811            already_processed.append('latitude')4812            showIndent(outfile, level)4813            outfile.write('latitude = %f,\n' % (self.latitude,))4814        if self.verticalAccuracy is not None and 'verticalAccuracy' not in already_processed:4815            already_processed.append('verticalAccuracy')4816            showIndent(outfile, level)4817            outfile.write('verticalAccuracy = %f,\n' % (self.verticalAccuracy,))4818        super(GPSLocationWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)4819    def exportLiteralChildren(self, outfile, level, name_):4820        super(GPSLocationWidgetStep, self).exportLiteralChildren(outfile, level, name_)4821        pass4822    def build(self, node):4823        self.buildAttributes(node, node.attrib, [])4824        for child in node:4825            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4826            self.buildChildren(child, node, nodeName_)4827    def buildAttributes(self, node, attrs, already_processed):4828        value = find_attr_value_('timestamp', node)4829        if value is not None and 'timestamp' not in already_processed:4830            already_processed.append('timestamp')4831            try:4832                self.timestamp = int(value)4833            except ValueError, exp:4834                raise_parse_error(node, 'Bad integer attribute: %s' % exp)4835        value = find_attr_value_('altitude', node)4836        if value is not None and 'altitude' not in already_processed:4837            already_processed.append('altitude')4838            try:4839                self.altitude = float(value)4840            except ValueError, exp:4841                raise ValueError('Bad float/double attribute (altitude): %s' % exp)4842        value = find_attr_value_('longitude', node)4843        if value is not None and 'longitude' not in already_processed:4844            already_processed.append('longitude')4845            try:4846                self.longitude = float(value)4847            except ValueError, exp:4848                raise ValueError('Bad float/double attribute (longitude): %s' % exp)4849        value = find_attr_value_('horizontalAccuracy', node)4850        if value is not None and 'horizontalAccuracy' not in already_processed:4851            already_processed.append('horizontalAccuracy')4852            try:4853                self.horizontalAccuracy = float(value)4854            except ValueError, exp:4855                raise ValueError('Bad float/double attribute (horizontalAccuracy): %s' % exp)4856        value = find_attr_value_('latitude', node)4857        if value is not None and 'latitude' not in already_processed:4858            already_processed.append('latitude')4859            try:4860                self.latitude = float(value)4861            except ValueError, exp:4862                raise ValueError('Bad float/double attribute (latitude): %s' % exp)4863        value = find_attr_value_('verticalAccuracy', node)4864        if value is not None and 'verticalAccuracy' not in already_processed:4865            already_processed.append('verticalAccuracy')4866            try:4867                self.verticalAccuracy = float(value)4868            except ValueError, exp:4869                raise ValueError('Bad float/double attribute (verticalAccuracy): %s' % exp)4870        super(GPSLocationWidgetStep, self).buildAttributes(node, attrs, already_processed)4871    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):4872        super(GPSLocationWidgetStep, self).buildChildren(child_, node, nodeName_, True)4873        pass4874# end class GPSLocationWidgetStep4875class MyDigiPassEidProfile(GeneratedsSuper):4876    subclass = None4877    superclass = None4878    def __init__(self, locationOfBirth=None, validityEndsAt=None, firstName=None, chipNumber=None, lastName=None, nobleCondition=None, validityBeginsAt=None, dateOfBirth=None, cardNumber=None, firstName3=None, gender=None, nationality=None, createdAt=None, issuingMunicipality=None):4879        self.locationOfBirth = _cast(None, locationOfBirth)4880        self.validityEndsAt = _cast(None, validityEndsAt)4881        self.firstName = _cast(None, firstName)4882        self.chipNumber = _cast(None, chipNumber)4883        self.lastName = _cast(None, lastName)4884        self.nobleCondition = _cast(None, nobleCondition)4885        self.validityBeginsAt = _cast(None, validityBeginsAt)4886        self.dateOfBirth = _cast(None, dateOfBirth)4887        self.cardNumber = _cast(None, cardNumber)4888        self.firstName3 = _cast(None, firstName3)4889        self.gender = _cast(None, gender)4890        self.nationality = _cast(None, nationality)4891        self.createdAt = _cast(None, createdAt)4892        self.issuingMunicipality = _cast(None, issuingMunicipality)4893        pass4894    def factory(*args_, **kwargs_):4895        if MyDigiPassEidProfile.subclass:4896            return MyDigiPassEidProfile.subclass(*args_, **kwargs_)4897        else:4898            return MyDigiPassEidProfile(*args_, **kwargs_)4899    factory = staticmethod(factory)4900    def get_locationOfBirth(self): return self.locationOfBirth4901    def set_locationOfBirth(self, locationOfBirth): self.locationOfBirth = locationOfBirth4902    def get_validityEndsAt(self): return self.validityEndsAt4903    def set_validityEndsAt(self, validityEndsAt): self.validityEndsAt = validityEndsAt4904    def get_firstName(self): return self.firstName4905    def set_firstName(self, firstName): self.firstName = firstName4906    def get_chipNumber(self): return self.chipNumber4907    def set_chipNumber(self, chipNumber): self.chipNumber = chipNumber4908    def get_lastName(self): return self.lastName4909    def set_lastName(self, lastName): self.lastName = lastName4910    def get_nobleCondition(self): return self.nobleCondition4911    def set_nobleCondition(self, nobleCondition): self.nobleCondition = nobleCondition4912    def get_validityBeginsAt(self): return self.validityBeginsAt4913    def set_validityBeginsAt(self, validityBeginsAt): self.validityBeginsAt = validityBeginsAt4914    def get_dateOfBirth(self): return self.dateOfBirth4915    def set_dateOfBirth(self, dateOfBirth): self.dateOfBirth = dateOfBirth4916    def get_cardNumber(self): return self.cardNumber4917    def set_cardNumber(self, cardNumber): self.cardNumber = cardNumber4918    def get_firstName3(self): return self.firstName34919    def set_firstName3(self, firstName3): self.firstName3 = firstName34920    def get_gender(self): return self.gender4921    def set_gender(self, gender): self.gender = gender4922    def get_nationality(self): return self.nationality4923    def set_nationality(self, nationality): self.nationality = nationality4924    def get_createdAt(self): return self.createdAt4925    def set_createdAt(self, createdAt): self.createdAt = createdAt4926    def get_issuingMunicipality(self): return self.issuingMunicipality4927    def set_issuingMunicipality(self, issuingMunicipality): self.issuingMunicipality = issuingMunicipality4928    def export(self, outfile, level, namespace_='mstns:', name_='MyDigiPassEidProfile', namespacedef_=''):4929        showIndent(outfile, level)4930        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))4931        already_processed = []4932        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassEidProfile')4933        if self.hasContent_():4934            outfile.write('>\n')4935            self.exportChildren(outfile, level + 1, namespace_, name_)4936            outfile.write('</%s%s>\n' % (namespace_, name_))4937        else:4938            outfile.write('/>\n')4939    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MyDigiPassEidProfile'):4940        if self.locationOfBirth is not None and 'locationOfBirth' not in already_processed:4941            already_processed.append('locationOfBirth')4942            outfile.write(' locationOfBirth=%s' % (self.gds_format_string(quote_attrib(self.locationOfBirth).encode(ExternalEncoding), input_name='locationOfBirth'),))4943        if self.validityEndsAt is not None and 'validityEndsAt' not in already_processed:4944            already_processed.append('validityEndsAt')4945            outfile.write(' validityEndsAt=%s' % (self.gds_format_string(quote_attrib(self.validityEndsAt).encode(ExternalEncoding), input_name='validityEndsAt'),))4946        if self.firstName is not None and 'firstName' not in already_processed:4947            already_processed.append('firstName')4948            outfile.write(' firstName=%s' % (self.gds_format_string(quote_attrib(self.firstName).encode(ExternalEncoding), input_name='firstName'),))4949        if self.chipNumber is not None and 'chipNumber' not in already_processed:4950            already_processed.append('chipNumber')4951            outfile.write(' chipNumber=%s' % (self.gds_format_string(quote_attrib(self.chipNumber).encode(ExternalEncoding), input_name='chipNumber'),))4952        if self.lastName is not None and 'lastName' not in already_processed:4953            already_processed.append('lastName')4954            outfile.write(' lastName=%s' % (self.gds_format_string(quote_attrib(self.lastName).encode(ExternalEncoding), input_name='lastName'),))4955        if self.nobleCondition is not None and 'nobleCondition' not in already_processed:4956            already_processed.append('nobleCondition')4957            outfile.write(' nobleCondition=%s' % (self.gds_format_string(quote_attrib(self.nobleCondition).encode(ExternalEncoding), input_name='nobleCondition'),))4958        if self.validityBeginsAt is not None and 'validityBeginsAt' not in already_processed:4959            already_processed.append('validityBeginsAt')4960            outfile.write(' validityBeginsAt=%s' % (self.gds_format_string(quote_attrib(self.validityBeginsAt).encode(ExternalEncoding), input_name='validityBeginsAt'),))4961        if self.dateOfBirth is not None and 'dateOfBirth' not in already_processed:4962            already_processed.append('dateOfBirth')4963            outfile.write(' dateOfBirth=%s' % (self.gds_format_string(quote_attrib(self.dateOfBirth).encode(ExternalEncoding), input_name='dateOfBirth'),))4964        if self.cardNumber is not None and 'cardNumber' not in already_processed:4965            already_processed.append('cardNumber')4966            outfile.write(' cardNumber=%s' % (self.gds_format_string(quote_attrib(self.cardNumber).encode(ExternalEncoding), input_name='cardNumber'),))4967        if self.firstName3 is not None and 'firstName3' not in already_processed:4968            already_processed.append('firstName3')4969            outfile.write(' firstName3=%s' % (self.gds_format_string(quote_attrib(self.firstName3).encode(ExternalEncoding), input_name='firstName3'),))4970        if self.gender is not None and 'gender' not in already_processed:4971            already_processed.append('gender')4972            outfile.write(' gender=%s' % (self.gds_format_string(quote_attrib(self.gender).encode(ExternalEncoding), input_name='gender'),))4973        if self.nationality is not None and 'nationality' not in already_processed:4974            already_processed.append('nationality')4975            outfile.write(' nationality=%s' % (self.gds_format_string(quote_attrib(self.nationality).encode(ExternalEncoding), input_name='nationality'),))4976        if self.createdAt is not None and 'createdAt' not in already_processed:4977            already_processed.append('createdAt')4978            outfile.write(' createdAt=%s' % (self.gds_format_string(quote_attrib(self.createdAt).encode(ExternalEncoding), input_name='createdAt'),))4979        if self.issuingMunicipality is not None and 'issuingMunicipality' not in already_processed:4980            already_processed.append('issuingMunicipality')4981            outfile.write(' issuingMunicipality=%s' % (self.gds_format_string(quote_attrib(self.issuingMunicipality).encode(ExternalEncoding), input_name='issuingMunicipality'),))4982    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MyDigiPassEidProfile', fromsubclass_=False):4983        pass4984    def hasContent_(self):4985        if (4986            ):4987            return True4988        else:4989            return False4990    def exportLiteral(self, outfile, level, name_='MyDigiPassEidProfile'):4991        level += 14992        self.exportLiteralAttributes(outfile, level, [], name_)4993        if self.hasContent_():4994            self.exportLiteralChildren(outfile, level, name_)4995    def exportLiteralAttributes(self, outfile, level, already_processed, name_):4996        if self.locationOfBirth is not None and 'locationOfBirth' not in already_processed:4997            already_processed.append('locationOfBirth')4998            showIndent(outfile, level)4999            outfile.write('locationOfBirth = "%s",\n' % (self.locationOfBirth,))5000        if self.validityEndsAt is not None and 'validityEndsAt' not in already_processed:5001            already_processed.append('validityEndsAt')5002            showIndent(outfile, level)5003            outfile.write('validityEndsAt = "%s",\n' % (self.validityEndsAt,))5004        if self.firstName is not None and 'firstName' not in already_processed:5005            already_processed.append('firstName')5006            showIndent(outfile, level)5007            outfile.write('firstName = "%s",\n' % (self.firstName,))5008        if self.chipNumber is not None and 'chipNumber' not in already_processed:5009            already_processed.append('chipNumber')5010            showIndent(outfile, level)5011            outfile.write('chipNumber = "%s",\n' % (self.chipNumber,))5012        if self.lastName is not None and 'lastName' not in already_processed:5013            already_processed.append('lastName')5014            showIndent(outfile, level)5015            outfile.write('lastName = "%s",\n' % (self.lastName,))5016        if self.nobleCondition is not None and 'nobleCondition' not in already_processed:5017            already_processed.append('nobleCondition')5018            showIndent(outfile, level)5019            outfile.write('nobleCondition = "%s",\n' % (self.nobleCondition,))5020        if self.validityBeginsAt is not None and 'validityBeginsAt' not in already_processed:5021            already_processed.append('validityBeginsAt')5022            showIndent(outfile, level)5023            outfile.write('validityBeginsAt = "%s",\n' % (self.validityBeginsAt,))5024        if self.dateOfBirth is not None and 'dateOfBirth' not in already_processed:5025            already_processed.append('dateOfBirth')5026            showIndent(outfile, level)5027            outfile.write('dateOfBirth = "%s",\n' % (self.dateOfBirth,))5028        if self.cardNumber is not None and 'cardNumber' not in already_processed:5029            already_processed.append('cardNumber')5030            showIndent(outfile, level)5031            outfile.write('cardNumber = "%s",\n' % (self.cardNumber,))5032        if self.firstName3 is not None and 'firstName3' not in already_processed:5033            already_processed.append('firstName3')5034            showIndent(outfile, level)5035            outfile.write('firstName3 = "%s",\n' % (self.firstName3,))5036        if self.gender is not None and 'gender' not in already_processed:5037            already_processed.append('gender')5038            showIndent(outfile, level)5039            outfile.write('gender = "%s",\n' % (self.gender,))5040        if self.nationality is not None and 'nationality' not in already_processed:5041            already_processed.append('nationality')5042            showIndent(outfile, level)5043            outfile.write('nationality = "%s",\n' % (self.nationality,))5044        if self.createdAt is not None and 'createdAt' not in already_processed:5045            already_processed.append('createdAt')5046            showIndent(outfile, level)5047            outfile.write('createdAt = "%s",\n' % (self.createdAt,))5048        if self.issuingMunicipality is not None and 'issuingMunicipality' not in already_processed:5049            already_processed.append('issuingMunicipality')5050            showIndent(outfile, level)5051            outfile.write('issuingMunicipality = "%s",\n' % (self.issuingMunicipality,))5052    def exportLiteralChildren(self, outfile, level, name_):5053        pass5054    def build(self, node):5055        self.buildAttributes(node, node.attrib, [])5056        for child in node:5057            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5058            self.buildChildren(child, node, nodeName_)5059    def buildAttributes(self, node, attrs, already_processed):5060        value = find_attr_value_('locationOfBirth', node)5061        if value is not None and 'locationOfBirth' not in already_processed:5062            already_processed.append('locationOfBirth')5063            self.locationOfBirth = value5064        value = find_attr_value_('validityEndsAt', node)5065        if value is not None and 'validityEndsAt' not in already_processed:5066            already_processed.append('validityEndsAt')5067            self.validityEndsAt = value5068        value = find_attr_value_('firstName', node)5069        if value is not None and 'firstName' not in already_processed:5070            already_processed.append('firstName')5071            self.firstName = value5072        value = find_attr_value_('chipNumber', node)5073        if value is not None and 'chipNumber' not in already_processed:5074            already_processed.append('chipNumber')5075            self.chipNumber = value5076        value = find_attr_value_('lastName', node)5077        if value is not None and 'lastName' not in already_processed:5078            already_processed.append('lastName')5079            self.lastName = value5080        value = find_attr_value_('nobleCondition', node)5081        if value is not None and 'nobleCondition' not in already_processed:5082            already_processed.append('nobleCondition')5083            self.nobleCondition = value5084        value = find_attr_value_('validityBeginsAt', node)5085        if value is not None and 'validityBeginsAt' not in already_processed:5086            already_processed.append('validityBeginsAt')5087            self.validityBeginsAt = value5088        value = find_attr_value_('dateOfBirth', node)5089        if value is not None and 'dateOfBirth' not in already_processed:5090            already_processed.append('dateOfBirth')5091            self.dateOfBirth = value5092        value = find_attr_value_('cardNumber', node)5093        if value is not None and 'cardNumber' not in already_processed:5094            already_processed.append('cardNumber')5095            self.cardNumber = value5096        value = find_attr_value_('firstName3', node)5097        if value is not None and 'firstName3' not in already_processed:5098            already_processed.append('firstName3')5099            self.firstName3 = value5100        value = find_attr_value_('gender', node)5101        if value is not None and 'gender' not in already_processed:5102            already_processed.append('gender')5103            self.gender = value5104        value = find_attr_value_('nationality', node)5105        if value is not None and 'nationality' not in already_processed:5106            already_processed.append('nationality')5107            self.nationality = value5108        value = find_attr_value_('createdAt', node)5109        if value is not None and 'createdAt' not in already_processed:5110            already_processed.append('createdAt')5111            self.createdAt = value5112        value = find_attr_value_('issuingMunicipality', node)5113        if value is not None and 'issuingMunicipality' not in already_processed:5114            already_processed.append('issuingMunicipality')5115            self.issuingMunicipality = value5116    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5117        pass5118# end class MyDigiPassEidProfile5119class MyDigiPassEidAddress(GeneratedsSuper):5120    subclass = None5121    superclass = None5122    def __init__(self, municipality=None, streetAndNumber=None, zipCode=None):5123        self.municipality = _cast(None, municipality)5124        self.streetAndNumber = _cast(None, streetAndNumber)5125        self.zipCode = _cast(None, zipCode)5126        pass5127    def factory(*args_, **kwargs_):5128        if MyDigiPassEidAddress.subclass:5129            return MyDigiPassEidAddress.subclass(*args_, **kwargs_)5130        else:5131            return MyDigiPassEidAddress(*args_, **kwargs_)5132    factory = staticmethod(factory)5133    def get_municipality(self): return self.municipality5134    def set_municipality(self, municipality): self.municipality = municipality5135    def get_streetAndNumber(self): return self.streetAndNumber5136    def set_streetAndNumber(self, streetAndNumber): self.streetAndNumber = streetAndNumber5137    def get_zipCode(self): return self.zipCode5138    def set_zipCode(self, zipCode): self.zipCode = zipCode5139    def export(self, outfile, level, namespace_='mstns:', name_='MyDigiPassEidAddress', namespacedef_=''):5140        showIndent(outfile, level)5141        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5142        already_processed = []5143        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassEidAddress')5144        if self.hasContent_():5145            outfile.write('>\n')5146            self.exportChildren(outfile, level + 1, namespace_, name_)5147            outfile.write('</%s%s>\n' % (namespace_, name_))5148        else:5149            outfile.write('/>\n')5150    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MyDigiPassEidAddress'):5151        if self.municipality is not None and 'municipality' not in already_processed:5152            already_processed.append('municipality')5153            outfile.write(' municipality=%s' % (self.gds_format_string(quote_attrib(self.municipality).encode(ExternalEncoding), input_name='municipality'),))5154        if self.streetAndNumber is not None and 'streetAndNumber' not in already_processed:5155            already_processed.append('streetAndNumber')5156            outfile.write(' streetAndNumber=%s' % (self.gds_format_string(quote_attrib(self.streetAndNumber).encode(ExternalEncoding), input_name='streetAndNumber'),))5157        if self.zipCode is not None and 'zipCode' not in already_processed:5158            already_processed.append('zipCode')5159            outfile.write(' zipCode=%s' % (self.gds_format_string(quote_attrib(self.zipCode).encode(ExternalEncoding), input_name='zipCode'),))5160    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MyDigiPassEidAddress', fromsubclass_=False):5161        pass5162    def hasContent_(self):5163        if (5164            ):5165            return True5166        else:5167            return False5168    def exportLiteral(self, outfile, level, name_='MyDigiPassEidAddress'):5169        level += 15170        self.exportLiteralAttributes(outfile, level, [], name_)5171        if self.hasContent_():5172            self.exportLiteralChildren(outfile, level, name_)5173    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5174        if self.municipality is not None and 'municipality' not in already_processed:5175            already_processed.append('municipality')5176            showIndent(outfile, level)5177            outfile.write('municipality = "%s",\n' % (self.municipality,))5178        if self.streetAndNumber is not None and 'streetAndNumber' not in already_processed:5179            already_processed.append('streetAndNumber')5180            showIndent(outfile, level)5181            outfile.write('streetAndNumber = "%s",\n' % (self.streetAndNumber,))5182        if self.zipCode is not None and 'zipCode' not in already_processed:5183            already_processed.append('zipCode')5184            showIndent(outfile, level)5185            outfile.write('zipCode = "%s",\n' % (self.zipCode,))5186    def exportLiteralChildren(self, outfile, level, name_):5187        pass5188    def build(self, node):5189        self.buildAttributes(node, node.attrib, [])5190        for child in node:5191            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5192            self.buildChildren(child, node, nodeName_)5193    def buildAttributes(self, node, attrs, already_processed):5194        value = find_attr_value_('municipality', node)5195        if value is not None and 'municipality' not in already_processed:5196            already_processed.append('municipality')5197            self.municipality = value5198        value = find_attr_value_('streetAndNumber', node)5199        if value is not None and 'streetAndNumber' not in already_processed:5200            already_processed.append('streetAndNumber')5201            self.streetAndNumber = value5202        value = find_attr_value_('zipCode', node)5203        if value is not None and 'zipCode' not in already_processed:5204            already_processed.append('zipCode')5205            self.zipCode = value5206    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5207        pass5208# end class MyDigiPassEidAddress5209class MyDigiPassProfile(GeneratedsSuper):5210    subclass = None5211    superclass = None5212    def __init__(self, uuid=None, firstName=None, lastName=None, preferredLocale=None, updatedAt=None, bornOn=None):5213        self.uuid = _cast(None, uuid)5214        self.firstName = _cast(None, firstName)5215        self.lastName = _cast(None, lastName)5216        self.preferredLocale = _cast(None, preferredLocale)5217        self.updatedAt = _cast(None, updatedAt)5218        self.bornOn = _cast(None, bornOn)5219        pass5220    def factory(*args_, **kwargs_):5221        if MyDigiPassProfile.subclass:5222            return MyDigiPassProfile.subclass(*args_, **kwargs_)5223        else:5224            return MyDigiPassProfile(*args_, **kwargs_)5225    factory = staticmethod(factory)5226    def get_uuid(self): return self.uuid5227    def set_uuid(self, uuid): self.uuid = uuid5228    def get_firstName(self): return self.firstName5229    def set_firstName(self, firstName): self.firstName = firstName5230    def get_lastName(self): return self.lastName5231    def set_lastName(self, lastName): self.lastName = lastName5232    def get_preferredLocale(self): return self.preferredLocale5233    def set_preferredLocale(self, preferredLocale): self.preferredLocale = preferredLocale5234    def get_updatedAt(self): return self.updatedAt5235    def set_updatedAt(self, updatedAt): self.updatedAt = updatedAt5236    def get_bornOn(self): return self.bornOn5237    def set_bornOn(self, bornOn): self.bornOn = bornOn5238    def export(self, outfile, level, namespace_='mstns:', name_='MyDigiPassProfile', namespacedef_=''):5239        showIndent(outfile, level)5240        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5241        already_processed = []5242        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassProfile')5243        if self.hasContent_():5244            outfile.write('>\n')5245            self.exportChildren(outfile, level + 1, namespace_, name_)5246            outfile.write('</%s%s>\n' % (namespace_, name_))5247        else:5248            outfile.write('/>\n')5249    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MyDigiPassProfile'):5250        if self.uuid is not None and 'uuid' not in already_processed:5251            already_processed.append('uuid')5252            outfile.write(' uuid=%s' % (self.gds_format_string(quote_attrib(self.uuid).encode(ExternalEncoding), input_name='uuid'),))5253        if self.firstName is not None and 'firstName' not in already_processed:5254            already_processed.append('firstName')5255            outfile.write(' firstName=%s' % (self.gds_format_string(quote_attrib(self.firstName).encode(ExternalEncoding), input_name='firstName'),))5256        if self.lastName is not None and 'lastName' not in already_processed:5257            already_processed.append('lastName')5258            outfile.write(' lastName=%s' % (self.gds_format_string(quote_attrib(self.lastName).encode(ExternalEncoding), input_name='lastName'),))5259        if self.preferredLocale is not None and 'preferredLocale' not in already_processed:5260            already_processed.append('preferredLocale')5261            outfile.write(' preferredLocale=%s' % (self.gds_format_string(quote_attrib(self.preferredLocale).encode(ExternalEncoding), input_name='preferredLocale'),))5262        if self.updatedAt is not None and 'updatedAt' not in already_processed:5263            already_processed.append('updatedAt')5264            outfile.write(' updatedAt=%s' % (self.gds_format_string(quote_attrib(self.updatedAt).encode(ExternalEncoding), input_name='updatedAt'),))5265        if self.bornOn is not None and 'bornOn' not in already_processed:5266            already_processed.append('bornOn')5267            outfile.write(' bornOn=%s' % (self.gds_format_string(quote_attrib(self.bornOn).encode(ExternalEncoding), input_name='bornOn'),))5268    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MyDigiPassProfile', fromsubclass_=False):5269        pass5270    def hasContent_(self):5271        if (5272            ):5273            return True5274        else:5275            return False5276    def exportLiteral(self, outfile, level, name_='MyDigiPassProfile'):5277        level += 15278        self.exportLiteralAttributes(outfile, level, [], name_)5279        if self.hasContent_():5280            self.exportLiteralChildren(outfile, level, name_)5281    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5282        if self.uuid is not None and 'uuid' not in already_processed:5283            already_processed.append('uuid')5284            showIndent(outfile, level)5285            outfile.write('uuid = "%s",\n' % (self.uuid,))5286        if self.firstName is not None and 'firstName' not in already_processed:5287            already_processed.append('firstName')5288            showIndent(outfile, level)5289            outfile.write('firstName = "%s",\n' % (self.firstName,))5290        if self.lastName is not None and 'lastName' not in already_processed:5291            already_processed.append('lastName')5292            showIndent(outfile, level)5293            outfile.write('lastName = "%s",\n' % (self.lastName,))5294        if self.preferredLocale is not None and 'preferredLocale' not in already_processed:5295            already_processed.append('preferredLocale')5296            showIndent(outfile, level)5297            outfile.write('preferredLocale = "%s",\n' % (self.preferredLocale,))5298        if self.updatedAt is not None and 'updatedAt' not in already_processed:5299            already_processed.append('updatedAt')5300            showIndent(outfile, level)5301            outfile.write('updatedAt = "%s",\n' % (self.updatedAt,))5302        if self.bornOn is not None and 'bornOn' not in already_processed:5303            already_processed.append('bornOn')5304            showIndent(outfile, level)5305            outfile.write('bornOn = "%s",\n' % (self.bornOn,))5306    def exportLiteralChildren(self, outfile, level, name_):5307        pass5308    def build(self, node):5309        self.buildAttributes(node, node.attrib, [])5310        for child in node:5311            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5312            self.buildChildren(child, node, nodeName_)5313    def buildAttributes(self, node, attrs, already_processed):5314        value = find_attr_value_('uuid', node)5315        if value is not None and 'uuid' not in already_processed:5316            already_processed.append('uuid')5317            self.uuid = value5318        value = find_attr_value_('firstName', node)5319        if value is not None and 'firstName' not in already_processed:5320            already_processed.append('firstName')5321            self.firstName = value5322        value = find_attr_value_('lastName', node)5323        if value is not None and 'lastName' not in already_processed:5324            already_processed.append('lastName')5325            self.lastName = value5326        value = find_attr_value_('preferredLocale', node)5327        if value is not None and 'preferredLocale' not in already_processed:5328            already_processed.append('preferredLocale')5329            self.preferredLocale = value5330        value = find_attr_value_('updatedAt', node)5331        if value is not None and 'updatedAt' not in already_processed:5332            already_processed.append('updatedAt')5333            self.updatedAt = value5334        value = find_attr_value_('bornOn', node)5335        if value is not None and 'bornOn' not in already_processed:5336            already_processed.append('bornOn')5337            self.bornOn = value5338    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5339        pass5340# end class MyDigiPassProfile5341class MyDigiPassAddress(GeneratedsSuper):5342    subclass = None5343    superclass = None5344    def __init__(self, city=None, zip=None, address1=None, address2=None, state=None, country=None):5345        self.city = _cast(None, city)5346        self.zip = _cast(None, zip)5347        self.address1 = _cast(None, address1)5348        self.address2 = _cast(None, address2)5349        self.state = _cast(None, state)5350        self.country = _cast(None, country)5351        pass5352    def factory(*args_, **kwargs_):5353        if MyDigiPassAddress.subclass:5354            return MyDigiPassAddress.subclass(*args_, **kwargs_)5355        else:5356            return MyDigiPassAddress(*args_, **kwargs_)5357    factory = staticmethod(factory)5358    def get_city(self): return self.city5359    def set_city(self, city): self.city = city5360    def get_zip(self): return self.zip5361    def set_zip(self, zip): self.zip = zip5362    def get_address1(self): return self.address15363    def set_address1(self, address1): self.address1 = address15364    def get_address2(self): return self.address25365    def set_address2(self, address2): self.address2 = address25366    def get_state(self): return self.state5367    def set_state(self, state): self.state = state5368    def get_country(self): return self.country5369    def set_country(self, country): self.country = country5370    def export(self, outfile, level, namespace_='mstns:', name_='MyDigiPassAddress', namespacedef_=''):5371        showIndent(outfile, level)5372        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5373        already_processed = []5374        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassAddress')5375        if self.hasContent_():5376            outfile.write('>\n')5377            self.exportChildren(outfile, level + 1, namespace_, name_)5378            outfile.write('</%s%s>\n' % (namespace_, name_))5379        else:5380            outfile.write('/>\n')5381    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MyDigiPassAddress'):5382        if self.city is not None and 'city' not in already_processed:5383            already_processed.append('city')5384            outfile.write(' city=%s' % (self.gds_format_string(quote_attrib(self.city).encode(ExternalEncoding), input_name='city'),))5385        if self.zip is not None and 'zip' not in already_processed:5386            already_processed.append('zip')5387            outfile.write(' zip=%s' % (self.gds_format_string(quote_attrib(self.zip).encode(ExternalEncoding), input_name='zip'),))5388        if self.address1 is not None and 'address1' not in already_processed:5389            already_processed.append('address1')5390            outfile.write(' address1=%s' % (self.gds_format_string(quote_attrib(self.address1).encode(ExternalEncoding), input_name='address1'),))5391        if self.address2 is not None and 'address2' not in already_processed:5392            already_processed.append('address2')5393            outfile.write(' address2=%s' % (self.gds_format_string(quote_attrib(self.address2).encode(ExternalEncoding), input_name='address2'),))5394        if self.state is not None and 'state' not in already_processed:5395            already_processed.append('state')5396            outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'),))5397        if self.country is not None and 'country' not in already_processed:5398            already_processed.append('country')5399            outfile.write(' country=%s' % (self.gds_format_string(quote_attrib(self.country).encode(ExternalEncoding), input_name='country'),))5400    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MyDigiPassAddress', fromsubclass_=False):5401        pass5402    def hasContent_(self):5403        if (5404            ):5405            return True5406        else:5407            return False5408    def exportLiteral(self, outfile, level, name_='MyDigiPassAddress'):5409        level += 15410        self.exportLiteralAttributes(outfile, level, [], name_)5411        if self.hasContent_():5412            self.exportLiteralChildren(outfile, level, name_)5413    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5414        if self.city is not None and 'city' not in already_processed:5415            already_processed.append('city')5416            showIndent(outfile, level)5417            outfile.write('city = "%s",\n' % (self.city,))5418        if self.zip is not None and 'zip' not in already_processed:5419            already_processed.append('zip')5420            showIndent(outfile, level)5421            outfile.write('zip = "%s",\n' % (self.zip,))5422        if self.address1 is not None and 'address1' not in already_processed:5423            already_processed.append('address1')5424            showIndent(outfile, level)5425            outfile.write('address1 = "%s",\n' % (self.address1,))5426        if self.address2 is not None and 'address2' not in already_processed:5427            already_processed.append('address2')5428            showIndent(outfile, level)5429            outfile.write('address2 = "%s",\n' % (self.address2,))5430        if self.state is not None and 'state' not in already_processed:5431            already_processed.append('state')5432            showIndent(outfile, level)5433            outfile.write('state = "%s",\n' % (self.state,))5434        if self.country is not None and 'country' not in already_processed:5435            already_processed.append('country')5436            showIndent(outfile, level)5437            outfile.write('country = "%s",\n' % (self.country,))5438    def exportLiteralChildren(self, outfile, level, name_):5439        pass5440    def build(self, node):5441        self.buildAttributes(node, node.attrib, [])5442        for child in node:5443            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5444            self.buildChildren(child, node, nodeName_)5445    def buildAttributes(self, node, attrs, already_processed):5446        value = find_attr_value_('city', node)5447        if value is not None and 'city' not in already_processed:5448            already_processed.append('city')5449            self.city = value5450        value = find_attr_value_('zip', node)5451        if value is not None and 'zip' not in already_processed:5452            already_processed.append('zip')5453            self.zip = value5454        value = find_attr_value_('address1', node)5455        if value is not None and 'address1' not in already_processed:5456            already_processed.append('address1')5457            self.address1 = value5458        value = find_attr_value_('address2', node)5459        if value is not None and 'address2' not in already_processed:5460            already_processed.append('address2')5461            self.address2 = value5462        value = find_attr_value_('state', node)5463        if value is not None and 'state' not in already_processed:5464            already_processed.append('state')5465            self.state = value5466        value = find_attr_value_('country', node)5467        if value is not None and 'country' not in already_processed:5468            already_processed.append('country')5469            self.country = value5470    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5471        pass5472# end class MyDigiPassAddress5473class MyDigiPassWidgetStep(WidgetStep):5474    subclass = None5475    superclass = WidgetStep5476    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, phone=None, email=None, eidPhoto=None, eidProfile=None, eidAddress=None, profile=None, address=None):5477        super(MyDigiPassWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)5478        self.phone = _cast(None, phone)5479        self.email = _cast(None, email)5480        self.eidPhoto = _cast(None, eidPhoto)5481        self.eidProfile = eidProfile5482        self.eidAddress = eidAddress5483        self.profile = profile5484        self.address = address5485    def factory(*args_, **kwargs_):5486        if MyDigiPassWidgetStep.subclass:5487            return MyDigiPassWidgetStep.subclass(*args_, **kwargs_)5488        else:5489            return MyDigiPassWidgetStep(*args_, **kwargs_)5490    factory = staticmethod(factory)5491    def get_eidProfile(self): return self.eidProfile5492    def set_eidProfile(self, eidProfile): self.eidProfile = eidProfile5493    def get_eidAddress(self): return self.eidAddress5494    def set_eidAddress(self, eidAddress): self.eidAddress = eidAddress5495    def get_profile(self): return self.profile5496    def set_profile(self, profile): self.profile = profile5497    def get_address(self): return self.address5498    def set_address(self, address): self.address = address5499    def get_phone(self): return self.phone5500    def set_phone(self, phone): self.phone = phone5501    def get_email(self): return self.email5502    def set_email(self, email): self.email = email5503    def get_eidPhoto(self): return self.eidPhoto5504    def set_eidPhoto(self, eidPhoto): self.eidPhoto = eidPhoto5505    def export(self, outfile, level, namespace_='mstns:', name_='MyDigiPassWidgetStep', namespacedef_=''):5506        showIndent(outfile, level)5507        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5508        already_processed = []5509        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassWidgetStep')5510        if self.hasContent_():5511            outfile.write('>\n')5512            self.exportChildren(outfile, level + 1, namespace_, name_)5513            showIndent(outfile, level)5514            outfile.write('</%s%s>\n' % (namespace_, name_))5515        else:5516            outfile.write('/>\n')5517    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MyDigiPassWidgetStep'):5518        super(MyDigiPassWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MyDigiPassWidgetStep')5519        if self.phone is not None and 'phone' not in already_processed:5520            already_processed.append('phone')5521            outfile.write(' phone=%s' % (self.gds_format_string(quote_attrib(self.phone).encode(ExternalEncoding), input_name='phone'),))5522        if self.email is not None and 'email' not in already_processed:5523            already_processed.append('email')5524            outfile.write(' email=%s' % (self.gds_format_string(quote_attrib(self.email).encode(ExternalEncoding), input_name='email'),))5525        if self.eidPhoto is not None and 'eidPhoto' not in already_processed:5526            already_processed.append('eidPhoto')5527            outfile.write(' eidPhoto=%s' % (self.gds_format_string(quote_attrib(self.eidPhoto).encode(ExternalEncoding), input_name='eidPhoto'),))5528    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MyDigiPassWidgetStep', fromsubclass_=False):5529        super(MyDigiPassWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)5530        if self.eidProfile is not None:5531            self.eidProfile.export(outfile, level, namespace_, name_='eidProfile')5532        if self.eidAddress is not None:5533            self.eidAddress.export(outfile, level, namespace_, name_='eidAddress')5534        if self.profile is not None:5535            self.profile.export(outfile, level, namespace_, name_='profile')5536        if self.address is not None:5537            self.address.export(outfile, level, namespace_, name_='address')5538    def hasContent_(self):5539        if (5540            self.eidProfile is not None or5541            self.eidAddress is not None or5542            self.profile is not None or5543            self.address is not None or5544            super(MyDigiPassWidgetStep, self).hasContent_()5545            ):5546            return True5547        else:5548            return False5549    def exportLiteral(self, outfile, level, name_='MyDigiPassWidgetStep'):5550        level += 15551        self.exportLiteralAttributes(outfile, level, [], name_)5552        if self.hasContent_():5553            self.exportLiteralChildren(outfile, level, name_)5554    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5555        if self.phone is not None and 'phone' not in already_processed:5556            already_processed.append('phone')5557            showIndent(outfile, level)5558            outfile.write('phone = "%s",\n' % (self.phone,))5559        if self.email is not None and 'email' not in already_processed:5560            already_processed.append('email')5561            showIndent(outfile, level)5562            outfile.write('email = "%s",\n' % (self.email,))5563        if self.eidPhoto is not None and 'eidPhoto' not in already_processed:5564            already_processed.append('eidPhoto')5565            showIndent(outfile, level)5566            outfile.write('eidPhoto = "%s",\n' % (self.eidPhoto,))5567        super(MyDigiPassWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)5568    def exportLiteralChildren(self, outfile, level, name_):5569        super(MyDigiPassWidgetStep, self).exportLiteralChildren(outfile, level, name_)5570        if self.eidProfile is not None:5571            showIndent(outfile, level)5572            outfile.write('eidProfile=model_.MyDigiPassEidProfile(\n')5573            self.eidProfile.exportLiteral(outfile, level, name_='eidProfile')5574            showIndent(outfile, level)5575            outfile.write('),\n')5576        if self.eidAddress is not None:5577            showIndent(outfile, level)5578            outfile.write('eidAddress=model_.MyDigiPassEidAddress(\n')5579            self.eidAddress.exportLiteral(outfile, level, name_='eidAddress')5580            showIndent(outfile, level)5581            outfile.write('),\n')5582        if self.profile is not None:5583            showIndent(outfile, level)5584            outfile.write('profile=model_.MyDigiPassProfile(\n')5585            self.profile.exportLiteral(outfile, level, name_='profile')5586            showIndent(outfile, level)5587            outfile.write('),\n')5588        if self.address is not None:5589            showIndent(outfile, level)5590            outfile.write('address=model_.MyDigiPassAddress(\n')5591            self.address.exportLiteral(outfile, level, name_='address')5592            showIndent(outfile, level)5593            outfile.write('),\n')5594    def build(self, node):5595        self.buildAttributes(node, node.attrib, [])5596        for child in node:5597            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5598            self.buildChildren(child, node, nodeName_)5599    def buildAttributes(self, node, attrs, already_processed):5600        value = find_attr_value_('phone', node)5601        if value is not None and 'phone' not in already_processed:5602            already_processed.append('phone')5603            self.phone = value5604        value = find_attr_value_('email', node)5605        if value is not None and 'email' not in already_processed:5606            already_processed.append('email')5607            self.email = value5608        value = find_attr_value_('eidPhoto', node)5609        if value is not None and 'eidPhoto' not in already_processed:5610            already_processed.append('eidPhoto')5611            self.eidPhoto = value5612        super(MyDigiPassWidgetStep, self).buildAttributes(node, attrs, already_processed)5613    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5614        if nodeName_ == 'eidProfile':5615            obj_ = MyDigiPassEidProfile.factory()5616            obj_.build(child_)5617            self.set_eidProfile(obj_)5618        elif nodeName_ == 'eidAddress':5619            obj_ = MyDigiPassEidAddress.factory()5620            obj_.build(child_)5621            self.set_eidAddress(obj_)5622        elif nodeName_ == 'profile':5623            obj_ = MyDigiPassProfile.factory()5624            obj_.build(child_)5625            self.set_profile(obj_)5626        elif nodeName_ == 'address':5627            obj_ = MyDigiPassAddress.factory()5628            obj_.build(child_)5629            self.set_address(obj_)5630        super(MyDigiPassWidgetStep, self).buildChildren(child_, node, nodeName_, True)5631# end class MyDigiPassWidgetStep5632class SelectSingleWidgetStep(WidgetStep):5633    subclass = None5634    superclass = WidgetStep5635    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, value=None):5636        super(SelectSingleWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)5637        self.value = _cast(None, value)5638        pass5639    def factory(*args_, **kwargs_):5640        if SelectSingleWidgetStep.subclass:5641            return SelectSingleWidgetStep.subclass(*args_, **kwargs_)5642        else:5643            return SelectSingleWidgetStep(*args_, **kwargs_)5644    factory = staticmethod(factory)5645    def get_value(self): return self.value5646    def set_value(self, value): self.value = value5647    def export(self, outfile, level, namespace_='mstns:', name_='SelectSingleWidgetStep', namespacedef_=''):5648        showIndent(outfile, level)5649        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5650        already_processed = []5651        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectSingleWidgetStep')5652        if self.hasContent_():5653            outfile.write('>\n')5654            self.exportChildren(outfile, level + 1, namespace_, name_)5655            outfile.write('</%s%s>\n' % (namespace_, name_))5656        else:5657            outfile.write('/>\n')5658    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectSingleWidgetStep'):5659        super(SelectSingleWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectSingleWidgetStep')5660        if self.value is not None and 'value' not in already_processed:5661            already_processed.append('value')5662            outfile.write(' value=%s' % (self.gds_format_string(quote_attrib(self.value).encode(ExternalEncoding), input_name='value'),))5663    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectSingleWidgetStep', fromsubclass_=False):5664        super(SelectSingleWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)5665        pass5666    def hasContent_(self):5667        if (5668            super(SelectSingleWidgetStep, self).hasContent_()5669            ):5670            return True5671        else:5672            return False5673    def exportLiteral(self, outfile, level, name_='SelectSingleWidgetStep'):5674        level += 15675        self.exportLiteralAttributes(outfile, level, [], name_)5676        if self.hasContent_():5677            self.exportLiteralChildren(outfile, level, name_)5678    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5679        if self.value is not None and 'value' not in already_processed:5680            already_processed.append('value')5681            showIndent(outfile, level)5682            outfile.write('value = "%s",\n' % (self.value,))5683        super(SelectSingleWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)5684    def exportLiteralChildren(self, outfile, level, name_):5685        super(SelectSingleWidgetStep, self).exportLiteralChildren(outfile, level, name_)5686        pass5687    def build(self, node):5688        self.buildAttributes(node, node.attrib, [])5689        for child in node:5690            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5691            self.buildChildren(child, node, nodeName_)5692    def buildAttributes(self, node, attrs, already_processed):5693        value = find_attr_value_('value', node)5694        if value is not None and 'value' not in already_processed:5695            already_processed.append('value')5696            self.value = value5697        super(SelectSingleWidgetStep, self).buildAttributes(node, attrs, already_processed)5698    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5699        super(SelectSingleWidgetStep, self).buildChildren(child_, node, nodeName_, True)5700        pass5701# end class SelectSingleWidgetStep5702class SelectMultiWidgetStep(WidgetStep):5703    subclass = None5704    superclass = WidgetStep5705    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, selection=None):5706        super(SelectMultiWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)5707        if selection is None:5708            self.selection = []5709        else:5710            self.selection = selection5711    def factory(*args_, **kwargs_):5712        if SelectMultiWidgetStep.subclass:5713            return SelectMultiWidgetStep.subclass(*args_, **kwargs_)5714        else:5715            return SelectMultiWidgetStep(*args_, **kwargs_)5716    factory = staticmethod(factory)5717    def get_selection(self): return self.selection5718    def set_selection(self, selection): self.selection = selection5719    def add_selection(self, value): self.selection.append(value)5720    def insert_selection(self, index, value): self.selection[index] = value5721    def export(self, outfile, level, namespace_='mstns:', name_='SelectMultiWidgetStep', namespacedef_=''):5722        showIndent(outfile, level)5723        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5724        already_processed = []5725        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectMultiWidgetStep')5726        if self.hasContent_():5727            outfile.write('>\n')5728            self.exportChildren(outfile, level + 1, namespace_, name_)5729            showIndent(outfile, level)5730            outfile.write('</%s%s>\n' % (namespace_, name_))5731        else:5732            outfile.write('/>\n')5733    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectMultiWidgetStep'):5734        super(SelectMultiWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectMultiWidgetStep')5735    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectMultiWidgetStep', fromsubclass_=False):5736        super(SelectMultiWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)5737        for selection_ in self.selection:5738            selection_.export(outfile, level, namespace_, name_='selection')5739    def hasContent_(self):5740        if (5741            self.selection or5742            super(SelectMultiWidgetStep, self).hasContent_()5743            ):5744            return True5745        else:5746            return False5747    def exportLiteral(self, outfile, level, name_='SelectMultiWidgetStep'):5748        level += 15749        self.exportLiteralAttributes(outfile, level, [], name_)5750        if self.hasContent_():5751            self.exportLiteralChildren(outfile, level, name_)5752    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5753        super(SelectMultiWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)5754    def exportLiteralChildren(self, outfile, level, name_):5755        super(SelectMultiWidgetStep, self).exportLiteralChildren(outfile, level, name_)5756        showIndent(outfile, level)5757        outfile.write('selection=[\n')5758        level += 15759        for selection_ in self.selection:5760            showIndent(outfile, level)5761            outfile.write('model_.Value(\n')5762            selection_.exportLiteral(outfile, level, name_='Value')5763            showIndent(outfile, level)5764            outfile.write('),\n')5765        level -= 15766        showIndent(outfile, level)5767        outfile.write('],\n')5768    def build(self, node):5769        self.buildAttributes(node, node.attrib, [])5770        for child in node:5771            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5772            self.buildChildren(child, node, nodeName_)5773    def buildAttributes(self, node, attrs, already_processed):5774        super(SelectMultiWidgetStep, self).buildAttributes(node, attrs, already_processed)5775    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5776        if nodeName_ == 'selection':5777            class_obj_ = self.get_class_obj_(child_, Value)5778            obj_ = class_obj_.factory()5779            obj_.build(child_)5780            self.selection.append(obj_)5781        super(SelectMultiWidgetStep, self).buildChildren(child_, node, nodeName_, True)5782# end class SelectMultiWidgetStep5783class SelectDateWidgetStep(WidgetStep):5784    subclass = None5785    superclass = WidgetStep5786    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, date=None):5787        super(SelectDateWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)5788        self.date = _cast(int, date)5789        pass5790    def factory(*args_, **kwargs_):5791        if SelectDateWidgetStep.subclass:5792            return SelectDateWidgetStep.subclass(*args_, **kwargs_)5793        else:5794            return SelectDateWidgetStep(*args_, **kwargs_)5795    factory = staticmethod(factory)5796    def get_date(self): return self.date5797    def set_date(self, date): self.date = date5798    def export(self, outfile, level, namespace_='mstns:', name_='SelectDateWidgetStep', namespacedef_=''):5799        showIndent(outfile, level)5800        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5801        already_processed = []5802        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SelectDateWidgetStep')5803        if self.hasContent_():5804            outfile.write('>\n')5805            self.exportChildren(outfile, level + 1, namespace_, name_)5806            outfile.write('</%s%s>\n' % (namespace_, name_))5807        else:5808            outfile.write('/>\n')5809    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='SelectDateWidgetStep'):5810        super(SelectDateWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='SelectDateWidgetStep')5811        if self.date is not None and 'date' not in already_processed:5812            already_processed.append('date')5813            outfile.write(' date="%s"' % self.gds_format_integer(self.date, input_name='date'))5814    def exportChildren(self, outfile, level, namespace_='mstns:', name_='SelectDateWidgetStep', fromsubclass_=False):5815        super(SelectDateWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)5816        pass5817    def hasContent_(self):5818        if (5819            super(SelectDateWidgetStep, self).hasContent_()5820            ):5821            return True5822        else:5823            return False5824    def exportLiteral(self, outfile, level, name_='SelectDateWidgetStep'):5825        level += 15826        self.exportLiteralAttributes(outfile, level, [], name_)5827        if self.hasContent_():5828            self.exportLiteralChildren(outfile, level, name_)5829    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5830        if self.date is not None and 'date' not in already_processed:5831            already_processed.append('date')5832            showIndent(outfile, level)5833            outfile.write('date = %d,\n' % (self.date,))5834        super(SelectDateWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)5835    def exportLiteralChildren(self, outfile, level, name_):5836        super(SelectDateWidgetStep, self).exportLiteralChildren(outfile, level, name_)5837        pass5838    def build(self, node):5839        self.buildAttributes(node, node.attrib, [])5840        for child in node:5841            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5842            self.buildChildren(child, node, nodeName_)5843    def buildAttributes(self, node, attrs, already_processed):5844        value = find_attr_value_('date', node)5845        if value is not None and 'date' not in already_processed:5846            already_processed.append('date')5847            try:5848                self.date = int(value)5849            except ValueError, exp:5850                raise_parse_error(node, 'Bad integer attribute: %s' % exp)5851        super(SelectDateWidgetStep, self).buildAttributes(node, attrs, already_processed)5852    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5853        super(SelectDateWidgetStep, self).buildChildren(child_, node, nodeName_, True)5854        pass5855# end class SelectDateWidgetStep5856class AdvancedOrderWidgetStep(WidgetStep):5857    subclass = None5858    superclass = WidgetStep5859    def __init__(self, definition=None, previousStep=None, button=None, nextStep=None, message=None, creationTimestamp=None, id=None, receivedTimestamp=None, acknowledgedTimestamp=None, formButton=None, displayValue=None, currency=None, category=None):5860        super(AdvancedOrderWidgetStep, self).__init__(definition, previousStep, button, nextStep, message, creationTimestamp, id, receivedTimestamp, acknowledgedTimestamp, formButton, displayValue,)5861        self.currency = _cast(None, currency)5862        if category is None:5863            self.category = []5864        else:5865            self.category = category5866    def factory(*args_, **kwargs_):5867        if AdvancedOrderWidgetStep.subclass:5868            return AdvancedOrderWidgetStep.subclass(*args_, **kwargs_)5869        else:5870            return AdvancedOrderWidgetStep(*args_, **kwargs_)5871    factory = staticmethod(factory)5872    def get_category(self): return self.category5873    def set_category(self, category): self.category = category5874    def add_category(self, value): self.category.append(value)5875    def insert_category(self, index, value): self.category[index] = value5876    def get_currency(self): return self.currency5877    def set_currency(self, currency): self.currency = currency5878    def export(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderWidgetStep', namespacedef_=''):5879        showIndent(outfile, level)5880        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5881        already_processed = []5882        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AdvancedOrderWidgetStep')5883        if self.hasContent_():5884            outfile.write('>\n')5885            self.exportChildren(outfile, level + 1, namespace_, name_)5886            showIndent(outfile, level)5887            outfile.write('</%s%s>\n' % (namespace_, name_))5888        else:5889            outfile.write('/>\n')5890    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='AdvancedOrderWidgetStep'):5891        super(AdvancedOrderWidgetStep, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AdvancedOrderWidgetStep')5892        if self.currency is not None and 'currency' not in already_processed:5893            already_processed.append('currency')5894            outfile.write(' currency=%s' % (self.gds_format_string(quote_attrib(self.currency).encode(ExternalEncoding), input_name='currency'),))5895    def exportChildren(self, outfile, level, namespace_='mstns:', name_='AdvancedOrderWidgetStep', fromsubclass_=False):5896        super(AdvancedOrderWidgetStep, self).exportChildren(outfile, level, namespace_, name_, True)5897        for category_ in self.category:5898            category_.export(outfile, level, namespace_, name_='category')5899    def hasContent_(self):5900        if (5901            self.category or5902            super(AdvancedOrderWidgetStep, self).hasContent_()5903            ):5904            return True5905        else:5906            return False5907    def exportLiteral(self, outfile, level, name_='AdvancedOrderWidgetStep'):5908        level += 15909        self.exportLiteralAttributes(outfile, level, [], name_)5910        if self.hasContent_():5911            self.exportLiteralChildren(outfile, level, name_)5912    def exportLiteralAttributes(self, outfile, level, already_processed, name_):5913        if self.currency is not None and 'currency' not in already_processed:5914            already_processed.append('currency')5915            showIndent(outfile, level)5916            outfile.write('currency = "%s",\n' % (self.currency,))5917        super(AdvancedOrderWidgetStep, self).exportLiteralAttributes(outfile, level, already_processed, name_)5918    def exportLiteralChildren(self, outfile, level, name_):5919        super(AdvancedOrderWidgetStep, self).exportLiteralChildren(outfile, level, name_)5920        showIndent(outfile, level)5921        outfile.write('category=[\n')5922        level += 15923        for category_ in self.category:5924            showIndent(outfile, level)5925            outfile.write('model_.AdvancedOrderCategory(\n')5926            category_.exportLiteral(outfile, level, name_='AdvancedOrderCategory')5927            showIndent(outfile, level)5928            outfile.write('),\n')5929        level -= 15930        showIndent(outfile, level)5931        outfile.write('],\n')5932    def build(self, node):5933        self.buildAttributes(node, node.attrib, [])5934        for child in node:5935            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5936            self.buildChildren(child, node, nodeName_)5937    def buildAttributes(self, node, attrs, already_processed):5938        value = find_attr_value_('currency', node)5939        if value is not None and 'currency' not in already_processed:5940            already_processed.append('currency')5941            self.currency = value5942        super(AdvancedOrderWidgetStep, self).buildAttributes(node, attrs, already_processed)5943    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):5944        if nodeName_ == 'category':5945            obj_ = AdvancedOrderCategory.factory()5946            obj_.build(child_)5947            self.category.append(obj_)5948        super(AdvancedOrderWidgetStep, self).buildChildren(child_, node, nodeName_, True)5949# end class AdvancedOrderWidgetStep5950class MemberRun(GeneratedsSuper):5951    subclass = None5952    superclass = None5953    def __init__(self, status=None, userData=None, endReference=None, name=None, language=None, avatarUrl=None, appId=None, email=None, step=None):5954        self.status = _cast(None, status)5955        self.userData = _cast(None, userData)5956        self.endReference = _cast(None, endReference)5957        self.name = _cast(None, name)5958        self.language = _cast(None, language)5959        self.avatarUrl = _cast(None, avatarUrl)5960        self.appId = _cast(None, appId)5961        self.email = _cast(None, email)5962        if step is None:5963            self.step = []5964        else:5965            self.step = step5966    def factory(*args_, **kwargs_):5967        if MemberRun.subclass:5968            return MemberRun.subclass(*args_, **kwargs_)5969        else:5970            return MemberRun(*args_, **kwargs_)5971    factory = staticmethod(factory)5972    def get_step(self): return self.step5973    def set_step(self, step): self.step = step5974    def add_step(self, value): self.step.append(value)5975    def insert_step(self, index, value): self.step[index] = value5976    def get_status(self): return self.status5977    def set_status(self, status): self.status = status5978    def validate_MemberStatus(self, value):5979        # Validate type MemberStatus, a restriction on xs:string.5980        pass5981    def get_userData(self): return self.userData5982    def set_userData(self, userData): self.userData = userData5983    def get_endReference(self): return self.endReference5984    def set_endReference(self, endReference): self.endReference = endReference5985    def get_name(self): return self.name5986    def set_name(self, name): self.name = name5987    def get_language(self): return self.language5988    def set_language(self, language): self.language = language5989    def get_avatarUrl(self): return self.avatarUrl5990    def set_avatarUrl(self, avatarUrl): self.avatarUrl = avatarUrl5991    def get_appId(self): return self.appId5992    def set_appId(self, appId): self.appId = appId5993    def get_email(self): return self.email5994    def set_email(self, email): self.email = email5995    def export(self, outfile, level, namespace_='mstns:', name_='MemberRun', namespacedef_=''):5996        showIndent(outfile, level)5997        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))5998        already_processed = []5999        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MemberRun')6000        if self.hasContent_():6001            outfile.write('>\n')6002            self.exportChildren(outfile, level + 1, namespace_, name_)6003            showIndent(outfile, level)6004            outfile.write('</%s%s>\n' % (namespace_, name_))6005        else:6006            outfile.write('/>\n')6007    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MemberRun'):6008        if self.status is not None and 'status' not in already_processed:6009            already_processed.append('status')6010            outfile.write(' status=%s' % (quote_attrib(self.status),))6011        if self.userData is not None and 'userData' not in already_processed:6012            already_processed.append('userData')6013            outfile.write(' userData=%s' % (self.gds_format_string(quote_attrib(self.userData).encode(ExternalEncoding), input_name='userData'),))6014        if self.endReference is not None and 'endReference' not in already_processed:6015            already_processed.append('endReference')6016            outfile.write(' endReference=%s' % (self.gds_format_string(quote_attrib(self.endReference).encode(ExternalEncoding), input_name='endReference'),))6017        if self.name is not None and 'name' not in already_processed:6018            already_processed.append('name')6019            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'),))6020        if self.language is not None and 'language' not in already_processed:6021            already_processed.append('language')6022            outfile.write(' language=%s' % (self.gds_format_string(quote_attrib(self.language).encode(ExternalEncoding), input_name='language'),))6023        if self.avatarUrl is not None and 'avatarUrl' not in already_processed:6024            already_processed.append('avatarUrl')6025            outfile.write(' avatarUrl=%s' % (self.gds_format_string(quote_attrib(self.avatarUrl).encode(ExternalEncoding), input_name='avatarUrl'),))6026        if self.appId is not None and 'appId' not in already_processed:6027            already_processed.append('appId')6028            outfile.write(' appId=%s' % (self.gds_format_string(quote_attrib(self.appId).encode(ExternalEncoding), input_name='appId'),))6029        if self.email is not None and 'email' not in already_processed:6030            already_processed.append('email')6031            outfile.write(' email=%s' % (self.gds_format_string(quote_attrib(self.email).encode(ExternalEncoding), input_name='email'),))6032    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MemberRun', fromsubclass_=False):6033        for step_ in self.step:6034            step_.export(outfile, level, namespace_, name_='step')6035    def hasContent_(self):6036        if (6037            self.step6038            ):6039            return True6040        else:6041            return False6042    def exportLiteral(self, outfile, level, name_='MemberRun'):6043        level += 16044        self.exportLiteralAttributes(outfile, level, [], name_)6045        if self.hasContent_():6046            self.exportLiteralChildren(outfile, level, name_)6047    def exportLiteralAttributes(self, outfile, level, already_processed, name_):6048        if self.status is not None and 'status' not in already_processed:6049            already_processed.append('status')6050            showIndent(outfile, level)6051            outfile.write('status = "%s",\n' % (self.status,))6052        if self.userData is not None and 'userData' not in already_processed:6053            already_processed.append('userData')6054            showIndent(outfile, level)6055            outfile.write('userData = "%s",\n' % (self.userData,))6056        if self.endReference is not None and 'endReference' not in already_processed:6057            already_processed.append('endReference')6058            showIndent(outfile, level)6059            outfile.write('endReference = "%s",\n' % (self.endReference,))6060        if self.name is not None and 'name' not in already_processed:6061            already_processed.append('name')6062            showIndent(outfile, level)6063            outfile.write('name = "%s",\n' % (self.name,))6064        if self.language is not None and 'language' not in already_processed:6065            already_processed.append('language')6066            showIndent(outfile, level)6067            outfile.write('language = "%s",\n' % (self.language,))6068        if self.avatarUrl is not None and 'avatarUrl' not in already_processed:6069            already_processed.append('avatarUrl')6070            showIndent(outfile, level)6071            outfile.write('avatarUrl = "%s",\n' % (self.avatarUrl,))6072        if self.appId is not None and 'appId' not in already_processed:6073            already_processed.append('appId')6074            showIndent(outfile, level)6075            outfile.write('appId = "%s",\n' % (self.appId,))6076        if self.email is not None and 'email' not in already_processed:6077            already_processed.append('email')6078            showIndent(outfile, level)6079            outfile.write('email = "%s",\n' % (self.email,))6080    def exportLiteralChildren(self, outfile, level, name_):6081        showIndent(outfile, level)6082        outfile.write('step=[\n')6083        level += 16084        for step_ in self.step:6085            showIndent(outfile, level)6086            outfile.write('model_.Step(\n')6087            step_.exportLiteral(outfile, level, name_='Step')6088            showIndent(outfile, level)6089            outfile.write('),\n')6090        level -= 16091        showIndent(outfile, level)6092        outfile.write('],\n')6093    def build(self, node):6094        self.buildAttributes(node, node.attrib, [])6095        for child in node:6096            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6097            self.buildChildren(child, node, nodeName_)6098    def buildAttributes(self, node, attrs, already_processed):6099        value = find_attr_value_('status', node)6100        if value is not None and 'status' not in already_processed:6101            already_processed.append('status')6102            self.status = value6103            self.validate_MemberStatus(self.status)  # validate type MemberStatus6104        value = find_attr_value_('userData', node)6105        if value is not None and 'userData' not in already_processed:6106            already_processed.append('userData')6107            self.userData = value6108        value = find_attr_value_('endReference', node)6109        if value is not None and 'endReference' not in already_processed:6110            already_processed.append('endReference')6111            self.endReference = value6112        value = find_attr_value_('name', node)6113        if value is not None and 'name' not in already_processed:6114            already_processed.append('name')6115            self.name = value6116        value = find_attr_value_('language', node)6117        if value is not None and 'language' not in already_processed:6118            already_processed.append('language')6119            self.language = value6120        value = find_attr_value_('avatarUrl', node)6121        if value is not None and 'avatarUrl' not in already_processed:6122            already_processed.append('avatarUrl')6123            self.avatarUrl = value6124        value = find_attr_value_('appId', node)6125        if value is not None and 'appId' not in already_processed:6126            already_processed.append('appId')6127            self.appId = value6128        value = find_attr_value_('email', node)6129        if value is not None and 'email' not in already_processed:6130            already_processed.append('email')6131            self.email = value6132    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):6133        if nodeName_ == 'step':6134            class_obj_ = self.get_class_obj_(child_, Step)6135            obj_ = class_obj_.factory()6136            obj_.build(child_)6137            self.step.append(obj_)6138# end class MemberRun6139class MessageFlowRun(GeneratedsSuper):6140    subclass = None6141    superclass = None6142    def __init__(self, serviceDisplayEmail=None, serviceData=None, serviceName=None, launchTimestamp=None, serviceEmail=None, definition=None, memberRun=None):6143        self.serviceDisplayEmail = _cast(None, serviceDisplayEmail)6144        self.serviceData = _cast(None, serviceData)6145        self.serviceName = _cast(None, serviceName)6146        self.launchTimestamp = _cast(int, launchTimestamp)6147        self.serviceEmail = _cast(None, serviceEmail)6148        if definition is None:6149            self.definition = []6150        else:6151            self.definition = definition6152        if memberRun is None:6153            self.memberRun = []6154        else:6155            self.memberRun = memberRun6156    def factory(*args_, **kwargs_):6157        if MessageFlowRun.subclass:6158            return MessageFlowRun.subclass(*args_, **kwargs_)6159        else:6160            return MessageFlowRun(*args_, **kwargs_)6161    factory = staticmethod(factory)6162    def get_definition(self): return self.definition6163    def set_definition(self, definition): self.definition = definition6164    def add_definition(self, value): self.definition.append(value)6165    def insert_definition(self, index, value): self.definition[index] = value6166    def get_memberRun(self): return self.memberRun6167    def set_memberRun(self, memberRun): self.memberRun = memberRun6168    def add_memberRun(self, value): self.memberRun.append(value)6169    def insert_memberRun(self, index, value): self.memberRun[index] = value6170    def get_serviceDisplayEmail(self): return self.serviceDisplayEmail6171    def set_serviceDisplayEmail(self, serviceDisplayEmail): self.serviceDisplayEmail = serviceDisplayEmail6172    def get_serviceData(self): return self.serviceData6173    def set_serviceData(self, serviceData): self.serviceData = serviceData6174    def get_serviceName(self): return self.serviceName6175    def set_serviceName(self, serviceName): self.serviceName = serviceName6176    def get_launchTimestamp(self): return self.launchTimestamp6177    def set_launchTimestamp(self, launchTimestamp): self.launchTimestamp = launchTimestamp6178    def get_serviceEmail(self): return self.serviceEmail6179    def set_serviceEmail(self, serviceEmail): self.serviceEmail = serviceEmail6180    def export(self, outfile, level, namespace_='mstns:', name_='MessageFlowRun', namespacedef_=''):6181        showIndent(outfile, level)6182        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '',))6183        already_processed = []6184        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MessageFlowRun')6185        if self.hasContent_():6186            outfile.write('>\n')6187            self.exportChildren(outfile, level + 1, namespace_, name_)6188            showIndent(outfile, level)6189            outfile.write('</%s%s>\n' % (namespace_, name_))6190        else:6191            outfile.write('/>\n')6192    def exportAttributes(self, outfile, level, already_processed, namespace_='mstns:', name_='MessageFlowRun'):6193        if self.serviceDisplayEmail is not None and 'serviceDisplayEmail' not in already_processed:6194            already_processed.append('serviceDisplayEmail')6195            outfile.write(' serviceDisplayEmail=%s' % (self.gds_format_string(quote_attrib(self.serviceDisplayEmail).encode(ExternalEncoding), input_name='serviceDisplayEmail'),))6196        if self.serviceData is not None and 'serviceData' not in already_processed:6197            already_processed.append('serviceData')6198            outfile.write(' serviceData=%s' % (self.gds_format_string(quote_attrib(self.serviceData).encode(ExternalEncoding), input_name='serviceData'),))6199        if self.serviceName is not None and 'serviceName' not in already_processed:6200            already_processed.append('serviceName')6201            outfile.write(' serviceName=%s' % (self.gds_format_string(quote_attrib(self.serviceName).encode(ExternalEncoding), input_name='serviceName'),))6202        if self.launchTimestamp is not None and 'launchTimestamp' not in already_processed:6203            already_processed.append('launchTimestamp')6204            outfile.write(' launchTimestamp="%s"' % self.gds_format_integer(self.launchTimestamp, input_name='launchTimestamp'))6205        if self.serviceEmail is not None and 'serviceEmail' not in already_processed:6206            already_processed.append('serviceEmail')6207            outfile.write(' serviceEmail=%s' % (self.gds_format_string(quote_attrib(self.serviceEmail).encode(ExternalEncoding), input_name='serviceEmail'),))6208    def exportChildren(self, outfile, level, namespace_='mstns:', name_='MessageFlowRun', fromsubclass_=False):6209        for definition_ in self.definition:6210            definition_.export(outfile, level, namespace_, name_='definition')6211        for memberRun_ in self.memberRun:6212            memberRun_.export(outfile, level, namespace_, name_='memberRun')6213    def hasContent_(self):6214        if (6215            self.definition or6216            self.memberRun6217            ):6218            return True6219        else:6220            return False6221    def exportLiteral(self, outfile, level, name_='MessageFlowRun'):6222        level += 16223        self.exportLiteralAttributes(outfile, level, [], name_)6224        if self.hasContent_():6225            self.exportLiteralChildren(outfile, level, name_)6226    def exportLiteralAttributes(self, outfile, level, already_processed, name_):6227        if self.serviceDisplayEmail is not None and 'serviceDisplayEmail' not in already_processed:6228            already_processed.append('serviceDisplayEmail')6229            showIndent(outfile, level)6230            outfile.write('serviceDisplayEmail = "%s",\n' % (self.serviceDisplayEmail,))6231        if self.serviceData is not None and 'serviceData' not in already_processed:6232            already_processed.append('serviceData')6233            showIndent(outfile, level)6234            outfile.write('serviceData = "%s",\n' % (self.serviceData,))6235        if self.serviceName is not None and 'serviceName' not in already_processed:6236            already_processed.append('serviceName')6237            showIndent(outfile, level)6238            outfile.write('serviceName = "%s",\n' % (self.serviceName,))6239        if self.launchTimestamp is not None and 'launchTimestamp' not in already_processed:6240            already_processed.append('launchTimestamp')6241            showIndent(outfile, level)6242            outfile.write('launchTimestamp = %d,\n' % (self.launchTimestamp,))6243        if self.serviceEmail is not None and 'serviceEmail' not in already_processed:6244            already_processed.append('serviceEmail')6245            showIndent(outfile, level)6246            outfile.write('serviceEmail = "%s",\n' % (self.serviceEmail,))6247    def exportLiteralChildren(self, outfile, level, name_):6248        showIndent(outfile, level)6249        outfile.write('definition=[\n')6250        level += 16251        for definition_ in self.definition:6252            showIndent(outfile, level)6253            outfile.write('model_.MessageFlowDefinition(\n')6254            definition_.exportLiteral(outfile, level, name_='MessageFlowDefinition')6255            showIndent(outfile, level)6256            outfile.write('),\n')6257        level -= 16258        showIndent(outfile, level)6259        outfile.write('],\n')6260        showIndent(outfile, level)6261        outfile.write('memberRun=[\n')6262        level += 16263        for memberRun_ in self.memberRun:6264            showIndent(outfile, level)6265            outfile.write('model_.MemberRun(\n')6266            memberRun_.exportLiteral(outfile, level, name_='MemberRun')6267            showIndent(outfile, level)6268            outfile.write('),\n')6269        level -= 16270        showIndent(outfile, level)6271        outfile.write('],\n')6272    def build(self, node):6273        self.buildAttributes(node, node.attrib, [])6274        for child in node:6275            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6276            self.buildChildren(child, node, nodeName_)6277    def buildAttributes(self, node, attrs, already_processed):6278        value = find_attr_value_('serviceDisplayEmail', node)6279        if value is not None and 'serviceDisplayEmail' not in already_processed:6280            already_processed.append('serviceDisplayEmail')6281            self.serviceDisplayEmail = value6282        value = find_attr_value_('serviceData', node)6283        if value is not None and 'serviceData' not in already_processed:6284            already_processed.append('serviceData')6285            self.serviceData = value6286        value = find_attr_value_('serviceName', node)6287        if value is not None and 'serviceName' not in already_processed:6288            already_processed.append('serviceName')6289            self.serviceName = value6290        value = find_attr_value_('launchTimestamp', node)6291        if value is not None and 'launchTimestamp' not in already_processed:6292            already_processed.append('launchTimestamp')6293            try:6294                self.launchTimestamp = int(value)6295            except ValueError, exp:6296                raise_parse_error(node, 'Bad integer attribute: %s' % exp)6297        value = find_attr_value_('serviceEmail', node)6298        if value is not None and 'serviceEmail' not in already_processed:6299            already_processed.append('serviceEmail')6300            self.serviceEmail = value6301    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):6302        if nodeName_ == 'definition':6303            obj_ = MessageFlowDefinition.factory()6304            obj_.build(child_)6305            self.definition.append(obj_)6306        elif nodeName_ == 'memberRun':6307            obj_ = MemberRun.factory()6308            obj_.build(child_)6309            self.memberRun.append(obj_)6310# end class MessageFlowRun6311class contentType(GeneratedsSuper):...cadAnalysisMetaData_xml.py
Source:cadAnalysisMetaData_xml.py  
...454            text += child.tail455    return text456457458def find_attr_value_(attr_name, node):459    attrs = node.attrib460    attr_parts = attr_name.split(':')461    value = None462    if len(attr_parts) == 1:463        value = attrs.get(attr_name)464    elif len(attr_parts) == 2:465        prefix, name = attr_parts466        namespace = node.nsmap.get(prefix)467        if namespace is not None:468            value = attrs.get('{%s}%s' % (namespace, name, ))469    return value470471472class GDSParseError(Exception):473    pass474475476def raise_parse_error(node, msg):477    if XMLParser_import_library == XMLParser_import_lxml:478        msg = '%s (element %s/line %d)' % (479            msg, node.tag, node.sourceline, )480    else:481        msg = '%s (element %s)' % (msg, node.tag, )482    raise GDSParseError(msg)483484485class MixedContainer:486    # Constants for category:487    CategoryNone = 0488    CategoryText = 1489    CategorySimple = 2490    CategoryComplex = 3491    # Constants for content_type:492    TypeNone = 0493    TypeText = 1494    TypeString = 2495    TypeInteger = 3496    TypeFloat = 4497    TypeDecimal = 5498    TypeDouble = 6499    TypeBoolean = 7500    TypeBase64 = 8501    def __init__(self, category, content_type, name, value):502        self.category = category503        self.content_type = content_type504        self.name = name505        self.value = value506    def getCategory(self):507        return self.category508    def getContenttype(self, content_type):509        return self.content_type510    def getValue(self):511        return self.value512    def getName(self):513        return self.name514    def export(self, outfile, level, name, namespace, pretty_print=True):515        if self.category == MixedContainer.CategoryText:516            # Prevent exporting empty content as empty lines.517            if self.value.strip():518                outfile.write(self.value)519        elif self.category == MixedContainer.CategorySimple:520            self.exportSimple(outfile, level, name)521        else:    # category == MixedContainer.CategoryComplex522            self.value.export(outfile, level, namespace, name, pretty_print)523    def exportSimple(self, outfile, level, name):524        if self.content_type == MixedContainer.TypeString:525            outfile.write('<%s>%s</%s>' % (526                self.name, self.value, self.name))527        elif self.content_type == MixedContainer.TypeInteger or \528                self.content_type == MixedContainer.TypeBoolean:529            outfile.write('<%s>%d</%s>' % (530                self.name, self.value, self.name))531        elif self.content_type == MixedContainer.TypeFloat or \532                self.content_type == MixedContainer.TypeDecimal:533            outfile.write('<%s>%f</%s>' % (534                self.name, self.value, self.name))535        elif self.content_type == MixedContainer.TypeDouble:536            outfile.write('<%s>%g</%s>' % (537                self.name, self.value, self.name))538        elif self.content_type == MixedContainer.TypeBase64:539            outfile.write('<%s>%s</%s>' % (540                self.name, base64.b64encode(self.value), self.name))541    def to_etree(self, element):542        if self.category == MixedContainer.CategoryText:543            # Prevent exporting empty content as empty lines.544            if self.value.strip():545                if len(element) > 0:546                    if element[-1].tail is None:547                        element[-1].tail = self.value548                    else:549                        element[-1].tail += self.value550                else:551                    if element.text is None:552                        element.text = self.value553                    else:554                        element.text += self.value555        elif self.category == MixedContainer.CategorySimple:556            subelement = etree_.SubElement(element, '%s' % self.name)557            subelement.text = self.to_etree_simple()558        else:    # category == MixedContainer.CategoryComplex559            self.value.to_etree(element)560    def to_etree_simple(self):561        if self.content_type == MixedContainer.TypeString:562            text = self.value563        elif (self.content_type == MixedContainer.TypeInteger or564                self.content_type == MixedContainer.TypeBoolean):565            text = '%d' % self.value566        elif (self.content_type == MixedContainer.TypeFloat or567                self.content_type == MixedContainer.TypeDecimal):568            text = '%f' % self.value569        elif self.content_type == MixedContainer.TypeDouble:570            text = '%g' % self.value571        elif self.content_type == MixedContainer.TypeBase64:572            text = '%s' % base64.b64encode(self.value)573        return text574    def exportLiteral(self, outfile, level, name):575        if self.category == MixedContainer.CategoryText:576            showIndent(outfile, level)577            outfile.write(578                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (579                    self.category, self.content_type, self.name, self.value))580        elif self.category == MixedContainer.CategorySimple:581            showIndent(outfile, level)582            outfile.write(583                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (584                    self.category, self.content_type, self.name, self.value))585        else:    # category == MixedContainer.CategoryComplex586            showIndent(outfile, level)587            outfile.write(588                'model_.MixedContainer(%d, %d, "%s",\n' % (589                    self.category, self.content_type, self.name,))590            self.value.exportLiteral(outfile, level + 1)591            showIndent(outfile, level)592            outfile.write(')\n')593594595class MemberSpec_(object):596    def __init__(self, name='', data_type='', container=0):597        self.name = name598        self.data_type = data_type599        self.container = container600    def set_name(self, name): self.name = name601    def get_name(self): return self.name602    def set_data_type(self, data_type): self.data_type = data_type603    def get_data_type_chain(self): return self.data_type604    def get_data_type(self):605        if isinstance(self.data_type, list):606            if len(self.data_type) > 0:607                return self.data_type[-1]608            else:609                return 'xs:string'610        else:611            return self.data_type612    def set_container(self, container): self.container = container613    def get_container(self): return self.container614615616def _cast(typ, value):617    if typ is None or value is None:618        return value619    return typ(value)620621#622# Data representation classes.623#624625626class MetricType(GeneratedsSuper):627    subclass = None628    superclass = None629    def __init__(self, _desynched_atts=None, _derived=None, _real_archetype=None, _archetype=None, ComponentInstanceID=None, ComponentName=None, ConfigurationID=None, MetricID=None, MetricType=None, _subtype=None, ComponentType=None, _instances=None, Details=None, TopAssemblyComponentInstanceID=None, RequestedValueType=None, _id=None, MetricName=None):630        self.original_tagname_ = None631        self._desynched_atts = _cast(None, _desynched_atts)632        self._derived = _cast(None, _derived)633        self._real_archetype = _cast(bool, _real_archetype)634        self._archetype = _cast(None, _archetype)635        self.ComponentInstanceID = _cast(None, ComponentInstanceID)636        self.ComponentName = _cast(None, ComponentName)637        self.ConfigurationID = _cast(None, ConfigurationID)638        self.MetricID = _cast(None, MetricID)639        self.MetricType = _cast(None, MetricType)640        self._subtype = _cast(bool, _subtype)641        self.ComponentType = _cast(None, ComponentType)642        self._instances = _cast(None, _instances)643        self.Details = _cast(None, Details)644        self.TopAssemblyComponentInstanceID = _cast(None, TopAssemblyComponentInstanceID)645        self.RequestedValueType = _cast(None, RequestedValueType)646        self._id = _cast(None, _id)647        self.MetricName = _cast(None, MetricName)648    def factory(*args_, **kwargs_):649        if MetricType.subclass:650            return MetricType.subclass(*args_, **kwargs_)651        else:652            return MetricType(*args_, **kwargs_)653    factory = staticmethod(factory)654    def get__desynched_atts(self): return self._desynched_atts655    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts656    def get__derived(self): return self._derived657    def set__derived(self, _derived): self._derived = _derived658    def get__real_archetype(self): return self._real_archetype659    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype660    def get__archetype(self): return self._archetype661    def set__archetype(self, _archetype): self._archetype = _archetype662    def get_ComponentInstanceID(self): return self.ComponentInstanceID663    def set_ComponentInstanceID(self, ComponentInstanceID): self.ComponentInstanceID = ComponentInstanceID664    def get_ComponentName(self): return self.ComponentName665    def set_ComponentName(self, ComponentName): self.ComponentName = ComponentName666    def get_ConfigurationID(self): return self.ConfigurationID667    def set_ConfigurationID(self, ConfigurationID): self.ConfigurationID = ConfigurationID668    def get_MetricID(self): return self.MetricID669    def set_MetricID(self, MetricID): self.MetricID = MetricID670    def get_MetricType(self): return self.MetricType671    def set_MetricType(self, MetricType): self.MetricType = MetricType672    def get__subtype(self): return self._subtype673    def set__subtype(self, _subtype): self._subtype = _subtype674    def get_ComponentType(self): return self.ComponentType675    def set_ComponentType(self, ComponentType): self.ComponentType = ComponentType676    def get__instances(self): return self._instances677    def set__instances(self, _instances): self._instances = _instances678    def get_Details(self): return self.Details679    def set_Details(self, Details): self.Details = Details680    def get_TopAssemblyComponentInstanceID(self): return self.TopAssemblyComponentInstanceID681    def set_TopAssemblyComponentInstanceID(self, TopAssemblyComponentInstanceID): self.TopAssemblyComponentInstanceID = TopAssemblyComponentInstanceID682    def get_RequestedValueType(self): return self.RequestedValueType683    def set_RequestedValueType(self, RequestedValueType): self.RequestedValueType = RequestedValueType684    def get__id(self): return self._id685    def set__id(self, _id): self._id = _id686    def get_MetricName(self): return self.MetricName687    def set_MetricName(self, MetricName): self.MetricName = MetricName688    def hasContent_(self):689        if (690691        ):692            return True693        else:694            return False695    def export(self, outfile, level, namespace_='', name_='MetricType', namespacedef_='', pretty_print=True):696        if pretty_print:697            eol_ = '\n'698        else:699            eol_ = ''700        if self.original_tagname_ is not None:701            name_ = self.original_tagname_702        showIndent(outfile, level, pretty_print)703        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))704        already_processed = set()705        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MetricType')706        if self.hasContent_():707            outfile.write('>%s' % (eol_, ))708            self.exportChildren(outfile, level + 1, namespace_='', name_='MetricType', pretty_print=pretty_print)709            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))710        else:711            outfile.write('/>%s' % (eol_, ))712    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MetricType'):713        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:714            already_processed.add('_desynched_atts')715            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))716        if self._derived is not None and '_derived' not in already_processed:717            already_processed.add('_derived')718            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))719        if self._real_archetype is not None and '_real_archetype' not in already_processed:720            already_processed.add('_real_archetype')721            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))722        if self._archetype is not None and '_archetype' not in already_processed:723            already_processed.add('_archetype')724            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))725        if self.ComponentInstanceID is not None and 'ComponentInstanceID' not in already_processed:726            already_processed.add('ComponentInstanceID')727            outfile.write(' ComponentInstanceID=%s' % (self.gds_format_string(quote_attrib(self.ComponentInstanceID).encode(ExternalEncoding), input_name='ComponentInstanceID'), ))728        if self.ComponentName is not None and 'ComponentName' not in already_processed:729            already_processed.add('ComponentName')730            outfile.write(' ComponentName=%s' % (self.gds_format_string(quote_attrib(self.ComponentName).encode(ExternalEncoding), input_name='ComponentName'), ))731        if self.ConfigurationID is not None and 'ConfigurationID' not in already_processed:732            already_processed.add('ConfigurationID')733            outfile.write(' ConfigurationID=%s' % (self.gds_format_string(quote_attrib(self.ConfigurationID).encode(ExternalEncoding), input_name='ConfigurationID'), ))734        if self.MetricID is not None and 'MetricID' not in already_processed:735            already_processed.add('MetricID')736            outfile.write(' MetricID=%s' % (self.gds_format_string(quote_attrib(self.MetricID).encode(ExternalEncoding), input_name='MetricID'), ))737        if self.MetricType is not None and 'MetricType' not in already_processed:738            already_processed.add('MetricType')739            outfile.write(' MetricType=%s' % (self.gds_format_string(quote_attrib(self.MetricType).encode(ExternalEncoding), input_name='MetricType'), ))740        if self._subtype is not None and '_subtype' not in already_processed:741            already_processed.add('_subtype')742            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))743        if self.ComponentType is not None and 'ComponentType' not in already_processed:744            already_processed.add('ComponentType')745            outfile.write(' ComponentType=%s' % (self.gds_format_string(quote_attrib(self.ComponentType).encode(ExternalEncoding), input_name='ComponentType'), ))746        if self._instances is not None and '_instances' not in already_processed:747            already_processed.add('_instances')748            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))749        if self.Details is not None and 'Details' not in already_processed:750            already_processed.add('Details')751            outfile.write(' Details=%s' % (self.gds_format_string(quote_attrib(self.Details).encode(ExternalEncoding), input_name='Details'), ))752        if self.TopAssemblyComponentInstanceID is not None and 'TopAssemblyComponentInstanceID' not in already_processed:753            already_processed.add('TopAssemblyComponentInstanceID')754            outfile.write(' TopAssemblyComponentInstanceID=%s' % (self.gds_format_string(quote_attrib(self.TopAssemblyComponentInstanceID).encode(ExternalEncoding), input_name='TopAssemblyComponentInstanceID'), ))755        if self.RequestedValueType is not None and 'RequestedValueType' not in already_processed:756            already_processed.add('RequestedValueType')757            outfile.write(' RequestedValueType=%s' % (self.gds_format_string(quote_attrib(self.RequestedValueType).encode(ExternalEncoding), input_name='RequestedValueType'), ))758        if self._id is not None and '_id' not in already_processed:759            already_processed.add('_id')760            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))761        if self.MetricName is not None and 'MetricName' not in already_processed:762            already_processed.add('MetricName')763            outfile.write(' MetricName=%s' % (self.gds_format_string(quote_attrib(self.MetricName).encode(ExternalEncoding), input_name='MetricName'), ))764    def exportChildren(self, outfile, level, namespace_='', name_='MetricType', fromsubclass_=False, pretty_print=True):765        pass766    def exportLiteral(self, outfile, level, name_='MetricType'):767        level += 1768        already_processed = set()769        self.exportLiteralAttributes(outfile, level, already_processed, name_)770        if self.hasContent_():771            self.exportLiteralChildren(outfile, level, name_)772    def exportLiteralAttributes(self, outfile, level, already_processed, name_):773        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:774            already_processed.add('_desynched_atts')775            showIndent(outfile, level)776            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))777        if self._derived is not None and '_derived' not in already_processed:778            already_processed.add('_derived')779            showIndent(outfile, level)780            outfile.write('_derived="%s",\n' % (self._derived,))781        if self._real_archetype is not None and '_real_archetype' not in already_processed:782            already_processed.add('_real_archetype')783            showIndent(outfile, level)784            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))785        if self._archetype is not None and '_archetype' not in already_processed:786            already_processed.add('_archetype')787            showIndent(outfile, level)788            outfile.write('_archetype="%s",\n' % (self._archetype,))789        if self.ComponentInstanceID is not None and 'ComponentInstanceID' not in already_processed:790            already_processed.add('ComponentInstanceID')791            showIndent(outfile, level)792            outfile.write('ComponentInstanceID="%s",\n' % (self.ComponentInstanceID,))793        if self.ComponentName is not None and 'ComponentName' not in already_processed:794            already_processed.add('ComponentName')795            showIndent(outfile, level)796            outfile.write('ComponentName="%s",\n' % (self.ComponentName,))797        if self.ConfigurationID is not None and 'ConfigurationID' not in already_processed:798            already_processed.add('ConfigurationID')799            showIndent(outfile, level)800            outfile.write('ConfigurationID="%s",\n' % (self.ConfigurationID,))801        if self.MetricID is not None and 'MetricID' not in already_processed:802            already_processed.add('MetricID')803            showIndent(outfile, level)804            outfile.write('MetricID="%s",\n' % (self.MetricID,))805        if self.MetricType is not None and 'MetricType' not in already_processed:806            already_processed.add('MetricType')807            showIndent(outfile, level)808            outfile.write('MetricType="%s",\n' % (self.MetricType,))809        if self._subtype is not None and '_subtype' not in already_processed:810            already_processed.add('_subtype')811            showIndent(outfile, level)812            outfile.write('_subtype=%s,\n' % (self._subtype,))813        if self.ComponentType is not None and 'ComponentType' not in already_processed:814            already_processed.add('ComponentType')815            showIndent(outfile, level)816            outfile.write('ComponentType="%s",\n' % (self.ComponentType,))817        if self._instances is not None and '_instances' not in already_processed:818            already_processed.add('_instances')819            showIndent(outfile, level)820            outfile.write('_instances="%s",\n' % (self._instances,))821        if self.Details is not None and 'Details' not in already_processed:822            already_processed.add('Details')823            showIndent(outfile, level)824            outfile.write('Details="%s",\n' % (self.Details,))825        if self.TopAssemblyComponentInstanceID is not None and 'TopAssemblyComponentInstanceID' not in already_processed:826            already_processed.add('TopAssemblyComponentInstanceID')827            showIndent(outfile, level)828            outfile.write('TopAssemblyComponentInstanceID="%s",\n' % (self.TopAssemblyComponentInstanceID,))829        if self.RequestedValueType is not None and 'RequestedValueType' not in already_processed:830            already_processed.add('RequestedValueType')831            showIndent(outfile, level)832            outfile.write('RequestedValueType="%s",\n' % (self.RequestedValueType,))833        if self._id is not None and '_id' not in already_processed:834            already_processed.add('_id')835            showIndent(outfile, level)836            outfile.write('_id="%s",\n' % (self._id,))837        if self.MetricName is not None and 'MetricName' not in already_processed:838            already_processed.add('MetricName')839            showIndent(outfile, level)840            outfile.write('MetricName="%s",\n' % (self.MetricName,))841    def exportLiteralChildren(self, outfile, level, name_):842        pass843    def build(self, node):844        already_processed = set()845        self.buildAttributes(node, node.attrib, already_processed)846        for child in node:847            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]848            self.buildChildren(child, node, nodeName_)849        return self850    def buildAttributes(self, node, attrs, already_processed):851        value = find_attr_value_('_desynched_atts', node)852        if value is not None and '_desynched_atts' not in already_processed:853            already_processed.add('_desynched_atts')854            self._desynched_atts = value855        value = find_attr_value_('_derived', node)856        if value is not None and '_derived' not in already_processed:857            already_processed.add('_derived')858            self._derived = value859        value = find_attr_value_('_real_archetype', node)860        if value is not None and '_real_archetype' not in already_processed:861            already_processed.add('_real_archetype')862            if value in ('true', '1'):863                self._real_archetype = True864            elif value in ('false', '0'):865                self._real_archetype = False866            else:867                raise_parse_error(node, 'Bad boolean attribute')868        value = find_attr_value_('_archetype', node)869        if value is not None and '_archetype' not in already_processed:870            already_processed.add('_archetype')871            self._archetype = value872        value = find_attr_value_('ComponentInstanceID', node)873        if value is not None and 'ComponentInstanceID' not in already_processed:874            already_processed.add('ComponentInstanceID')875            self.ComponentInstanceID = value876        value = find_attr_value_('ComponentName', node)877        if value is not None and 'ComponentName' not in already_processed:878            already_processed.add('ComponentName')879            self.ComponentName = value880        value = find_attr_value_('ConfigurationID', node)881        if value is not None and 'ConfigurationID' not in already_processed:882            already_processed.add('ConfigurationID')883            self.ConfigurationID = value884        value = find_attr_value_('MetricID', node)885        if value is not None and 'MetricID' not in already_processed:886            already_processed.add('MetricID')887            self.MetricID = value888        value = find_attr_value_('MetricType', node)889        if value is not None and 'MetricType' not in already_processed:890            already_processed.add('MetricType')891            self.MetricType = value892        value = find_attr_value_('_subtype', node)893        if value is not None and '_subtype' not in already_processed:894            already_processed.add('_subtype')895            if value in ('true', '1'):896                self._subtype = True897            elif value in ('false', '0'):898                self._subtype = False899            else:900                raise_parse_error(node, 'Bad boolean attribute')901        value = find_attr_value_('ComponentType', node)902        if value is not None and 'ComponentType' not in already_processed:903            already_processed.add('ComponentType')904            self.ComponentType = value905        value = find_attr_value_('_instances', node)906        if value is not None and '_instances' not in already_processed:907            already_processed.add('_instances')908            self._instances = value909        value = find_attr_value_('Details', node)910        if value is not None and 'Details' not in already_processed:911            already_processed.add('Details')912            self.Details = value913        value = find_attr_value_('TopAssemblyComponentInstanceID', node)914        if value is not None and 'TopAssemblyComponentInstanceID' not in already_processed:915            already_processed.add('TopAssemblyComponentInstanceID')916            self.TopAssemblyComponentInstanceID = value917        value = find_attr_value_('RequestedValueType', node)918        if value is not None and 'RequestedValueType' not in already_processed:919            already_processed.add('RequestedValueType')920            self.RequestedValueType = value921        value = find_attr_value_('_id', node)922        if value is not None and '_id' not in already_processed:923            already_processed.add('_id')924            self._id = value925        value = find_attr_value_('MetricName', node)926        if value is not None and 'MetricName' not in already_processed:927            already_processed.add('MetricName')928            self.MetricName = value929    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):930        pass931# end class MetricType932933934class MetricsType(GeneratedsSuper):935    subclass = None936    superclass = None937    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, _libname=None, Metric=None, Metrics=None):938        self.original_tagname_ = None939        self._derived = _cast(None, _derived)940        self._real_archetype = _cast(bool, _real_archetype)941        self._archetype = _cast(None, _archetype)942        self._subtype = _cast(bool, _subtype)943        self._instances = _cast(None, _instances)944        self._desynched_atts = _cast(None, _desynched_atts)945        self._id = _cast(None, _id)946        self._libname = _cast(None, _libname)947        if Metric is None:948            self.Metric = []949        else:950            self.Metric = Metric951        if Metrics is None:952            self.Metrics = []953        else:954            self.Metrics = Metrics955    def factory(*args_, **kwargs_):956        if MetricsType.subclass:957            return MetricsType.subclass(*args_, **kwargs_)958        else:959            return MetricsType(*args_, **kwargs_)960    factory = staticmethod(factory)961    def get_Metric(self): return self.Metric962    def set_Metric(self, Metric): self.Metric = Metric963    def add_Metric(self, value): self.Metric.append(value)964    def insert_Metric(self, index, value): self.Metric[index] = value965    def get_Metrics(self): return self.Metrics966    def set_Metrics(self, Metrics): self.Metrics = Metrics967    def add_Metrics(self, value): self.Metrics.append(value)968    def insert_Metrics(self, index, value): self.Metrics[index] = value969    def get__derived(self): return self._derived970    def set__derived(self, _derived): self._derived = _derived971    def get__real_archetype(self): return self._real_archetype972    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype973    def get__archetype(self): return self._archetype974    def set__archetype(self, _archetype): self._archetype = _archetype975    def get__subtype(self): return self._subtype976    def set__subtype(self, _subtype): self._subtype = _subtype977    def get__instances(self): return self._instances978    def set__instances(self, _instances): self._instances = _instances979    def get__desynched_atts(self): return self._desynched_atts980    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts981    def get__id(self): return self._id982    def set__id(self, _id): self._id = _id983    def get__libname(self): return self._libname984    def set__libname(self, _libname): self._libname = _libname985    def hasContent_(self):986        if (987            self.Metric or988            self.Metrics989        ):990            return True991        else:992            return False993    def export(self, outfile, level, namespace_='', name_='MetricsType', namespacedef_='', pretty_print=True):994        if pretty_print:995            eol_ = '\n'996        else:997            eol_ = ''998        if self.original_tagname_ is not None:999            name_ = self.original_tagname_1000        showIndent(outfile, level, pretty_print)1001        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1002        already_processed = set()1003        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MetricsType')1004        if self.hasContent_():1005            outfile.write('>%s' % (eol_, ))1006            self.exportChildren(outfile, level + 1, namespace_='', name_='MetricsType', pretty_print=pretty_print)1007            showIndent(outfile, level, pretty_print)1008            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1009        else:1010            outfile.write('/>%s' % (eol_, ))1011    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MetricsType'):1012        if self._derived is not None and '_derived' not in already_processed:1013            already_processed.add('_derived')1014            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1015        if self._real_archetype is not None and '_real_archetype' not in already_processed:1016            already_processed.add('_real_archetype')1017            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1018        if self._archetype is not None and '_archetype' not in already_processed:1019            already_processed.add('_archetype')1020            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1021        if self._subtype is not None and '_subtype' not in already_processed:1022            already_processed.add('_subtype')1023            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1024        if self._instances is not None and '_instances' not in already_processed:1025            already_processed.add('_instances')1026            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1027        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1028            already_processed.add('_desynched_atts')1029            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1030        if self._id is not None and '_id' not in already_processed:1031            already_processed.add('_id')1032            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1033        if self._libname is not None and '_libname' not in already_processed:1034            already_processed.add('_libname')1035            outfile.write(' _libname=%s' % (self.gds_format_string(quote_attrib(self._libname).encode(ExternalEncoding), input_name='_libname'), ))1036    def exportChildren(self, outfile, level, namespace_='', name_='MetricsType', fromsubclass_=False, pretty_print=True):1037        if pretty_print:1038            eol_ = '\n'1039        else:1040            eol_ = ''1041        for Metric_ in self.Metric:1042            Metric_.export(outfile, level, namespace_, name_='Metric', pretty_print=pretty_print)1043        for Metrics_ in self.Metrics:1044            Metrics_.export(outfile, level, namespace_, name_='Metrics', pretty_print=pretty_print)1045    def exportLiteral(self, outfile, level, name_='MetricsType'):1046        level += 11047        already_processed = set()1048        self.exportLiteralAttributes(outfile, level, already_processed, name_)1049        if self.hasContent_():1050            self.exportLiteralChildren(outfile, level, name_)1051    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1052        if self._derived is not None and '_derived' not in already_processed:1053            already_processed.add('_derived')1054            showIndent(outfile, level)1055            outfile.write('_derived="%s",\n' % (self._derived,))1056        if self._real_archetype is not None and '_real_archetype' not in already_processed:1057            already_processed.add('_real_archetype')1058            showIndent(outfile, level)1059            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1060        if self._archetype is not None and '_archetype' not in already_processed:1061            already_processed.add('_archetype')1062            showIndent(outfile, level)1063            outfile.write('_archetype="%s",\n' % (self._archetype,))1064        if self._subtype is not None and '_subtype' not in already_processed:1065            already_processed.add('_subtype')1066            showIndent(outfile, level)1067            outfile.write('_subtype=%s,\n' % (self._subtype,))1068        if self._instances is not None and '_instances' not in already_processed:1069            already_processed.add('_instances')1070            showIndent(outfile, level)1071            outfile.write('_instances="%s",\n' % (self._instances,))1072        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1073            already_processed.add('_desynched_atts')1074            showIndent(outfile, level)1075            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1076        if self._id is not None and '_id' not in already_processed:1077            already_processed.add('_id')1078            showIndent(outfile, level)1079            outfile.write('_id="%s",\n' % (self._id,))1080        if self._libname is not None and '_libname' not in already_processed:1081            already_processed.add('_libname')1082            showIndent(outfile, level)1083            outfile.write('_libname="%s",\n' % (self._libname,))1084    def exportLiteralChildren(self, outfile, level, name_):1085        showIndent(outfile, level)1086        outfile.write('Metric=[\n')1087        level += 11088        for Metric_ in self.Metric:1089            showIndent(outfile, level)1090            outfile.write('model_.MetricType(\n')1091            Metric_.exportLiteral(outfile, level, name_='MetricType')1092            showIndent(outfile, level)1093            outfile.write('),\n')1094        level -= 11095        showIndent(outfile, level)1096        outfile.write('],\n')1097        showIndent(outfile, level)1098        outfile.write('Metrics=[\n')1099        level += 11100        for Metrics_ in self.Metrics:1101            showIndent(outfile, level)1102            outfile.write('model_.MetricsType(\n')1103            Metrics_.exportLiteral(outfile, level, name_='MetricsType')1104            showIndent(outfile, level)1105            outfile.write('),\n')1106        level -= 11107        showIndent(outfile, level)1108        outfile.write('],\n')1109    def build(self, node):1110        already_processed = set()1111        self.buildAttributes(node, node.attrib, already_processed)1112        for child in node:1113            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1114            self.buildChildren(child, node, nodeName_)1115        return self1116    def buildAttributes(self, node, attrs, already_processed):1117        value = find_attr_value_('_derived', node)1118        if value is not None and '_derived' not in already_processed:1119            already_processed.add('_derived')1120            self._derived = value1121        value = find_attr_value_('_real_archetype', node)1122        if value is not None and '_real_archetype' not in already_processed:1123            already_processed.add('_real_archetype')1124            if value in ('true', '1'):1125                self._real_archetype = True1126            elif value in ('false', '0'):1127                self._real_archetype = False1128            else:1129                raise_parse_error(node, 'Bad boolean attribute')1130        value = find_attr_value_('_archetype', node)1131        if value is not None and '_archetype' not in already_processed:1132            already_processed.add('_archetype')1133            self._archetype = value1134        value = find_attr_value_('_subtype', node)1135        if value is not None and '_subtype' not in already_processed:1136            already_processed.add('_subtype')1137            if value in ('true', '1'):1138                self._subtype = True1139            elif value in ('false', '0'):1140                self._subtype = False1141            else:1142                raise_parse_error(node, 'Bad boolean attribute')1143        value = find_attr_value_('_instances', node)1144        if value is not None and '_instances' not in already_processed:1145            already_processed.add('_instances')1146            self._instances = value1147        value = find_attr_value_('_desynched_atts', node)1148        if value is not None and '_desynched_atts' not in already_processed:1149            already_processed.add('_desynched_atts')1150            self._desynched_atts = value1151        value = find_attr_value_('_id', node)1152        if value is not None and '_id' not in already_processed:1153            already_processed.add('_id')1154            self._id = value1155        value = find_attr_value_('_libname', node)1156        if value is not None and '_libname' not in already_processed:1157            already_processed.add('_libname')1158            self._libname = value1159    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1160        if nodeName_ == 'Metric':1161            obj_ = MetricType.factory()1162            obj_.build(child_)1163            self.Metric.append(obj_)1164            obj_.original_tagname_ = 'Metric'1165        elif nodeName_ == 'Metrics':1166            obj_ = MetricsType.factory()1167            obj_.build(child_)1168            self.Metrics.append(obj_)1169            obj_.original_tagname_ = 'Metrics'1170# end class MetricsType117111721173class AssembliesType(GeneratedsSuper):1174    subclass = None1175    superclass = None1176    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, Assembly=None):1177        self.original_tagname_ = None1178        self._derived = _cast(None, _derived)1179        self._real_archetype = _cast(bool, _real_archetype)1180        self._archetype = _cast(None, _archetype)1181        self._subtype = _cast(bool, _subtype)1182        self._instances = _cast(None, _instances)1183        self._desynched_atts = _cast(None, _desynched_atts)1184        self._id = _cast(None, _id)1185        if Assembly is None:1186            self.Assembly = []1187        else:1188            self.Assembly = Assembly1189    def factory(*args_, **kwargs_):1190        if AssembliesType.subclass:1191            return AssembliesType.subclass(*args_, **kwargs_)1192        else:1193            return AssembliesType(*args_, **kwargs_)1194    factory = staticmethod(factory)1195    def get_Assembly(self): return self.Assembly1196    def set_Assembly(self, Assembly): self.Assembly = Assembly1197    def add_Assembly(self, value): self.Assembly.append(value)1198    def insert_Assembly(self, index, value): self.Assembly[index] = value1199    def get__derived(self): return self._derived1200    def set__derived(self, _derived): self._derived = _derived1201    def get__real_archetype(self): return self._real_archetype1202    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1203    def get__archetype(self): return self._archetype1204    def set__archetype(self, _archetype): self._archetype = _archetype1205    def get__subtype(self): return self._subtype1206    def set__subtype(self, _subtype): self._subtype = _subtype1207    def get__instances(self): return self._instances1208    def set__instances(self, _instances): self._instances = _instances1209    def get__desynched_atts(self): return self._desynched_atts1210    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1211    def get__id(self): return self._id1212    def set__id(self, _id): self._id = _id1213    def hasContent_(self):1214        if (1215            self.Assembly1216        ):1217            return True1218        else:1219            return False1220    def export(self, outfile, level, namespace_='', name_='AssembliesType', namespacedef_='', pretty_print=True):1221        if pretty_print:1222            eol_ = '\n'1223        else:1224            eol_ = ''1225        if self.original_tagname_ is not None:1226            name_ = self.original_tagname_1227        showIndent(outfile, level, pretty_print)1228        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1229        already_processed = set()1230        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AssembliesType')1231        if self.hasContent_():1232            outfile.write('>%s' % (eol_, ))1233            self.exportChildren(outfile, level + 1, namespace_='', name_='AssembliesType', pretty_print=pretty_print)1234            showIndent(outfile, level, pretty_print)1235            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1236        else:1237            outfile.write('/>%s' % (eol_, ))1238    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AssembliesType'):1239        if self._derived is not None and '_derived' not in already_processed:1240            already_processed.add('_derived')1241            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1242        if self._real_archetype is not None and '_real_archetype' not in already_processed:1243            already_processed.add('_real_archetype')1244            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1245        if self._archetype is not None and '_archetype' not in already_processed:1246            already_processed.add('_archetype')1247            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1248        if self._subtype is not None and '_subtype' not in already_processed:1249            already_processed.add('_subtype')1250            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1251        if self._instances is not None and '_instances' not in already_processed:1252            already_processed.add('_instances')1253            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1254        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1255            already_processed.add('_desynched_atts')1256            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1257        if self._id is not None and '_id' not in already_processed:1258            already_processed.add('_id')1259            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1260    def exportChildren(self, outfile, level, namespace_='', name_='AssembliesType', fromsubclass_=False, pretty_print=True):1261        if pretty_print:1262            eol_ = '\n'1263        else:1264            eol_ = ''1265        for Assembly_ in self.Assembly:1266            Assembly_.export(outfile, level, namespace_, name_='Assembly', pretty_print=pretty_print)1267    def exportLiteral(self, outfile, level, name_='AssembliesType'):1268        level += 11269        already_processed = set()1270        self.exportLiteralAttributes(outfile, level, already_processed, name_)1271        if self.hasContent_():1272            self.exportLiteralChildren(outfile, level, name_)1273    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1274        if self._derived is not None and '_derived' not in already_processed:1275            already_processed.add('_derived')1276            showIndent(outfile, level)1277            outfile.write('_derived="%s",\n' % (self._derived,))1278        if self._real_archetype is not None and '_real_archetype' not in already_processed:1279            already_processed.add('_real_archetype')1280            showIndent(outfile, level)1281            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1282        if self._archetype is not None and '_archetype' not in already_processed:1283            already_processed.add('_archetype')1284            showIndent(outfile, level)1285            outfile.write('_archetype="%s",\n' % (self._archetype,))1286        if self._subtype is not None and '_subtype' not in already_processed:1287            already_processed.add('_subtype')1288            showIndent(outfile, level)1289            outfile.write('_subtype=%s,\n' % (self._subtype,))1290        if self._instances is not None and '_instances' not in already_processed:1291            already_processed.add('_instances')1292            showIndent(outfile, level)1293            outfile.write('_instances="%s",\n' % (self._instances,))1294        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1295            already_processed.add('_desynched_atts')1296            showIndent(outfile, level)1297            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1298        if self._id is not None and '_id' not in already_processed:1299            already_processed.add('_id')1300            showIndent(outfile, level)1301            outfile.write('_id="%s",\n' % (self._id,))1302    def exportLiteralChildren(self, outfile, level, name_):1303        showIndent(outfile, level)1304        outfile.write('Assembly=[\n')1305        level += 11306        for Assembly_ in self.Assembly:1307            showIndent(outfile, level)1308            outfile.write('model_.AssemblyType(\n')1309            Assembly_.exportLiteral(outfile, level, name_='AssemblyType')1310            showIndent(outfile, level)1311            outfile.write('),\n')1312        level -= 11313        showIndent(outfile, level)1314        outfile.write('],\n')1315    def build(self, node):1316        already_processed = set()1317        self.buildAttributes(node, node.attrib, already_processed)1318        for child in node:1319            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1320            self.buildChildren(child, node, nodeName_)1321        return self1322    def buildAttributes(self, node, attrs, already_processed):1323        value = find_attr_value_('_derived', node)1324        if value is not None and '_derived' not in already_processed:1325            already_processed.add('_derived')1326            self._derived = value1327        value = find_attr_value_('_real_archetype', node)1328        if value is not None and '_real_archetype' not in already_processed:1329            already_processed.add('_real_archetype')1330            if value in ('true', '1'):1331                self._real_archetype = True1332            elif value in ('false', '0'):1333                self._real_archetype = False1334            else:1335                raise_parse_error(node, 'Bad boolean attribute')1336        value = find_attr_value_('_archetype', node)1337        if value is not None and '_archetype' not in already_processed:1338            already_processed.add('_archetype')1339            self._archetype = value1340        value = find_attr_value_('_subtype', node)1341        if value is not None and '_subtype' not in already_processed:1342            already_processed.add('_subtype')1343            if value in ('true', '1'):1344                self._subtype = True1345            elif value in ('false', '0'):1346                self._subtype = False1347            else:1348                raise_parse_error(node, 'Bad boolean attribute')1349        value = find_attr_value_('_instances', node)1350        if value is not None and '_instances' not in already_processed:1351            already_processed.add('_instances')1352            self._instances = value1353        value = find_attr_value_('_desynched_atts', node)1354        if value is not None and '_desynched_atts' not in already_processed:1355            already_processed.add('_desynched_atts')1356            self._desynched_atts = value1357        value = find_attr_value_('_id', node)1358        if value is not None and '_id' not in already_processed:1359            already_processed.add('_id')1360            self._id = value1361    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1362        if nodeName_ == 'Assembly':1363            obj_ = AssemblyType.factory()1364            obj_.build(child_)1365            self.Assembly.append(obj_)1366            obj_.original_tagname_ = 'Assembly'1367# end class AssembliesType136813691370class ComponentType(GeneratedsSuper):1371    subclass = None1372    superclass = None1373    def __init__(self, _desynched_atts=None, _derived=None, _real_archetype=None, Name=None, ComponentInstanceID=None, FEAElementType=None, MaterialID=None, FEAElementID=None, _instances=None, _archetype=None, _subtype=None, _id=None, Type=None, Component=None):1374        self.original_tagname_ = None1375        self._desynched_atts = _cast(None, _desynched_atts)1376        self._derived = _cast(None, _derived)1377        self._real_archetype = _cast(bool, _real_archetype)1378        self.Name = _cast(None, Name)1379        self.ComponentInstanceID = _cast(None, ComponentInstanceID)1380        self.FEAElementType = _cast(None, FEAElementType)1381        self.MaterialID = _cast(None, MaterialID)1382        self.FEAElementID = _cast(None, FEAElementID)1383        self._instances = _cast(None, _instances)1384        self._archetype = _cast(None, _archetype)1385        self._subtype = _cast(bool, _subtype)1386        self._id = _cast(None, _id)1387        self.Type = _cast(None, Type)1388        if Component is None:1389            self.Component = []1390        else:1391            self.Component = Component1392    def factory(*args_, **kwargs_):1393        if ComponentType.subclass:1394            return ComponentType.subclass(*args_, **kwargs_)1395        else:1396            return ComponentType(*args_, **kwargs_)1397    factory = staticmethod(factory)1398    def get_Component(self): return self.Component1399    def set_Component(self, Component): self.Component = Component1400    def add_Component(self, value): self.Component.append(value)1401    def insert_Component(self, index, value): self.Component[index] = value1402    def get__desynched_atts(self): return self._desynched_atts1403    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1404    def get__derived(self): return self._derived1405    def set__derived(self, _derived): self._derived = _derived1406    def get__real_archetype(self): return self._real_archetype1407    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1408    def get_Name(self): return self.Name1409    def set_Name(self, Name): self.Name = Name1410    def get_ComponentInstanceID(self): return self.ComponentInstanceID1411    def set_ComponentInstanceID(self, ComponentInstanceID): self.ComponentInstanceID = ComponentInstanceID1412    def get_FEAElementType(self): return self.FEAElementType1413    def set_FEAElementType(self, FEAElementType): self.FEAElementType = FEAElementType1414    def get_MaterialID(self): return self.MaterialID1415    def set_MaterialID(self, MaterialID): self.MaterialID = MaterialID1416    def get_FEAElementID(self): return self.FEAElementID1417    def set_FEAElementID(self, FEAElementID): self.FEAElementID = FEAElementID1418    def get__instances(self): return self._instances1419    def set__instances(self, _instances): self._instances = _instances1420    def get__archetype(self): return self._archetype1421    def set__archetype(self, _archetype): self._archetype = _archetype1422    def get__subtype(self): return self._subtype1423    def set__subtype(self, _subtype): self._subtype = _subtype1424    def get__id(self): return self._id1425    def set__id(self, _id): self._id = _id1426    def get_Type(self): return self.Type1427    def set_Type(self, Type): self.Type = Type1428    def hasContent_(self):1429        if (1430            self.Component1431        ):1432            return True1433        else:1434            return False1435    def export(self, outfile, level, namespace_='', name_='ComponentType', namespacedef_='', pretty_print=True):1436        if pretty_print:1437            eol_ = '\n'1438        else:1439            eol_ = ''1440        if self.original_tagname_ is not None:1441            name_ = self.original_tagname_1442        showIndent(outfile, level, pretty_print)1443        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1444        already_processed = set()1445        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ComponentType')1446        if self.hasContent_():1447            outfile.write('>%s' % (eol_, ))1448            self.exportChildren(outfile, level + 1, namespace_='', name_='ComponentType', pretty_print=pretty_print)1449            showIndent(outfile, level, pretty_print)1450            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1451        else:1452            outfile.write('/>%s' % (eol_, ))1453    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ComponentType'):1454        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1455            already_processed.add('_desynched_atts')1456            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1457        if self._derived is not None and '_derived' not in already_processed:1458            already_processed.add('_derived')1459            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1460        if self._real_archetype is not None and '_real_archetype' not in already_processed:1461            already_processed.add('_real_archetype')1462            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1463        if self.Name is not None and 'Name' not in already_processed:1464            already_processed.add('Name')1465            outfile.write(' Name=%s' % (self.gds_format_string(quote_attrib(self.Name).encode(ExternalEncoding), input_name='Name'), ))1466        if self.ComponentInstanceID is not None and 'ComponentInstanceID' not in already_processed:1467            already_processed.add('ComponentInstanceID')1468            outfile.write(' ComponentInstanceID=%s' % (self.gds_format_string(quote_attrib(self.ComponentInstanceID).encode(ExternalEncoding), input_name='ComponentInstanceID'), ))1469        if self.FEAElementType is not None and 'FEAElementType' not in already_processed:1470            already_processed.add('FEAElementType')1471            outfile.write(' FEAElementType=%s' % (self.gds_format_string(quote_attrib(self.FEAElementType).encode(ExternalEncoding), input_name='FEAElementType'), ))1472        if self.MaterialID is not None and 'MaterialID' not in already_processed:1473            already_processed.add('MaterialID')1474            outfile.write(' MaterialID=%s' % (self.gds_format_string(quote_attrib(self.MaterialID).encode(ExternalEncoding), input_name='MaterialID'), ))1475        if self.FEAElementID is not None and 'FEAElementID' not in already_processed:1476            already_processed.add('FEAElementID')1477            outfile.write(' FEAElementID=%s' % (self.gds_format_string(quote_attrib(self.FEAElementID).encode(ExternalEncoding), input_name='FEAElementID'), ))1478        if self._instances is not None and '_instances' not in already_processed:1479            already_processed.add('_instances')1480            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1481        if self._archetype is not None and '_archetype' not in already_processed:1482            already_processed.add('_archetype')1483            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1484        if self._subtype is not None and '_subtype' not in already_processed:1485            already_processed.add('_subtype')1486            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1487        if self._id is not None and '_id' not in already_processed:1488            already_processed.add('_id')1489            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1490        if self.Type is not None and 'Type' not in already_processed:1491            already_processed.add('Type')1492            outfile.write(' Type=%s' % (self.gds_format_string(quote_attrib(self.Type).encode(ExternalEncoding), input_name='Type'), ))1493    def exportChildren(self, outfile, level, namespace_='', name_='ComponentType', fromsubclass_=False, pretty_print=True):1494        if pretty_print:1495            eol_ = '\n'1496        else:1497            eol_ = ''1498        for Component_ in self.Component:1499            Component_.export(outfile, level, namespace_, name_='Component', pretty_print=pretty_print)1500    def exportLiteral(self, outfile, level, name_='ComponentType'):1501        level += 11502        already_processed = set()1503        self.exportLiteralAttributes(outfile, level, already_processed, name_)1504        if self.hasContent_():1505            self.exportLiteralChildren(outfile, level, name_)1506    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1507        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1508            already_processed.add('_desynched_atts')1509            showIndent(outfile, level)1510            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1511        if self._derived is not None and '_derived' not in already_processed:1512            already_processed.add('_derived')1513            showIndent(outfile, level)1514            outfile.write('_derived="%s",\n' % (self._derived,))1515        if self._real_archetype is not None and '_real_archetype' not in already_processed:1516            already_processed.add('_real_archetype')1517            showIndent(outfile, level)1518            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1519        if self.Name is not None and 'Name' not in already_processed:1520            already_processed.add('Name')1521            showIndent(outfile, level)1522            outfile.write('Name="%s",\n' % (self.Name,))1523        if self.ComponentInstanceID is not None and 'ComponentInstanceID' not in already_processed:1524            already_processed.add('ComponentInstanceID')1525            showIndent(outfile, level)1526            outfile.write('ComponentInstanceID="%s",\n' % (self.ComponentInstanceID,))1527        if self.FEAElementType is not None and 'FEAElementType' not in already_processed:1528            already_processed.add('FEAElementType')1529            showIndent(outfile, level)1530            outfile.write('FEAElementType="%s",\n' % (self.FEAElementType,))1531        if self.MaterialID is not None and 'MaterialID' not in already_processed:1532            already_processed.add('MaterialID')1533            showIndent(outfile, level)1534            outfile.write('MaterialID="%s",\n' % (self.MaterialID,))1535        if self.FEAElementID is not None and 'FEAElementID' not in already_processed:1536            already_processed.add('FEAElementID')1537            showIndent(outfile, level)1538            outfile.write('FEAElementID="%s",\n' % (self.FEAElementID,))1539        if self._instances is not None and '_instances' not in already_processed:1540            already_processed.add('_instances')1541            showIndent(outfile, level)1542            outfile.write('_instances="%s",\n' % (self._instances,))1543        if self._archetype is not None and '_archetype' not in already_processed:1544            already_processed.add('_archetype')1545            showIndent(outfile, level)1546            outfile.write('_archetype="%s",\n' % (self._archetype,))1547        if self._subtype is not None and '_subtype' not in already_processed:1548            already_processed.add('_subtype')1549            showIndent(outfile, level)1550            outfile.write('_subtype=%s,\n' % (self._subtype,))1551        if self._id is not None and '_id' not in already_processed:1552            already_processed.add('_id')1553            showIndent(outfile, level)1554            outfile.write('_id="%s",\n' % (self._id,))1555        if self.Type is not None and 'Type' not in already_processed:1556            already_processed.add('Type')1557            showIndent(outfile, level)1558            outfile.write('Type="%s",\n' % (self.Type,))1559    def exportLiteralChildren(self, outfile, level, name_):1560        showIndent(outfile, level)1561        outfile.write('Component=[\n')1562        level += 11563        for Component_ in self.Component:1564            showIndent(outfile, level)1565            outfile.write('model_.ComponentType(\n')1566            Component_.exportLiteral(outfile, level, name_='ComponentType')1567            showIndent(outfile, level)1568            outfile.write('),\n')1569        level -= 11570        showIndent(outfile, level)1571        outfile.write('],\n')1572    def build(self, node):1573        already_processed = set()1574        self.buildAttributes(node, node.attrib, already_processed)1575        for child in node:1576            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1577            self.buildChildren(child, node, nodeName_)1578        return self1579    def buildAttributes(self, node, attrs, already_processed):1580        value = find_attr_value_('_desynched_atts', node)1581        if value is not None and '_desynched_atts' not in already_processed:1582            already_processed.add('_desynched_atts')1583            self._desynched_atts = value1584        value = find_attr_value_('_derived', node)1585        if value is not None and '_derived' not in already_processed:1586            already_processed.add('_derived')1587            self._derived = value1588        value = find_attr_value_('_real_archetype', node)1589        if value is not None and '_real_archetype' not in already_processed:1590            already_processed.add('_real_archetype')1591            if value in ('true', '1'):1592                self._real_archetype = True1593            elif value in ('false', '0'):1594                self._real_archetype = False1595            else:1596                raise_parse_error(node, 'Bad boolean attribute')1597        value = find_attr_value_('Name', node)1598        if value is not None and 'Name' not in already_processed:1599            already_processed.add('Name')1600            self.Name = value1601        value = find_attr_value_('ComponentInstanceID', node)1602        if value is not None and 'ComponentInstanceID' not in already_processed:1603            already_processed.add('ComponentInstanceID')1604            self.ComponentInstanceID = value1605        value = find_attr_value_('FEAElementType', node)1606        if value is not None and 'FEAElementType' not in already_processed:1607            already_processed.add('FEAElementType')1608            self.FEAElementType = value1609        value = find_attr_value_('MaterialID', node)1610        if value is not None and 'MaterialID' not in already_processed:1611            already_processed.add('MaterialID')1612            self.MaterialID = value1613        value = find_attr_value_('FEAElementID', node)1614        if value is not None and 'FEAElementID' not in already_processed:1615            already_processed.add('FEAElementID')1616            self.FEAElementID = value1617        value = find_attr_value_('_instances', node)1618        if value is not None and '_instances' not in already_processed:1619            already_processed.add('_instances')1620            self._instances = value1621        value = find_attr_value_('_archetype', node)1622        if value is not None and '_archetype' not in already_processed:1623            already_processed.add('_archetype')1624            self._archetype = value1625        value = find_attr_value_('_subtype', node)1626        if value is not None and '_subtype' not in already_processed:1627            already_processed.add('_subtype')1628            if value in ('true', '1'):1629                self._subtype = True1630            elif value in ('false', '0'):1631                self._subtype = False1632            else:1633                raise_parse_error(node, 'Bad boolean attribute')1634        value = find_attr_value_('_id', node)1635        if value is not None and '_id' not in already_processed:1636            already_processed.add('_id')1637            self._id = value1638        value = find_attr_value_('Type', node)1639        if value is not None and 'Type' not in already_processed:1640            already_processed.add('Type')1641            self.Type = value1642    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1643        if nodeName_ == 'Component':1644            obj_ = ComponentType.factory()1645            obj_.build(child_)1646            self.Component.append(obj_)1647            obj_.original_tagname_ = 'Component'1648# end class ComponentType164916501651class AssemblyType(GeneratedsSuper):1652    subclass = None1653    superclass = None1654    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, ConfigurationID=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, Component=None):1655        self.original_tagname_ = None1656        self._derived = _cast(None, _derived)1657        self._real_archetype = _cast(bool, _real_archetype)1658        self._archetype = _cast(None, _archetype)1659        self.ConfigurationID = _cast(None, ConfigurationID)1660        self._subtype = _cast(bool, _subtype)1661        self._instances = _cast(None, _instances)1662        self._desynched_atts = _cast(None, _desynched_atts)1663        self._id = _cast(None, _id)1664        if Component is None:1665            self.Component = []1666        else:1667            self.Component = Component1668    def factory(*args_, **kwargs_):1669        if AssemblyType.subclass:1670            return AssemblyType.subclass(*args_, **kwargs_)1671        else:1672            return AssemblyType(*args_, **kwargs_)1673    factory = staticmethod(factory)1674    def get_Component(self): return self.Component1675    def set_Component(self, Component): self.Component = Component1676    def add_Component(self, value): self.Component.append(value)1677    def insert_Component(self, index, value): self.Component[index] = value1678    def get__derived(self): return self._derived1679    def set__derived(self, _derived): self._derived = _derived1680    def get__real_archetype(self): return self._real_archetype1681    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1682    def get__archetype(self): return self._archetype1683    def set__archetype(self, _archetype): self._archetype = _archetype1684    def get_ConfigurationID(self): return self.ConfigurationID1685    def set_ConfigurationID(self, ConfigurationID): self.ConfigurationID = ConfigurationID1686    def get__subtype(self): return self._subtype1687    def set__subtype(self, _subtype): self._subtype = _subtype1688    def get__instances(self): return self._instances1689    def set__instances(self, _instances): self._instances = _instances1690    def get__desynched_atts(self): return self._desynched_atts1691    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1692    def get__id(self): return self._id1693    def set__id(self, _id): self._id = _id1694    def hasContent_(self):1695        if (1696            self.Component1697        ):1698            return True1699        else:1700            return False1701    def export(self, outfile, level, namespace_='', name_='AssemblyType', namespacedef_='', pretty_print=True):1702        if pretty_print:1703            eol_ = '\n'1704        else:1705            eol_ = ''1706        if self.original_tagname_ is not None:1707            name_ = self.original_tagname_1708        showIndent(outfile, level, pretty_print)1709        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1710        already_processed = set()1711        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AssemblyType')1712        if self.hasContent_():1713            outfile.write('>%s' % (eol_, ))1714            self.exportChildren(outfile, level + 1, namespace_='', name_='AssemblyType', pretty_print=pretty_print)1715            showIndent(outfile, level, pretty_print)1716            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1717        else:1718            outfile.write('/>%s' % (eol_, ))1719    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AssemblyType'):1720        if self._derived is not None and '_derived' not in already_processed:1721            already_processed.add('_derived')1722            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1723        if self._real_archetype is not None and '_real_archetype' not in already_processed:1724            already_processed.add('_real_archetype')1725            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1726        if self._archetype is not None and '_archetype' not in already_processed:1727            already_processed.add('_archetype')1728            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1729        if self.ConfigurationID is not None and 'ConfigurationID' not in already_processed:1730            already_processed.add('ConfigurationID')1731            outfile.write(' ConfigurationID=%s' % (self.gds_format_string(quote_attrib(self.ConfigurationID).encode(ExternalEncoding), input_name='ConfigurationID'), ))1732        if self._subtype is not None and '_subtype' not in already_processed:1733            already_processed.add('_subtype')1734            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1735        if self._instances is not None and '_instances' not in already_processed:1736            already_processed.add('_instances')1737            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1738        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1739            already_processed.add('_desynched_atts')1740            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1741        if self._id is not None and '_id' not in already_processed:1742            already_processed.add('_id')1743            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1744    def exportChildren(self, outfile, level, namespace_='', name_='AssemblyType', fromsubclass_=False, pretty_print=True):1745        if pretty_print:1746            eol_ = '\n'1747        else:1748            eol_ = ''1749        for Component_ in self.Component:1750            Component_.export(outfile, level, namespace_, name_='Component', pretty_print=pretty_print)1751    def exportLiteral(self, outfile, level, name_='AssemblyType'):1752        level += 11753        already_processed = set()1754        self.exportLiteralAttributes(outfile, level, already_processed, name_)1755        if self.hasContent_():1756            self.exportLiteralChildren(outfile, level, name_)1757    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1758        if self._derived is not None and '_derived' not in already_processed:1759            already_processed.add('_derived')1760            showIndent(outfile, level)1761            outfile.write('_derived="%s",\n' % (self._derived,))1762        if self._real_archetype is not None and '_real_archetype' not in already_processed:1763            already_processed.add('_real_archetype')1764            showIndent(outfile, level)1765            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1766        if self._archetype is not None and '_archetype' not in already_processed:1767            already_processed.add('_archetype')1768            showIndent(outfile, level)1769            outfile.write('_archetype="%s",\n' % (self._archetype,))1770        if self.ConfigurationID is not None and 'ConfigurationID' not in already_processed:1771            already_processed.add('ConfigurationID')1772            showIndent(outfile, level)1773            outfile.write('ConfigurationID="%s",\n' % (self.ConfigurationID,))1774        if self._subtype is not None and '_subtype' not in already_processed:1775            already_processed.add('_subtype')1776            showIndent(outfile, level)1777            outfile.write('_subtype=%s,\n' % (self._subtype,))1778        if self._instances is not None and '_instances' not in already_processed:1779            already_processed.add('_instances')1780            showIndent(outfile, level)1781            outfile.write('_instances="%s",\n' % (self._instances,))1782        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1783            already_processed.add('_desynched_atts')1784            showIndent(outfile, level)1785            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1786        if self._id is not None and '_id' not in already_processed:1787            already_processed.add('_id')1788            showIndent(outfile, level)1789            outfile.write('_id="%s",\n' % (self._id,))1790    def exportLiteralChildren(self, outfile, level, name_):1791        showIndent(outfile, level)1792        outfile.write('Component=[\n')1793        level += 11794        for Component_ in self.Component:1795            showIndent(outfile, level)1796            outfile.write('model_.ComponentType(\n')1797            Component_.exportLiteral(outfile, level, name_='ComponentType')1798            showIndent(outfile, level)1799            outfile.write('),\n')1800        level -= 11801        showIndent(outfile, level)1802        outfile.write('],\n')1803    def build(self, node):1804        already_processed = set()1805        self.buildAttributes(node, node.attrib, already_processed)1806        for child in node:1807            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1808            self.buildChildren(child, node, nodeName_)1809        return self1810    def buildAttributes(self, node, attrs, already_processed):1811        value = find_attr_value_('_derived', node)1812        if value is not None and '_derived' not in already_processed:1813            already_processed.add('_derived')1814            self._derived = value1815        value = find_attr_value_('_real_archetype', node)1816        if value is not None and '_real_archetype' not in already_processed:1817            already_processed.add('_real_archetype')1818            if value in ('true', '1'):1819                self._real_archetype = True1820            elif value in ('false', '0'):1821                self._real_archetype = False1822            else:1823                raise_parse_error(node, 'Bad boolean attribute')1824        value = find_attr_value_('_archetype', node)1825        if value is not None and '_archetype' not in already_processed:1826            already_processed.add('_archetype')1827            self._archetype = value1828        value = find_attr_value_('ConfigurationID', node)1829        if value is not None and 'ConfigurationID' not in already_processed:1830            already_processed.add('ConfigurationID')1831            self.ConfigurationID = value1832        value = find_attr_value_('_subtype', node)1833        if value is not None and '_subtype' not in already_processed:1834            already_processed.add('_subtype')1835            if value in ('true', '1'):1836                self._subtype = True1837            elif value in ('false', '0'):1838                self._subtype = False1839            else:1840                raise_parse_error(node, 'Bad boolean attribute')1841        value = find_attr_value_('_instances', node)1842        if value is not None and '_instances' not in already_processed:1843            already_processed.add('_instances')1844            self._instances = value1845        value = find_attr_value_('_desynched_atts', node)1846        if value is not None and '_desynched_atts' not in already_processed:1847            already_processed.add('_desynched_atts')1848            self._desynched_atts = value1849        value = find_attr_value_('_id', node)1850        if value is not None and '_id' not in already_processed:1851            already_processed.add('_id')1852            self._id = value1853    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1854        if nodeName_ == 'Component':1855            obj_ = ComponentType.factory()1856            obj_.build(child_)1857            self.Component.append(obj_)1858            obj_.original_tagname_ = 'Component'1859# end class AssemblyType186018611862class LifeCycleType(GeneratedsSuper):1863    subclass = None1864    superclass = None1865    def __init__(self, _derived=None, _real_archetype=None, _desynched_atts=None, _subtype=None, _instances=None, _archetype=None, NumberOfCycles=None, Duration=None, _id=None):1866        self.original_tagname_ = None1867        self._derived = _cast(None, _derived)1868        self._real_archetype = _cast(bool, _real_archetype)1869        self._desynched_atts = _cast(None, _desynched_atts)1870        self._subtype = _cast(bool, _subtype)1871        self._instances = _cast(None, _instances)1872        self._archetype = _cast(None, _archetype)1873        self.NumberOfCycles = _cast(int, NumberOfCycles)1874        self.Duration = _cast(None, Duration)1875        self._id = _cast(None, _id)1876    def factory(*args_, **kwargs_):1877        if LifeCycleType.subclass:1878            return LifeCycleType.subclass(*args_, **kwargs_)1879        else:1880            return LifeCycleType(*args_, **kwargs_)1881    factory = staticmethod(factory)1882    def get__derived(self): return self._derived1883    def set__derived(self, _derived): self._derived = _derived1884    def get__real_archetype(self): return self._real_archetype1885    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1886    def get__desynched_atts(self): return self._desynched_atts1887    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1888    def get__subtype(self): return self._subtype1889    def set__subtype(self, _subtype): self._subtype = _subtype1890    def get__instances(self): return self._instances1891    def set__instances(self, _instances): self._instances = _instances1892    def get__archetype(self): return self._archetype1893    def set__archetype(self, _archetype): self._archetype = _archetype1894    def get_NumberOfCycles(self): return self.NumberOfCycles1895    def set_NumberOfCycles(self, NumberOfCycles): self.NumberOfCycles = NumberOfCycles1896    def get_Duration(self): return self.Duration1897    def set_Duration(self, Duration): self.Duration = Duration1898    def get__id(self): return self._id1899    def set__id(self, _id): self._id = _id1900    def hasContent_(self):1901        if (19021903        ):1904            return True1905        else:1906            return False1907    def export(self, outfile, level, namespace_='', name_='LifeCycleType', namespacedef_='', pretty_print=True):1908        if pretty_print:1909            eol_ = '\n'1910        else:1911            eol_ = ''1912        if self.original_tagname_ is not None:1913            name_ = self.original_tagname_1914        showIndent(outfile, level, pretty_print)1915        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1916        already_processed = set()1917        self.exportAttributes(outfile, level, already_processed, namespace_, name_='LifeCycleType')1918        if self.hasContent_():1919            outfile.write('>%s' % (eol_, ))1920            self.exportChildren(outfile, level + 1, namespace_='', name_='LifeCycleType', pretty_print=pretty_print)1921            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1922        else:1923            outfile.write('/>%s' % (eol_, ))1924    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='LifeCycleType'):1925        if self._derived is not None and '_derived' not in already_processed:1926            already_processed.add('_derived')1927            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1928        if self._real_archetype is not None and '_real_archetype' not in already_processed:1929            already_processed.add('_real_archetype')1930            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1931        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1932            already_processed.add('_desynched_atts')1933            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1934        if self._subtype is not None and '_subtype' not in already_processed:1935            already_processed.add('_subtype')1936            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1937        if self._instances is not None and '_instances' not in already_processed:1938            already_processed.add('_instances')1939            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1940        if self._archetype is not None and '_archetype' not in already_processed:1941            already_processed.add('_archetype')1942            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1943        if self.NumberOfCycles is not None and 'NumberOfCycles' not in already_processed:1944            already_processed.add('NumberOfCycles')1945            outfile.write(' NumberOfCycles="%s"' % self.gds_format_integer(self.NumberOfCycles, input_name='NumberOfCycles'))1946        if self.Duration is not None and 'Duration' not in already_processed:1947            already_processed.add('Duration')1948            outfile.write(' Duration=%s' % (self.gds_format_string(quote_attrib(self.Duration).encode(ExternalEncoding), input_name='Duration'), ))1949        if self._id is not None and '_id' not in already_processed:1950            already_processed.add('_id')1951            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1952    def exportChildren(self, outfile, level, namespace_='', name_='LifeCycleType', fromsubclass_=False, pretty_print=True):1953        pass1954    def exportLiteral(self, outfile, level, name_='LifeCycleType'):1955        level += 11956        already_processed = set()1957        self.exportLiteralAttributes(outfile, level, already_processed, name_)1958        if self.hasContent_():1959            self.exportLiteralChildren(outfile, level, name_)1960    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1961        if self._derived is not None and '_derived' not in already_processed:1962            already_processed.add('_derived')1963            showIndent(outfile, level)1964            outfile.write('_derived="%s",\n' % (self._derived,))1965        if self._real_archetype is not None and '_real_archetype' not in already_processed:1966            already_processed.add('_real_archetype')1967            showIndent(outfile, level)1968            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1969        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1970            already_processed.add('_desynched_atts')1971            showIndent(outfile, level)1972            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1973        if self._subtype is not None and '_subtype' not in already_processed:1974            already_processed.add('_subtype')1975            showIndent(outfile, level)1976            outfile.write('_subtype=%s,\n' % (self._subtype,))1977        if self._instances is not None and '_instances' not in already_processed:1978            already_processed.add('_instances')1979            showIndent(outfile, level)1980            outfile.write('_instances="%s",\n' % (self._instances,))1981        if self._archetype is not None and '_archetype' not in already_processed:1982            already_processed.add('_archetype')1983            showIndent(outfile, level)1984            outfile.write('_archetype="%s",\n' % (self._archetype,))1985        if self.NumberOfCycles is not None and 'NumberOfCycles' not in already_processed:1986            already_processed.add('NumberOfCycles')1987            showIndent(outfile, level)1988            outfile.write('NumberOfCycles=%d,\n' % (self.NumberOfCycles,))1989        if self.Duration is not None and 'Duration' not in already_processed:1990            already_processed.add('Duration')1991            showIndent(outfile, level)1992            outfile.write('Duration="%s",\n' % (self.Duration,))1993        if self._id is not None and '_id' not in already_processed:1994            already_processed.add('_id')1995            showIndent(outfile, level)1996            outfile.write('_id="%s",\n' % (self._id,))1997    def exportLiteralChildren(self, outfile, level, name_):1998        pass1999    def build(self, node):2000        already_processed = set()2001        self.buildAttributes(node, node.attrib, already_processed)2002        for child in node:2003            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2004            self.buildChildren(child, node, nodeName_)2005        return self2006    def buildAttributes(self, node, attrs, already_processed):2007        value = find_attr_value_('_derived', node)2008        if value is not None and '_derived' not in already_processed:2009            already_processed.add('_derived')2010            self._derived = value2011        value = find_attr_value_('_real_archetype', node)2012        if value is not None and '_real_archetype' not in already_processed:2013            already_processed.add('_real_archetype')2014            if value in ('true', '1'):2015                self._real_archetype = True2016            elif value in ('false', '0'):2017                self._real_archetype = False2018            else:2019                raise_parse_error(node, 'Bad boolean attribute')2020        value = find_attr_value_('_desynched_atts', node)2021        if value is not None and '_desynched_atts' not in already_processed:2022            already_processed.add('_desynched_atts')2023            self._desynched_atts = value2024        value = find_attr_value_('_subtype', node)2025        if value is not None and '_subtype' not in already_processed:2026            already_processed.add('_subtype')2027            if value in ('true', '1'):2028                self._subtype = True2029            elif value in ('false', '0'):2030                self._subtype = False2031            else:2032                raise_parse_error(node, 'Bad boolean attribute')2033        value = find_attr_value_('_instances', node)2034        if value is not None and '_instances' not in already_processed:2035            already_processed.add('_instances')2036            self._instances = value2037        value = find_attr_value_('_archetype', node)2038        if value is not None and '_archetype' not in already_processed:2039            already_processed.add('_archetype')2040            self._archetype = value2041        value = find_attr_value_('NumberOfCycles', node)2042        if value is not None and 'NumberOfCycles' not in already_processed:2043            already_processed.add('NumberOfCycles')2044            try:2045                self.NumberOfCycles = int(value)2046            except ValueError, exp:2047                raise_parse_error(node, 'Bad integer attribute: %s' % exp)2048        value = find_attr_value_('Duration', node)2049        if value is not None and 'Duration' not in already_processed:2050            already_processed.add('Duration')2051            self.Duration = value2052        value = find_attr_value_('_id', node)2053        if value is not None and '_id' not in already_processed:2054            already_processed.add('_id')2055            self._id = value2056    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2057        pass2058# end class LifeCycleType205920602061class AnalysisSupportingDataType(GeneratedsSuper):2062    subclass = None2063    superclass = None2064    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, AnalysisType=None, _id=None, LifeCycle=None):2065        self.original_tagname_ = None2066        self._derived = _cast(None, _derived)2067        self._real_archetype = _cast(bool, _real_archetype)2068        self._archetype = _cast(None, _archetype)2069        self._subtype = _cast(bool, _subtype)2070        self._instances = _cast(None, _instances)2071        self._desynched_atts = _cast(None, _desynched_atts)2072        self.AnalysisType = _cast(None, AnalysisType)2073        self._id = _cast(None, _id)2074        self.LifeCycle = LifeCycle2075    def factory(*args_, **kwargs_):2076        if AnalysisSupportingDataType.subclass:2077            return AnalysisSupportingDataType.subclass(*args_, **kwargs_)2078        else:2079            return AnalysisSupportingDataType(*args_, **kwargs_)2080    factory = staticmethod(factory)2081    def get_LifeCycle(self): return self.LifeCycle2082    def set_LifeCycle(self, LifeCycle): self.LifeCycle = LifeCycle2083    def get__derived(self): return self._derived2084    def set__derived(self, _derived): self._derived = _derived2085    def get__real_archetype(self): return self._real_archetype2086    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype2087    def get__archetype(self): return self._archetype2088    def set__archetype(self, _archetype): self._archetype = _archetype2089    def get__subtype(self): return self._subtype2090    def set__subtype(self, _subtype): self._subtype = _subtype2091    def get__instances(self): return self._instances2092    def set__instances(self, _instances): self._instances = _instances2093    def get__desynched_atts(self): return self._desynched_atts2094    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts2095    def get_AnalysisType(self): return self.AnalysisType2096    def set_AnalysisType(self, AnalysisType): self.AnalysisType = AnalysisType2097    def get__id(self): return self._id2098    def set__id(self, _id): self._id = _id2099    def hasContent_(self):2100        if (2101            self.LifeCycle is not None2102        ):2103            return True2104        else:2105            return False2106    def export(self, outfile, level, namespace_='', name_='AnalysisSupportingDataType', namespacedef_='', pretty_print=True):2107        if pretty_print:2108            eol_ = '\n'2109        else:2110            eol_ = ''2111        if self.original_tagname_ is not None:2112            name_ = self.original_tagname_2113        showIndent(outfile, level, pretty_print)2114        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2115        already_processed = set()2116        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AnalysisSupportingDataType')2117        if self.hasContent_():2118            outfile.write('>%s' % (eol_, ))2119            self.exportChildren(outfile, level + 1, namespace_='', name_='AnalysisSupportingDataType', pretty_print=pretty_print)2120            showIndent(outfile, level, pretty_print)2121            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))2122        else:2123            outfile.write('/>%s' % (eol_, ))2124    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AnalysisSupportingDataType'):2125        if self._derived is not None and '_derived' not in already_processed:2126            already_processed.add('_derived')2127            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))2128        if self._real_archetype is not None and '_real_archetype' not in already_processed:2129            already_processed.add('_real_archetype')2130            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))2131        if self._archetype is not None and '_archetype' not in already_processed:2132            already_processed.add('_archetype')2133            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))2134        if self._subtype is not None and '_subtype' not in already_processed:2135            already_processed.add('_subtype')2136            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))2137        if self._instances is not None and '_instances' not in already_processed:2138            already_processed.add('_instances')2139            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))2140        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2141            already_processed.add('_desynched_atts')2142            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))2143        if self.AnalysisType is not None and 'AnalysisType' not in already_processed:2144            already_processed.add('AnalysisType')2145            outfile.write(' AnalysisType=%s' % (self.gds_format_string(quote_attrib(self.AnalysisType).encode(ExternalEncoding), input_name='AnalysisType'), ))2146        if self._id is not None and '_id' not in already_processed:2147            already_processed.add('_id')2148            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))2149    def exportChildren(self, outfile, level, namespace_='', name_='AnalysisSupportingDataType', fromsubclass_=False, pretty_print=True):2150        if pretty_print:2151            eol_ = '\n'2152        else:2153            eol_ = ''2154        if self.LifeCycle is not None:2155            self.LifeCycle.export(outfile, level, namespace_, name_='LifeCycle', pretty_print=pretty_print)2156    def exportLiteral(self, outfile, level, name_='AnalysisSupportingDataType'):2157        level += 12158        already_processed = set()2159        self.exportLiteralAttributes(outfile, level, already_processed, name_)2160        if self.hasContent_():2161            self.exportLiteralChildren(outfile, level, name_)2162    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2163        if self._derived is not None and '_derived' not in already_processed:2164            already_processed.add('_derived')2165            showIndent(outfile, level)2166            outfile.write('_derived="%s",\n' % (self._derived,))2167        if self._real_archetype is not None and '_real_archetype' not in already_processed:2168            already_processed.add('_real_archetype')2169            showIndent(outfile, level)2170            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))2171        if self._archetype is not None and '_archetype' not in already_processed:2172            already_processed.add('_archetype')2173            showIndent(outfile, level)2174            outfile.write('_archetype="%s",\n' % (self._archetype,))2175        if self._subtype is not None and '_subtype' not in already_processed:2176            already_processed.add('_subtype')2177            showIndent(outfile, level)2178            outfile.write('_subtype=%s,\n' % (self._subtype,))2179        if self._instances is not None and '_instances' not in already_processed:2180            already_processed.add('_instances')2181            showIndent(outfile, level)2182            outfile.write('_instances="%s",\n' % (self._instances,))2183        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2184            already_processed.add('_desynched_atts')2185            showIndent(outfile, level)2186            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))2187        if self.AnalysisType is not None and 'AnalysisType' not in already_processed:2188            already_processed.add('AnalysisType')2189            showIndent(outfile, level)2190            outfile.write('AnalysisType="%s",\n' % (self.AnalysisType,))2191        if self._id is not None and '_id' not in already_processed:2192            already_processed.add('_id')2193            showIndent(outfile, level)2194            outfile.write('_id="%s",\n' % (self._id,))2195    def exportLiteralChildren(self, outfile, level, name_):2196        if self.LifeCycle is not None:2197            showIndent(outfile, level)2198            outfile.write('LifeCycle=model_.LifeCycleType(\n')2199            self.LifeCycle.exportLiteral(outfile, level, name_='LifeCycle')2200            showIndent(outfile, level)2201            outfile.write('),\n')2202    def build(self, node):2203        already_processed = set()2204        self.buildAttributes(node, node.attrib, already_processed)2205        for child in node:2206            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2207            self.buildChildren(child, node, nodeName_)2208        return self2209    def buildAttributes(self, node, attrs, already_processed):2210        value = find_attr_value_('_derived', node)2211        if value is not None and '_derived' not in already_processed:2212            already_processed.add('_derived')2213            self._derived = value2214        value = find_attr_value_('_real_archetype', node)2215        if value is not None and '_real_archetype' not in already_processed:2216            already_processed.add('_real_archetype')2217            if value in ('true', '1'):2218                self._real_archetype = True2219            elif value in ('false', '0'):2220                self._real_archetype = False2221            else:2222                raise_parse_error(node, 'Bad boolean attribute')2223        value = find_attr_value_('_archetype', node)2224        if value is not None and '_archetype' not in already_processed:2225            already_processed.add('_archetype')2226            self._archetype = value2227        value = find_attr_value_('_subtype', node)2228        if value is not None and '_subtype' not in already_processed:2229            already_processed.add('_subtype')2230            if value in ('true', '1'):2231                self._subtype = True2232            elif value in ('false', '0'):2233                self._subtype = False2234            else:2235                raise_parse_error(node, 'Bad boolean attribute')2236        value = find_attr_value_('_instances', node)2237        if value is not None and '_instances' not in already_processed:2238            already_processed.add('_instances')2239            self._instances = value2240        value = find_attr_value_('_desynched_atts', node)2241        if value is not None and '_desynched_atts' not in already_processed:2242            already_processed.add('_desynched_atts')2243            self._desynched_atts = value2244        value = find_attr_value_('AnalysisType', node)2245        if value is not None and 'AnalysisType' not in already_processed:2246            already_processed.add('AnalysisType')2247            self.AnalysisType = value2248        value = find_attr_value_('_id', node)2249        if value is not None and '_id' not in already_processed:2250            already_processed.add('_id')2251            self._id = value2252    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2253        if nodeName_ == 'LifeCycle':2254            obj_ = LifeCycleType.factory()2255            obj_.build(child_)2256            self.LifeCycle = obj_2257            obj_.original_tagname_ = 'LifeCycle'2258# end class AnalysisSupportingDataType225922602261class AllowableBearingStressType(GeneratedsSuper):2262    subclass = None2263    superclass = None2264    def __init__(self, _derived=None, _real_archetype=None, _desynched_atts=None, Value=None, _subtype=None, Source=None, _instances=None, _archetype=None, Units=None, _id=None):2265        self.original_tagname_ = None2266        self._derived = _cast(None, _derived)2267        self._real_archetype = _cast(bool, _real_archetype)2268        self._desynched_atts = _cast(None, _desynched_atts)2269        self.Value = _cast(float, Value)2270        self._subtype = _cast(bool, _subtype)2271        self.Source = _cast(None, Source)2272        self._instances = _cast(None, _instances)2273        self._archetype = _cast(None, _archetype)2274        self.Units = _cast(None, Units)2275        self._id = _cast(None, _id)2276    def factory(*args_, **kwargs_):2277        if AllowableBearingStressType.subclass:2278            return AllowableBearingStressType.subclass(*args_, **kwargs_)2279        else:2280            return AllowableBearingStressType(*args_, **kwargs_)2281    factory = staticmethod(factory)2282    def get__derived(self): return self._derived2283    def set__derived(self, _derived): self._derived = _derived2284    def get__real_archetype(self): return self._real_archetype2285    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype2286    def get__desynched_atts(self): return self._desynched_atts2287    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts2288    def get_Value(self): return self.Value2289    def set_Value(self, Value): self.Value = Value2290    def get__subtype(self): return self._subtype2291    def set__subtype(self, _subtype): self._subtype = _subtype2292    def get_Source(self): return self.Source2293    def set_Source(self, Source): self.Source = Source2294    def get__instances(self): return self._instances2295    def set__instances(self, _instances): self._instances = _instances2296    def get__archetype(self): return self._archetype2297    def set__archetype(self, _archetype): self._archetype = _archetype2298    def get_Units(self): return self.Units2299    def set_Units(self, Units): self.Units = Units2300    def get__id(self): return self._id2301    def set__id(self, _id): self._id = _id2302    def hasContent_(self):2303        if (23042305        ):2306            return True2307        else:2308            return False2309    def export(self, outfile, level, namespace_='', name_='AllowableBearingStressType', namespacedef_='', pretty_print=True):2310        if pretty_print:2311            eol_ = '\n'2312        else:2313            eol_ = ''2314        if self.original_tagname_ is not None:2315            name_ = self.original_tagname_2316        showIndent(outfile, level, pretty_print)2317        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2318        already_processed = set()2319        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AllowableBearingStressType')2320        if self.hasContent_():2321            outfile.write('>%s' % (eol_, ))2322            self.exportChildren(outfile, level + 1, namespace_='', name_='AllowableBearingStressType', pretty_print=pretty_print)2323            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))2324        else:2325            outfile.write('/>%s' % (eol_, ))2326    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AllowableBearingStressType'):2327        if self._derived is not None and '_derived' not in already_processed:2328            already_processed.add('_derived')2329            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))2330        if self._real_archetype is not None and '_real_archetype' not in already_processed:2331            already_processed.add('_real_archetype')2332            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))2333        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2334            already_processed.add('_desynched_atts')2335            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))2336        if self.Value is not None and 'Value' not in already_processed:2337            already_processed.add('Value')2338            outfile.write(' Value="%s"' % self.gds_format_double(self.Value, input_name='Value'))2339        if self._subtype is not None and '_subtype' not in already_processed:2340            already_processed.add('_subtype')2341            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))2342        if self.Source is not None and 'Source' not in already_processed:2343            already_processed.add('Source')2344            outfile.write(' Source=%s' % (self.gds_format_string(quote_attrib(self.Source).encode(ExternalEncoding), input_name='Source'), ))2345        if self._instances is not None and '_instances' not in already_processed:2346            already_processed.add('_instances')2347            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))2348        if self._archetype is not None and '_archetype' not in already_processed:2349            already_processed.add('_archetype')2350            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))2351        if self.Units is not None and 'Units' not in already_processed:2352            already_processed.add('Units')2353            outfile.write(' Units=%s' % (self.gds_format_string(quote_attrib(self.Units).encode(ExternalEncoding), input_name='Units'), ))2354        if self._id is not None and '_id' not in already_processed:2355            already_processed.add('_id')2356            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))2357    def exportChildren(self, outfile, level, namespace_='', name_='AllowableBearingStressType', fromsubclass_=False, pretty_print=True):2358        pass2359    def exportLiteral(self, outfile, level, name_='AllowableBearingStressType'):2360        level += 12361        already_processed = set()2362        self.exportLiteralAttributes(outfile, level, already_processed, name_)2363        if self.hasContent_():2364            self.exportLiteralChildren(outfile, level, name_)2365    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2366        if self._derived is not None and '_derived' not in already_processed:2367            already_processed.add('_derived')2368            showIndent(outfile, level)2369            outfile.write('_derived="%s",\n' % (self._derived,))2370        if self._real_archetype is not None and '_real_archetype' not in already_processed:2371            already_processed.add('_real_archetype')2372            showIndent(outfile, level)2373            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))2374        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2375            already_processed.add('_desynched_atts')2376            showIndent(outfile, level)2377            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))2378        if self.Value is not None and 'Value' not in already_processed:2379            already_processed.add('Value')2380            showIndent(outfile, level)2381            outfile.write('Value=%e,\n' % (self.Value,))2382        if self._subtype is not None and '_subtype' not in already_processed:2383            already_processed.add('_subtype')2384            showIndent(outfile, level)2385            outfile.write('_subtype=%s,\n' % (self._subtype,))2386        if self.Source is not None and 'Source' not in already_processed:2387            already_processed.add('Source')2388            showIndent(outfile, level)2389            outfile.write('Source="%s",\n' % (self.Source,))2390        if self._instances is not None and '_instances' not in already_processed:2391            already_processed.add('_instances')2392            showIndent(outfile, level)2393            outfile.write('_instances="%s",\n' % (self._instances,))2394        if self._archetype is not None and '_archetype' not in already_processed:2395            already_processed.add('_archetype')2396            showIndent(outfile, level)2397            outfile.write('_archetype="%s",\n' % (self._archetype,))2398        if self.Units is not None and 'Units' not in already_processed:2399            already_processed.add('Units')2400            showIndent(outfile, level)2401            outfile.write('Units="%s",\n' % (self.Units,))2402        if self._id is not None and '_id' not in already_processed:2403            already_processed.add('_id')2404            showIndent(outfile, level)2405            outfile.write('_id="%s",\n' % (self._id,))2406    def exportLiteralChildren(self, outfile, level, name_):2407        pass2408    def build(self, node):2409        already_processed = set()2410        self.buildAttributes(node, node.attrib, already_processed)2411        for child in node:2412            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2413            self.buildChildren(child, node, nodeName_)2414        return self2415    def buildAttributes(self, node, attrs, already_processed):2416        value = find_attr_value_('_derived', node)2417        if value is not None and '_derived' not in already_processed:2418            already_processed.add('_derived')2419            self._derived = value2420        value = find_attr_value_('_real_archetype', node)2421        if value is not None and '_real_archetype' not in already_processed:2422            already_processed.add('_real_archetype')2423            if value in ('true', '1'):2424                self._real_archetype = True2425            elif value in ('false', '0'):2426                self._real_archetype = False2427            else:2428                raise_parse_error(node, 'Bad boolean attribute')2429        value = find_attr_value_('_desynched_atts', node)2430        if value is not None and '_desynched_atts' not in already_processed:2431            already_processed.add('_desynched_atts')2432            self._desynched_atts = value2433        value = find_attr_value_('Value', node)2434        if value is not None and 'Value' not in already_processed:2435            already_processed.add('Value')2436            try:2437                self.Value = float(value)2438            except ValueError, exp:2439                raise ValueError('Bad float/double attribute (Value): %s' % exp)2440        value = find_attr_value_('_subtype', node)2441        if value is not None and '_subtype' not in already_processed:2442            already_processed.add('_subtype')2443            if value in ('true', '1'):2444                self._subtype = True2445            elif value in ('false', '0'):2446                self._subtype = False2447            else:2448                raise_parse_error(node, 'Bad boolean attribute')2449        value = find_attr_value_('Source', node)2450        if value is not None and 'Source' not in already_processed:2451            already_processed.add('Source')2452            self.Source = value2453        value = find_attr_value_('_instances', node)2454        if value is not None and '_instances' not in already_processed:2455            already_processed.add('_instances')2456            self._instances = value2457        value = find_attr_value_('_archetype', node)2458        if value is not None and '_archetype' not in already_processed:2459            already_processed.add('_archetype')2460            self._archetype = value2461        value = find_attr_value_('Units', node)2462        if value is not None and 'Units' not in already_processed:2463            already_processed.add('Units')2464            self.Units = value2465        value = find_attr_value_('_id', node)2466        if value is not None and '_id' not in already_processed:2467            already_processed.add('_id')2468            self._id = value2469    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2470        pass2471# end class AllowableBearingStressType247224732474class AllowableShearStressType(GeneratedsSuper):2475    subclass = None2476    superclass = None2477    def __init__(self, _derived=None, _real_archetype=None, _desynched_atts=None, Value=None, _subtype=None, Source=None, _instances=None, _archetype=None, Units=None, _id=None):2478        self.original_tagname_ = None2479        self._derived = _cast(None, _derived)2480        self._real_archetype = _cast(bool, _real_archetype)2481        self._desynched_atts = _cast(None, _desynched_atts)2482        self.Value = _cast(float, Value)2483        self._subtype = _cast(bool, _subtype)2484        self.Source = _cast(None, Source)2485        self._instances = _cast(None, _instances)2486        self._archetype = _cast(None, _archetype)2487        self.Units = _cast(None, Units)2488        self._id = _cast(None, _id)2489    def factory(*args_, **kwargs_):2490        if AllowableShearStressType.subclass:2491            return AllowableShearStressType.subclass(*args_, **kwargs_)2492        else:2493            return AllowableShearStressType(*args_, **kwargs_)2494    factory = staticmethod(factory)2495    def get__derived(self): return self._derived2496    def set__derived(self, _derived): self._derived = _derived2497    def get__real_archetype(self): return self._real_archetype2498    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype2499    def get__desynched_atts(self): return self._desynched_atts2500    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts2501    def get_Value(self): return self.Value2502    def set_Value(self, Value): self.Value = Value2503    def get__subtype(self): return self._subtype2504    def set__subtype(self, _subtype): self._subtype = _subtype2505    def get_Source(self): return self.Source2506    def set_Source(self, Source): self.Source = Source2507    def get__instances(self): return self._instances2508    def set__instances(self, _instances): self._instances = _instances2509    def get__archetype(self): return self._archetype2510    def set__archetype(self, _archetype): self._archetype = _archetype2511    def get_Units(self): return self.Units2512    def set_Units(self, Units): self.Units = Units2513    def get__id(self): return self._id2514    def set__id(self, _id): self._id = _id2515    def hasContent_(self):2516        if (25172518        ):2519            return True2520        else:2521            return False2522    def export(self, outfile, level, namespace_='', name_='AllowableShearStressType', namespacedef_='', pretty_print=True):2523        if pretty_print:2524            eol_ = '\n'2525        else:2526            eol_ = ''2527        if self.original_tagname_ is not None:2528            name_ = self.original_tagname_2529        showIndent(outfile, level, pretty_print)2530        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2531        already_processed = set()2532        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AllowableShearStressType')2533        if self.hasContent_():2534            outfile.write('>%s' % (eol_, ))2535            self.exportChildren(outfile, level + 1, namespace_='', name_='AllowableShearStressType', pretty_print=pretty_print)2536            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))2537        else:2538            outfile.write('/>%s' % (eol_, ))2539    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AllowableShearStressType'):2540        if self._derived is not None and '_derived' not in already_processed:2541            already_processed.add('_derived')2542            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))2543        if self._real_archetype is not None and '_real_archetype' not in already_processed:2544            already_processed.add('_real_archetype')2545            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))2546        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2547            already_processed.add('_desynched_atts')2548            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))2549        if self.Value is not None and 'Value' not in already_processed:2550            already_processed.add('Value')2551            outfile.write(' Value="%s"' % self.gds_format_double(self.Value, input_name='Value'))2552        if self._subtype is not None and '_subtype' not in already_processed:2553            already_processed.add('_subtype')2554            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))2555        if self.Source is not None and 'Source' not in already_processed:2556            already_processed.add('Source')2557            outfile.write(' Source=%s' % (self.gds_format_string(quote_attrib(self.Source).encode(ExternalEncoding), input_name='Source'), ))2558        if self._instances is not None and '_instances' not in already_processed:2559            already_processed.add('_instances')2560            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))2561        if self._archetype is not None and '_archetype' not in already_processed:2562            already_processed.add('_archetype')2563            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))2564        if self.Units is not None and 'Units' not in already_processed:2565            already_processed.add('Units')2566            outfile.write(' Units=%s' % (self.gds_format_string(quote_attrib(self.Units).encode(ExternalEncoding), input_name='Units'), ))2567        if self._id is not None and '_id' not in already_processed:2568            already_processed.add('_id')2569            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))2570    def exportChildren(self, outfile, level, namespace_='', name_='AllowableShearStressType', fromsubclass_=False, pretty_print=True):2571        pass2572    def exportLiteral(self, outfile, level, name_='AllowableShearStressType'):2573        level += 12574        already_processed = set()2575        self.exportLiteralAttributes(outfile, level, already_processed, name_)2576        if self.hasContent_():2577            self.exportLiteralChildren(outfile, level, name_)2578    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2579        if self._derived is not None and '_derived' not in already_processed:2580            already_processed.add('_derived')2581            showIndent(outfile, level)2582            outfile.write('_derived="%s",\n' % (self._derived,))2583        if self._real_archetype is not None and '_real_archetype' not in already_processed:2584            already_processed.add('_real_archetype')2585            showIndent(outfile, level)2586            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))2587        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2588            already_processed.add('_desynched_atts')2589            showIndent(outfile, level)2590            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))2591        if self.Value is not None and 'Value' not in already_processed:2592            already_processed.add('Value')2593            showIndent(outfile, level)2594            outfile.write('Value=%e,\n' % (self.Value,))2595        if self._subtype is not None and '_subtype' not in already_processed:2596            already_processed.add('_subtype')2597            showIndent(outfile, level)2598            outfile.write('_subtype=%s,\n' % (self._subtype,))2599        if self.Source is not None and 'Source' not in already_processed:2600            already_processed.add('Source')2601            showIndent(outfile, level)2602            outfile.write('Source="%s",\n' % (self.Source,))2603        if self._instances is not None and '_instances' not in already_processed:2604            already_processed.add('_instances')2605            showIndent(outfile, level)2606            outfile.write('_instances="%s",\n' % (self._instances,))2607        if self._archetype is not None and '_archetype' not in already_processed:2608            already_processed.add('_archetype')2609            showIndent(outfile, level)2610            outfile.write('_archetype="%s",\n' % (self._archetype,))2611        if self.Units is not None and 'Units' not in already_processed:2612            already_processed.add('Units')2613            showIndent(outfile, level)2614            outfile.write('Units="%s",\n' % (self.Units,))2615        if self._id is not None and '_id' not in already_processed:2616            already_processed.add('_id')2617            showIndent(outfile, level)2618            outfile.write('_id="%s",\n' % (self._id,))2619    def exportLiteralChildren(self, outfile, level, name_):2620        pass2621    def build(self, node):2622        already_processed = set()2623        self.buildAttributes(node, node.attrib, already_processed)2624        for child in node:2625            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2626            self.buildChildren(child, node, nodeName_)2627        return self2628    def buildAttributes(self, node, attrs, already_processed):2629        value = find_attr_value_('_derived', node)2630        if value is not None and '_derived' not in already_processed:2631            already_processed.add('_derived')2632            self._derived = value2633        value = find_attr_value_('_real_archetype', node)2634        if value is not None and '_real_archetype' not in already_processed:2635            already_processed.add('_real_archetype')2636            if value in ('true', '1'):2637                self._real_archetype = True2638            elif value in ('false', '0'):2639                self._real_archetype = False2640            else:2641                raise_parse_error(node, 'Bad boolean attribute')2642        value = find_attr_value_('_desynched_atts', node)2643        if value is not None and '_desynched_atts' not in already_processed:2644            already_processed.add('_desynched_atts')2645            self._desynched_atts = value2646        value = find_attr_value_('Value', node)2647        if value is not None and 'Value' not in already_processed:2648            already_processed.add('Value')2649            try:2650                self.Value = float(value)2651            except ValueError, exp:2652                raise ValueError('Bad float/double attribute (Value): %s' % exp)2653        value = find_attr_value_('_subtype', node)2654        if value is not None and '_subtype' not in already_processed:2655            already_processed.add('_subtype')2656            if value in ('true', '1'):2657                self._subtype = True2658            elif value in ('false', '0'):2659                self._subtype = False2660            else:2661                raise_parse_error(node, 'Bad boolean attribute')2662        value = find_attr_value_('Source', node)2663        if value is not None and 'Source' not in already_processed:2664            already_processed.add('Source')2665            self.Source = value2666        value = find_attr_value_('_instances', node)2667        if value is not None and '_instances' not in already_processed:2668            already_processed.add('_instances')2669            self._instances = value2670        value = find_attr_value_('_archetype', node)2671        if value is not None and '_archetype' not in already_processed:2672            already_processed.add('_archetype')2673            self._archetype = value2674        value = find_attr_value_('Units', node)2675        if value is not None and 'Units' not in already_processed:2676            already_processed.add('Units')2677            self.Units = value2678        value = find_attr_value_('_id', node)2679        if value is not None and '_id' not in already_processed:2680            already_processed.add('_id')2681            self._id = value2682    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2683        pass2684# end class AllowableShearStressType268526862687class AllowableTensileStressType(GeneratedsSuper):2688    subclass = None2689    superclass = None2690    def __init__(self, _derived=None, _real_archetype=None, _desynched_atts=None, Value=None, _subtype=None, Source=None, _instances=None, _archetype=None, Units=None, _id=None):2691        self.original_tagname_ = None2692        self._derived = _cast(None, _derived)2693        self._real_archetype = _cast(bool, _real_archetype)2694        self._desynched_atts = _cast(None, _desynched_atts)2695        self.Value = _cast(float, Value)2696        self._subtype = _cast(bool, _subtype)2697        self.Source = _cast(None, Source)2698        self._instances = _cast(None, _instances)2699        self._archetype = _cast(None, _archetype)2700        self.Units = _cast(None, Units)2701        self._id = _cast(None, _id)2702    def factory(*args_, **kwargs_):2703        if AllowableTensileStressType.subclass:2704            return AllowableTensileStressType.subclass(*args_, **kwargs_)2705        else:2706            return AllowableTensileStressType(*args_, **kwargs_)2707    factory = staticmethod(factory)2708    def get__derived(self): return self._derived2709    def set__derived(self, _derived): self._derived = _derived2710    def get__real_archetype(self): return self._real_archetype2711    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype2712    def get__desynched_atts(self): return self._desynched_atts2713    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts2714    def get_Value(self): return self.Value2715    def set_Value(self, Value): self.Value = Value2716    def get__subtype(self): return self._subtype2717    def set__subtype(self, _subtype): self._subtype = _subtype2718    def get_Source(self): return self.Source2719    def set_Source(self, Source): self.Source = Source2720    def get__instances(self): return self._instances2721    def set__instances(self, _instances): self._instances = _instances2722    def get__archetype(self): return self._archetype2723    def set__archetype(self, _archetype): self._archetype = _archetype2724    def get_Units(self): return self.Units2725    def set_Units(self, Units): self.Units = Units2726    def get__id(self): return self._id2727    def set__id(self, _id): self._id = _id2728    def hasContent_(self):2729        if (27302731        ):2732            return True2733        else:2734            return False2735    def export(self, outfile, level, namespace_='', name_='AllowableTensileStressType', namespacedef_='', pretty_print=True):2736        if pretty_print:2737            eol_ = '\n'2738        else:2739            eol_ = ''2740        if self.original_tagname_ is not None:2741            name_ = self.original_tagname_2742        showIndent(outfile, level, pretty_print)2743        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2744        already_processed = set()2745        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AllowableTensileStressType')2746        if self.hasContent_():2747            outfile.write('>%s' % (eol_, ))2748            self.exportChildren(outfile, level + 1, namespace_='', name_='AllowableTensileStressType', pretty_print=pretty_print)2749            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))2750        else:2751            outfile.write('/>%s' % (eol_, ))2752    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AllowableTensileStressType'):2753        if self._derived is not None and '_derived' not in already_processed:2754            already_processed.add('_derived')2755            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))2756        if self._real_archetype is not None and '_real_archetype' not in already_processed:2757            already_processed.add('_real_archetype')2758            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))2759        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2760            already_processed.add('_desynched_atts')2761            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))2762        if self.Value is not None and 'Value' not in already_processed:2763            already_processed.add('Value')2764            outfile.write(' Value="%s"' % self.gds_format_double(self.Value, input_name='Value'))2765        if self._subtype is not None and '_subtype' not in already_processed:2766            already_processed.add('_subtype')2767            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))2768        if self.Source is not None and 'Source' not in already_processed:2769            already_processed.add('Source')2770            outfile.write(' Source=%s' % (self.gds_format_string(quote_attrib(self.Source).encode(ExternalEncoding), input_name='Source'), ))2771        if self._instances is not None and '_instances' not in already_processed:2772            already_processed.add('_instances')2773            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))2774        if self._archetype is not None and '_archetype' not in already_processed:2775            already_processed.add('_archetype')2776            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))2777        if self.Units is not None and 'Units' not in already_processed:2778            already_processed.add('Units')2779            outfile.write(' Units=%s' % (self.gds_format_string(quote_attrib(self.Units).encode(ExternalEncoding), input_name='Units'), ))2780        if self._id is not None and '_id' not in already_processed:2781            already_processed.add('_id')2782            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))2783    def exportChildren(self, outfile, level, namespace_='', name_='AllowableTensileStressType', fromsubclass_=False, pretty_print=True):2784        pass2785    def exportLiteral(self, outfile, level, name_='AllowableTensileStressType'):2786        level += 12787        already_processed = set()2788        self.exportLiteralAttributes(outfile, level, already_processed, name_)2789        if self.hasContent_():2790            self.exportLiteralChildren(outfile, level, name_)2791    def exportLiteralAttributes(self, outfile, level, already_processed, name_):2792        if self._derived is not None and '_derived' not in already_processed:2793            already_processed.add('_derived')2794            showIndent(outfile, level)2795            outfile.write('_derived="%s",\n' % (self._derived,))2796        if self._real_archetype is not None and '_real_archetype' not in already_processed:2797            already_processed.add('_real_archetype')2798            showIndent(outfile, level)2799            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))2800        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2801            already_processed.add('_desynched_atts')2802            showIndent(outfile, level)2803            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))2804        if self.Value is not None and 'Value' not in already_processed:2805            already_processed.add('Value')2806            showIndent(outfile, level)2807            outfile.write('Value=%e,\n' % (self.Value,))2808        if self._subtype is not None and '_subtype' not in already_processed:2809            already_processed.add('_subtype')2810            showIndent(outfile, level)2811            outfile.write('_subtype=%s,\n' % (self._subtype,))2812        if self.Source is not None and 'Source' not in already_processed:2813            already_processed.add('Source')2814            showIndent(outfile, level)2815            outfile.write('Source="%s",\n' % (self.Source,))2816        if self._instances is not None and '_instances' not in already_processed:2817            already_processed.add('_instances')2818            showIndent(outfile, level)2819            outfile.write('_instances="%s",\n' % (self._instances,))2820        if self._archetype is not None and '_archetype' not in already_processed:2821            already_processed.add('_archetype')2822            showIndent(outfile, level)2823            outfile.write('_archetype="%s",\n' % (self._archetype,))2824        if self.Units is not None and 'Units' not in already_processed:2825            already_processed.add('Units')2826            showIndent(outfile, level)2827            outfile.write('Units="%s",\n' % (self.Units,))2828        if self._id is not None and '_id' not in already_processed:2829            already_processed.add('_id')2830            showIndent(outfile, level)2831            outfile.write('_id="%s",\n' % (self._id,))2832    def exportLiteralChildren(self, outfile, level, name_):2833        pass2834    def build(self, node):2835        already_processed = set()2836        self.buildAttributes(node, node.attrib, already_processed)2837        for child in node:2838            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2839            self.buildChildren(child, node, nodeName_)2840        return self2841    def buildAttributes(self, node, attrs, already_processed):2842        value = find_attr_value_('_derived', node)2843        if value is not None and '_derived' not in already_processed:2844            already_processed.add('_derived')2845            self._derived = value2846        value = find_attr_value_('_real_archetype', node)2847        if value is not None and '_real_archetype' not in already_processed:2848            already_processed.add('_real_archetype')2849            if value in ('true', '1'):2850                self._real_archetype = True2851            elif value in ('false', '0'):2852                self._real_archetype = False2853            else:2854                raise_parse_error(node, 'Bad boolean attribute')2855        value = find_attr_value_('_desynched_atts', node)2856        if value is not None and '_desynched_atts' not in already_processed:2857            already_processed.add('_desynched_atts')2858            self._desynched_atts = value2859        value = find_attr_value_('Value', node)2860        if value is not None and 'Value' not in already_processed:2861            already_processed.add('Value')2862            try:2863                self.Value = float(value)2864            except ValueError, exp:2865                raise ValueError('Bad float/double attribute (Value): %s' % exp)2866        value = find_attr_value_('_subtype', node)2867        if value is not None and '_subtype' not in already_processed:2868            already_processed.add('_subtype')2869            if value in ('true', '1'):2870                self._subtype = True2871            elif value in ('false', '0'):2872                self._subtype = False2873            else:2874                raise_parse_error(node, 'Bad boolean attribute')2875        value = find_attr_value_('Source', node)2876        if value is not None and 'Source' not in already_processed:2877            already_processed.add('Source')2878            self.Source = value2879        value = find_attr_value_('_instances', node)2880        if value is not None and '_instances' not in already_processed:2881            already_processed.add('_instances')2882            self._instances = value2883        value = find_attr_value_('_archetype', node)2884        if value is not None and '_archetype' not in already_processed:2885            already_processed.add('_archetype')2886            self._archetype = value2887        value = find_attr_value_('Units', node)2888        if value is not None and 'Units' not in already_processed:2889            already_processed.add('Units')2890            self.Units = value2891        value = find_attr_value_('_id', node)2892        if value is not None and '_id' not in already_processed:2893            already_processed.add('_id')2894            self._id = value2895    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2896        pass2897# end class AllowableTensileStressType289828992900class CADAnalysisMetaDataType(GeneratedsSuper):2901    subclass = None2902    superclass = None2903    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, _libname=None, AnalysisSupportingData=None, Assemblies=None, Materials=None, CADAnalysisMetaData=None):2904        self.original_tagname_ = None2905        self._derived = _cast(None, _derived)2906        self._real_archetype = _cast(bool, _real_archetype)2907        self._archetype = _cast(None, _archetype)2908        self._subtype = _cast(bool, _subtype)2909        self._instances = _cast(None, _instances)2910        self._desynched_atts = _cast(None, _desynched_atts)2911        self._id = _cast(None, _id)2912        self._libname = _cast(None, _libname)2913        self.AnalysisSupportingData = AnalysisSupportingData2914        self.Assemblies = Assemblies2915        self.Materials = Materials2916        if CADAnalysisMetaData is None:2917            self.CADAnalysisMetaData = []2918        else:2919            self.CADAnalysisMetaData = CADAnalysisMetaData2920    def factory(*args_, **kwargs_):2921        if CADAnalysisMetaDataType.subclass:2922            return CADAnalysisMetaDataType.subclass(*args_, **kwargs_)2923        else:2924            return CADAnalysisMetaDataType(*args_, **kwargs_)2925    factory = staticmethod(factory)2926    def get_AnalysisSupportingData(self): return self.AnalysisSupportingData2927    def set_AnalysisSupportingData(self, AnalysisSupportingData): self.AnalysisSupportingData = AnalysisSupportingData2928    def get_Assemblies(self): return self.Assemblies2929    def set_Assemblies(self, Assemblies): self.Assemblies = Assemblies2930    def get_Materials(self): return self.Materials2931    def set_Materials(self, Materials): self.Materials = Materials2932    def get_CADAnalysisMetaData(self): return self.CADAnalysisMetaData2933    def set_CADAnalysisMetaData(self, CADAnalysisMetaData): self.CADAnalysisMetaData = CADAnalysisMetaData2934    def add_CADAnalysisMetaData(self, value): self.CADAnalysisMetaData.append(value)2935    def insert_CADAnalysisMetaData(self, index, value): self.CADAnalysisMetaData[index] = value2936    def get__derived(self): return self._derived2937    def set__derived(self, _derived): self._derived = _derived2938    def get__real_archetype(self): return self._real_archetype2939    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype2940    def get__archetype(self): return self._archetype2941    def set__archetype(self, _archetype): self._archetype = _archetype2942    def get__subtype(self): return self._subtype2943    def set__subtype(self, _subtype): self._subtype = _subtype2944    def get__instances(self): return self._instances2945    def set__instances(self, _instances): self._instances = _instances2946    def get__desynched_atts(self): return self._desynched_atts2947    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts2948    def get__id(self): return self._id2949    def set__id(self, _id): self._id = _id2950    def get__libname(self): return self._libname2951    def set__libname(self, _libname): self._libname = _libname2952    def hasContent_(self):2953        if (2954            self.AnalysisSupportingData is not None or2955            self.Assemblies is not None or2956            self.Materials is not None or2957            self.CADAnalysisMetaData2958        ):2959            return True2960        else:2961            return False2962    def export(self, outfile, level, namespace_='', name_='CADAnalysisMetaDataType', namespacedef_='', pretty_print=True):2963        if pretty_print:2964            eol_ = '\n'2965        else:2966            eol_ = ''2967        if self.original_tagname_ is not None:2968            name_ = self.original_tagname_2969        showIndent(outfile, level, pretty_print)2970        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2971        already_processed = set()2972        self.exportAttributes(outfile, level, already_processed, namespace_, name_='CADAnalysisMetaDataType')2973        if self.hasContent_():2974            outfile.write('>%s' % (eol_, ))2975            self.exportChildren(outfile, level + 1, namespace_='', name_='CADAnalysisMetaDataType', pretty_print=pretty_print)2976            showIndent(outfile, level, pretty_print)2977            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))2978        else:2979            outfile.write('/>%s' % (eol_, ))2980    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='CADAnalysisMetaDataType'):2981        if self._derived is not None and '_derived' not in already_processed:2982            already_processed.add('_derived')2983            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))2984        if self._real_archetype is not None and '_real_archetype' not in already_processed:2985            already_processed.add('_real_archetype')2986            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))2987        if self._archetype is not None and '_archetype' not in already_processed:2988            already_processed.add('_archetype')2989            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))2990        if self._subtype is not None and '_subtype' not in already_processed:2991            already_processed.add('_subtype')2992            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))2993        if self._instances is not None and '_instances' not in already_processed:2994            already_processed.add('_instances')2995            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))2996        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:2997            already_processed.add('_desynched_atts')2998            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))2999        if self._id is not None and '_id' not in already_processed:3000            already_processed.add('_id')3001            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))3002        if self._libname is not None and '_libname' not in already_processed:3003            already_processed.add('_libname')3004            outfile.write(' _libname=%s' % (self.gds_format_string(quote_attrib(self._libname).encode(ExternalEncoding), input_name='_libname'), ))3005    def exportChildren(self, outfile, level, namespace_='', name_='CADAnalysisMetaDataType', fromsubclass_=False, pretty_print=True):3006        if pretty_print:3007            eol_ = '\n'3008        else:3009            eol_ = ''3010        if self.AnalysisSupportingData is not None:3011            self.AnalysisSupportingData.export(outfile, level, namespace_, name_='AnalysisSupportingData', pretty_print=pretty_print)3012        if self.Assemblies is not None:3013            self.Assemblies.export(outfile, level, namespace_, name_='Assemblies', pretty_print=pretty_print)3014        if self.Materials is not None:3015            self.Materials.export(outfile, level, namespace_, name_='Materials', pretty_print=pretty_print)3016        for CADAnalysisMetaData_ in self.CADAnalysisMetaData:3017            CADAnalysisMetaData_.export(outfile, level, namespace_, name_='CADAnalysisMetaData', pretty_print=pretty_print)3018    def exportLiteral(self, outfile, level, name_='CADAnalysisMetaDataType'):3019        level += 13020        already_processed = set()3021        self.exportLiteralAttributes(outfile, level, already_processed, name_)3022        if self.hasContent_():3023            self.exportLiteralChildren(outfile, level, name_)3024    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3025        if self._derived is not None and '_derived' not in already_processed:3026            already_processed.add('_derived')3027            showIndent(outfile, level)3028            outfile.write('_derived="%s",\n' % (self._derived,))3029        if self._real_archetype is not None and '_real_archetype' not in already_processed:3030            already_processed.add('_real_archetype')3031            showIndent(outfile, level)3032            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))3033        if self._archetype is not None and '_archetype' not in already_processed:3034            already_processed.add('_archetype')3035            showIndent(outfile, level)3036            outfile.write('_archetype="%s",\n' % (self._archetype,))3037        if self._subtype is not None and '_subtype' not in already_processed:3038            already_processed.add('_subtype')3039            showIndent(outfile, level)3040            outfile.write('_subtype=%s,\n' % (self._subtype,))3041        if self._instances is not None and '_instances' not in already_processed:3042            already_processed.add('_instances')3043            showIndent(outfile, level)3044            outfile.write('_instances="%s",\n' % (self._instances,))3045        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3046            already_processed.add('_desynched_atts')3047            showIndent(outfile, level)3048            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))3049        if self._id is not None and '_id' not in already_processed:3050            already_processed.add('_id')3051            showIndent(outfile, level)3052            outfile.write('_id="%s",\n' % (self._id,))3053        if self._libname is not None and '_libname' not in already_processed:3054            already_processed.add('_libname')3055            showIndent(outfile, level)3056            outfile.write('_libname="%s",\n' % (self._libname,))3057    def exportLiteralChildren(self, outfile, level, name_):3058        if self.AnalysisSupportingData is not None:3059            showIndent(outfile, level)3060            outfile.write('AnalysisSupportingData=model_.AnalysisSupportingDataType(\n')3061            self.AnalysisSupportingData.exportLiteral(outfile, level, name_='AnalysisSupportingData')3062            showIndent(outfile, level)3063            outfile.write('),\n')3064        if self.Assemblies is not None:3065            showIndent(outfile, level)3066            outfile.write('Assemblies=model_.AssembliesType(\n')3067            self.Assemblies.exportLiteral(outfile, level, name_='Assemblies')3068            showIndent(outfile, level)3069            outfile.write('),\n')3070        if self.Materials is not None:3071            showIndent(outfile, level)3072            outfile.write('Materials=model_.MaterialsType(\n')3073            self.Materials.exportLiteral(outfile, level, name_='Materials')3074            showIndent(outfile, level)3075            outfile.write('),\n')3076        showIndent(outfile, level)3077        outfile.write('CADAnalysisMetaData=[\n')3078        level += 13079        for CADAnalysisMetaData_ in self.CADAnalysisMetaData:3080            showIndent(outfile, level)3081            outfile.write('model_.CADAnalysisMetaDataType(\n')3082            CADAnalysisMetaData_.exportLiteral(outfile, level, name_='CADAnalysisMetaDataType')3083            showIndent(outfile, level)3084            outfile.write('),\n')3085        level -= 13086        showIndent(outfile, level)3087        outfile.write('],\n')3088    def build(self, node):3089        already_processed = set()3090        self.buildAttributes(node, node.attrib, already_processed)3091        for child in node:3092            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3093            self.buildChildren(child, node, nodeName_)3094        return self3095    def buildAttributes(self, node, attrs, already_processed):3096        value = find_attr_value_('_derived', node)3097        if value is not None and '_derived' not in already_processed:3098            already_processed.add('_derived')3099            self._derived = value3100        value = find_attr_value_('_real_archetype', node)3101        if value is not None and '_real_archetype' not in already_processed:3102            already_processed.add('_real_archetype')3103            if value in ('true', '1'):3104                self._real_archetype = True3105            elif value in ('false', '0'):3106                self._real_archetype = False3107            else:3108                raise_parse_error(node, 'Bad boolean attribute')3109        value = find_attr_value_('_archetype', node)3110        if value is not None and '_archetype' not in already_processed:3111            already_processed.add('_archetype')3112            self._archetype = value3113        value = find_attr_value_('_subtype', node)3114        if value is not None and '_subtype' not in already_processed:3115            already_processed.add('_subtype')3116            if value in ('true', '1'):3117                self._subtype = True3118            elif value in ('false', '0'):3119                self._subtype = False3120            else:3121                raise_parse_error(node, 'Bad boolean attribute')3122        value = find_attr_value_('_instances', node)3123        if value is not None and '_instances' not in already_processed:3124            already_processed.add('_instances')3125            self._instances = value3126        value = find_attr_value_('_desynched_atts', node)3127        if value is not None and '_desynched_atts' not in already_processed:3128            already_processed.add('_desynched_atts')3129            self._desynched_atts = value3130        value = find_attr_value_('_id', node)3131        if value is not None and '_id' not in already_processed:3132            already_processed.add('_id')3133            self._id = value3134        value = find_attr_value_('_libname', node)3135        if value is not None and '_libname' not in already_processed:3136            already_processed.add('_libname')3137            self._libname = value3138    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3139        if nodeName_ == 'AnalysisSupportingData':3140            obj_ = AnalysisSupportingDataType.factory()3141            obj_.build(child_)3142            self.AnalysisSupportingData = obj_3143            obj_.original_tagname_ = 'AnalysisSupportingData'3144        elif nodeName_ == 'Assemblies':3145            obj_ = AssembliesType.factory()3146            obj_.build(child_)3147            self.Assemblies = obj_3148            obj_.original_tagname_ = 'Assemblies'3149        elif nodeName_ == 'Materials':3150            obj_ = MaterialsType.factory()3151            obj_.build(child_)3152            self.Materials = obj_3153            obj_.original_tagname_ = 'Materials'3154        elif nodeName_ == 'CADAnalysisMetaData':3155            obj_ = CADAnalysisMetaDataType.factory()3156            obj_.build(child_)3157            self.CADAnalysisMetaData.append(obj_)3158            obj_.original_tagname_ = 'CADAnalysisMetaData'3159# end class CADAnalysisMetaDataType316031613162class MaterialsType(GeneratedsSuper):3163    subclass = None3164    superclass = None3165    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, Material=None):3166        self.original_tagname_ = None3167        self._derived = _cast(None, _derived)3168        self._real_archetype = _cast(bool, _real_archetype)3169        self._archetype = _cast(None, _archetype)3170        self._subtype = _cast(bool, _subtype)3171        self._instances = _cast(None, _instances)3172        self._desynched_atts = _cast(None, _desynched_atts)3173        self._id = _cast(None, _id)3174        if Material is None:3175            self.Material = []3176        else:3177            self.Material = Material3178    def factory(*args_, **kwargs_):3179        if MaterialsType.subclass:3180            return MaterialsType.subclass(*args_, **kwargs_)3181        else:3182            return MaterialsType(*args_, **kwargs_)3183    factory = staticmethod(factory)3184    def get_Material(self): return self.Material3185    def set_Material(self, Material): self.Material = Material3186    def add_Material(self, value): self.Material.append(value)3187    def insert_Material(self, index, value): self.Material[index] = value3188    def get__derived(self): return self._derived3189    def set__derived(self, _derived): self._derived = _derived3190    def get__real_archetype(self): return self._real_archetype3191    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype3192    def get__archetype(self): return self._archetype3193    def set__archetype(self, _archetype): self._archetype = _archetype3194    def get__subtype(self): return self._subtype3195    def set__subtype(self, _subtype): self._subtype = _subtype3196    def get__instances(self): return self._instances3197    def set__instances(self, _instances): self._instances = _instances3198    def get__desynched_atts(self): return self._desynched_atts3199    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts3200    def get__id(self): return self._id3201    def set__id(self, _id): self._id = _id3202    def hasContent_(self):3203        if (3204            self.Material3205        ):3206            return True3207        else:3208            return False3209    def export(self, outfile, level, namespace_='', name_='MaterialsType', namespacedef_='', pretty_print=True):3210        if pretty_print:3211            eol_ = '\n'3212        else:3213            eol_ = ''3214        if self.original_tagname_ is not None:3215            name_ = self.original_tagname_3216        showIndent(outfile, level, pretty_print)3217        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3218        already_processed = set()3219        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MaterialsType')3220        if self.hasContent_():3221            outfile.write('>%s' % (eol_, ))3222            self.exportChildren(outfile, level + 1, namespace_='', name_='MaterialsType', pretty_print=pretty_print)3223            showIndent(outfile, level, pretty_print)3224            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))3225        else:3226            outfile.write('/>%s' % (eol_, ))3227    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MaterialsType'):3228        if self._derived is not None and '_derived' not in already_processed:3229            already_processed.add('_derived')3230            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))3231        if self._real_archetype is not None and '_real_archetype' not in already_processed:3232            already_processed.add('_real_archetype')3233            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))3234        if self._archetype is not None and '_archetype' not in already_processed:3235            already_processed.add('_archetype')3236            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))3237        if self._subtype is not None and '_subtype' not in already_processed:3238            already_processed.add('_subtype')3239            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))3240        if self._instances is not None and '_instances' not in already_processed:3241            already_processed.add('_instances')3242            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))3243        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3244            already_processed.add('_desynched_atts')3245            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))3246        if self._id is not None and '_id' not in already_processed:3247            already_processed.add('_id')3248            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))3249    def exportChildren(self, outfile, level, namespace_='', name_='MaterialsType', fromsubclass_=False, pretty_print=True):3250        if pretty_print:3251            eol_ = '\n'3252        else:3253            eol_ = ''3254        for Material_ in self.Material:3255            Material_.export(outfile, level, namespace_, name_='Material', pretty_print=pretty_print)3256    def exportLiteral(self, outfile, level, name_='MaterialsType'):3257        level += 13258        already_processed = set()3259        self.exportLiteralAttributes(outfile, level, already_processed, name_)3260        if self.hasContent_():3261            self.exportLiteralChildren(outfile, level, name_)3262    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3263        if self._derived is not None and '_derived' not in already_processed:3264            already_processed.add('_derived')3265            showIndent(outfile, level)3266            outfile.write('_derived="%s",\n' % (self._derived,))3267        if self._real_archetype is not None and '_real_archetype' not in already_processed:3268            already_processed.add('_real_archetype')3269            showIndent(outfile, level)3270            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))3271        if self._archetype is not None and '_archetype' not in already_processed:3272            already_processed.add('_archetype')3273            showIndent(outfile, level)3274            outfile.write('_archetype="%s",\n' % (self._archetype,))3275        if self._subtype is not None and '_subtype' not in already_processed:3276            already_processed.add('_subtype')3277            showIndent(outfile, level)3278            outfile.write('_subtype=%s,\n' % (self._subtype,))3279        if self._instances is not None and '_instances' not in already_processed:3280            already_processed.add('_instances')3281            showIndent(outfile, level)3282            outfile.write('_instances="%s",\n' % (self._instances,))3283        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3284            already_processed.add('_desynched_atts')3285            showIndent(outfile, level)3286            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))3287        if self._id is not None and '_id' not in already_processed:3288            already_processed.add('_id')3289            showIndent(outfile, level)3290            outfile.write('_id="%s",\n' % (self._id,))3291    def exportLiteralChildren(self, outfile, level, name_):3292        showIndent(outfile, level)3293        outfile.write('Material=[\n')3294        level += 13295        for Material_ in self.Material:3296            showIndent(outfile, level)3297            outfile.write('model_.MaterialType(\n')3298            Material_.exportLiteral(outfile, level, name_='MaterialType')3299            showIndent(outfile, level)3300            outfile.write('),\n')3301        level -= 13302        showIndent(outfile, level)3303        outfile.write('],\n')3304    def build(self, node):3305        already_processed = set()3306        self.buildAttributes(node, node.attrib, already_processed)3307        for child in node:3308            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3309            self.buildChildren(child, node, nodeName_)3310        return self3311    def buildAttributes(self, node, attrs, already_processed):3312        value = find_attr_value_('_derived', node)3313        if value is not None and '_derived' not in already_processed:3314            already_processed.add('_derived')3315            self._derived = value3316        value = find_attr_value_('_real_archetype', node)3317        if value is not None and '_real_archetype' not in already_processed:3318            already_processed.add('_real_archetype')3319            if value in ('true', '1'):3320                self._real_archetype = True3321            elif value in ('false', '0'):3322                self._real_archetype = False3323            else:3324                raise_parse_error(node, 'Bad boolean attribute')3325        value = find_attr_value_('_archetype', node)3326        if value is not None and '_archetype' not in already_processed:3327            already_processed.add('_archetype')3328            self._archetype = value3329        value = find_attr_value_('_subtype', node)3330        if value is not None and '_subtype' not in already_processed:3331            already_processed.add('_subtype')3332            if value in ('true', '1'):3333                self._subtype = True3334            elif value in ('false', '0'):3335                self._subtype = False3336            else:3337                raise_parse_error(node, 'Bad boolean attribute')3338        value = find_attr_value_('_instances', node)3339        if value is not None and '_instances' not in already_processed:3340            already_processed.add('_instances')3341            self._instances = value3342        value = find_attr_value_('_desynched_atts', node)3343        if value is not None and '_desynched_atts' not in already_processed:3344            already_processed.add('_desynched_atts')3345            self._desynched_atts = value3346        value = find_attr_value_('_id', node)3347        if value is not None and '_id' not in already_processed:3348            already_processed.add('_id')3349            self._id = value3350    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3351        if nodeName_ == 'Material':3352            obj_ = MaterialType.factory()3353            obj_.build(child_)3354            self.Material.append(obj_)3355            obj_.original_tagname_ = 'Material'3356# end class MaterialsType335733583359class MaterialType(GeneratedsSuper):3360    subclass = None3361    superclass = None3362    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, MaterialID=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, MaterialProperties=None):3363        self.original_tagname_ = None3364        self._derived = _cast(None, _derived)3365        self._real_archetype = _cast(bool, _real_archetype)3366        self._archetype = _cast(None, _archetype)3367        self.MaterialID = _cast(None, MaterialID)3368        self._subtype = _cast(bool, _subtype)3369        self._instances = _cast(None, _instances)3370        self._desynched_atts = _cast(None, _desynched_atts)3371        self._id = _cast(None, _id)3372        if MaterialProperties is None:3373            self.MaterialProperties = []3374        else:3375            self.MaterialProperties = MaterialProperties3376    def factory(*args_, **kwargs_):3377        if MaterialType.subclass:3378            return MaterialType.subclass(*args_, **kwargs_)3379        else:3380            return MaterialType(*args_, **kwargs_)3381    factory = staticmethod(factory)3382    def get_MaterialProperties(self): return self.MaterialProperties3383    def set_MaterialProperties(self, MaterialProperties): self.MaterialProperties = MaterialProperties3384    def add_MaterialProperties(self, value): self.MaterialProperties.append(value)3385    def insert_MaterialProperties(self, index, value): self.MaterialProperties[index] = value3386    def get__derived(self): return self._derived3387    def set__derived(self, _derived): self._derived = _derived3388    def get__real_archetype(self): return self._real_archetype3389    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype3390    def get__archetype(self): return self._archetype3391    def set__archetype(self, _archetype): self._archetype = _archetype3392    def get_MaterialID(self): return self.MaterialID3393    def set_MaterialID(self, MaterialID): self.MaterialID = MaterialID3394    def get__subtype(self): return self._subtype3395    def set__subtype(self, _subtype): self._subtype = _subtype3396    def get__instances(self): return self._instances3397    def set__instances(self, _instances): self._instances = _instances3398    def get__desynched_atts(self): return self._desynched_atts3399    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts3400    def get__id(self): return self._id3401    def set__id(self, _id): self._id = _id3402    def hasContent_(self):3403        if (3404            self.MaterialProperties3405        ):3406            return True3407        else:3408            return False3409    def export(self, outfile, level, namespace_='', name_='MaterialType', namespacedef_='', pretty_print=True):3410        if pretty_print:3411            eol_ = '\n'3412        else:3413            eol_ = ''3414        if self.original_tagname_ is not None:3415            name_ = self.original_tagname_3416        showIndent(outfile, level, pretty_print)3417        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3418        already_processed = set()3419        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MaterialType')3420        if self.hasContent_():3421            outfile.write('>%s' % (eol_, ))3422            self.exportChildren(outfile, level + 1, namespace_='', name_='MaterialType', pretty_print=pretty_print)3423            showIndent(outfile, level, pretty_print)3424            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))3425        else:3426            outfile.write('/>%s' % (eol_, ))3427    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MaterialType'):3428        if self._derived is not None and '_derived' not in already_processed:3429            already_processed.add('_derived')3430            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))3431        if self._real_archetype is not None and '_real_archetype' not in already_processed:3432            already_processed.add('_real_archetype')3433            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))3434        if self._archetype is not None and '_archetype' not in already_processed:3435            already_processed.add('_archetype')3436            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))3437        if self.MaterialID is not None and 'MaterialID' not in already_processed:3438            already_processed.add('MaterialID')3439            outfile.write(' MaterialID=%s' % (self.gds_format_string(quote_attrib(self.MaterialID).encode(ExternalEncoding), input_name='MaterialID'), ))3440        if self._subtype is not None and '_subtype' not in already_processed:3441            already_processed.add('_subtype')3442            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))3443        if self._instances is not None and '_instances' not in already_processed:3444            already_processed.add('_instances')3445            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))3446        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3447            already_processed.add('_desynched_atts')3448            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))3449        if self._id is not None and '_id' not in already_processed:3450            already_processed.add('_id')3451            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))3452    def exportChildren(self, outfile, level, namespace_='', name_='MaterialType', fromsubclass_=False, pretty_print=True):3453        if pretty_print:3454            eol_ = '\n'3455        else:3456            eol_ = ''3457        for MaterialProperties_ in self.MaterialProperties:3458            MaterialProperties_.export(outfile, level, namespace_, name_='MaterialProperties', pretty_print=pretty_print)3459    def exportLiteral(self, outfile, level, name_='MaterialType'):3460        level += 13461        already_processed = set()3462        self.exportLiteralAttributes(outfile, level, already_processed, name_)3463        if self.hasContent_():3464            self.exportLiteralChildren(outfile, level, name_)3465    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3466        if self._derived is not None and '_derived' not in already_processed:3467            already_processed.add('_derived')3468            showIndent(outfile, level)3469            outfile.write('_derived="%s",\n' % (self._derived,))3470        if self._real_archetype is not None and '_real_archetype' not in already_processed:3471            already_processed.add('_real_archetype')3472            showIndent(outfile, level)3473            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))3474        if self._archetype is not None and '_archetype' not in already_processed:3475            already_processed.add('_archetype')3476            showIndent(outfile, level)3477            outfile.write('_archetype="%s",\n' % (self._archetype,))3478        if self.MaterialID is not None and 'MaterialID' not in already_processed:3479            already_processed.add('MaterialID')3480            showIndent(outfile, level)3481            outfile.write('MaterialID="%s",\n' % (self.MaterialID,))3482        if self._subtype is not None and '_subtype' not in already_processed:3483            already_processed.add('_subtype')3484            showIndent(outfile, level)3485            outfile.write('_subtype=%s,\n' % (self._subtype,))3486        if self._instances is not None and '_instances' not in already_processed:3487            already_processed.add('_instances')3488            showIndent(outfile, level)3489            outfile.write('_instances="%s",\n' % (self._instances,))3490        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3491            already_processed.add('_desynched_atts')3492            showIndent(outfile, level)3493            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))3494        if self._id is not None and '_id' not in already_processed:3495            already_processed.add('_id')3496            showIndent(outfile, level)3497            outfile.write('_id="%s",\n' % (self._id,))3498    def exportLiteralChildren(self, outfile, level, name_):3499        showIndent(outfile, level)3500        outfile.write('MaterialProperties=[\n')3501        level += 13502        for MaterialProperties_ in self.MaterialProperties:3503            showIndent(outfile, level)3504            outfile.write('model_.MaterialPropertiesType(\n')3505            MaterialProperties_.exportLiteral(outfile, level, name_='MaterialPropertiesType')3506            showIndent(outfile, level)3507            outfile.write('),\n')3508        level -= 13509        showIndent(outfile, level)3510        outfile.write('],\n')3511    def build(self, node):3512        already_processed = set()3513        self.buildAttributes(node, node.attrib, already_processed)3514        for child in node:3515            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3516            self.buildChildren(child, node, nodeName_)3517        return self3518    def buildAttributes(self, node, attrs, already_processed):3519        value = find_attr_value_('_derived', node)3520        if value is not None and '_derived' not in already_processed:3521            already_processed.add('_derived')3522            self._derived = value3523        value = find_attr_value_('_real_archetype', node)3524        if value is not None and '_real_archetype' not in already_processed:3525            already_processed.add('_real_archetype')3526            if value in ('true', '1'):3527                self._real_archetype = True3528            elif value in ('false', '0'):3529                self._real_archetype = False3530            else:3531                raise_parse_error(node, 'Bad boolean attribute')3532        value = find_attr_value_('_archetype', node)3533        if value is not None and '_archetype' not in already_processed:3534            already_processed.add('_archetype')3535            self._archetype = value3536        value = find_attr_value_('MaterialID', node)3537        if value is not None and 'MaterialID' not in already_processed:3538            already_processed.add('MaterialID')3539            self.MaterialID = value3540        value = find_attr_value_('_subtype', node)3541        if value is not None and '_subtype' not in already_processed:3542            already_processed.add('_subtype')3543            if value in ('true', '1'):3544                self._subtype = True3545            elif value in ('false', '0'):3546                self._subtype = False3547            else:3548                raise_parse_error(node, 'Bad boolean attribute')3549        value = find_attr_value_('_instances', node)3550        if value is not None and '_instances' not in already_processed:3551            already_processed.add('_instances')3552            self._instances = value3553        value = find_attr_value_('_desynched_atts', node)3554        if value is not None and '_desynched_atts' not in already_processed:3555            already_processed.add('_desynched_atts')3556            self._desynched_atts = value3557        value = find_attr_value_('_id', node)3558        if value is not None and '_id' not in already_processed:3559            already_processed.add('_id')3560            self._id = value3561    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3562        if nodeName_ == 'MaterialProperties':3563            obj_ = MaterialPropertiesType.factory()3564            obj_.build(child_)3565            self.MaterialProperties.append(obj_)3566            obj_.original_tagname_ = 'MaterialProperties'3567# end class MaterialType356835693570class MaterialPropertiesType(GeneratedsSuper):3571    subclass = None3572    superclass = None3573    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, AllowableBearingStress=None, AllowableShearStress=None, AllowableTensileStress=None):3574        self.original_tagname_ = None3575        self._derived = _cast(None, _derived)3576        self._real_archetype = _cast(bool, _real_archetype)3577        self._archetype = _cast(None, _archetype)3578        self._subtype = _cast(bool, _subtype)3579        self._instances = _cast(None, _instances)3580        self._desynched_atts = _cast(None, _desynched_atts)3581        self._id = _cast(None, _id)3582        self.AllowableBearingStress = AllowableBearingStress3583        self.AllowableShearStress = AllowableShearStress3584        self.AllowableTensileStress = AllowableTensileStress3585    def factory(*args_, **kwargs_):3586        if MaterialPropertiesType.subclass:3587            return MaterialPropertiesType.subclass(*args_, **kwargs_)3588        else:3589            return MaterialPropertiesType(*args_, **kwargs_)3590    factory = staticmethod(factory)3591    def get_AllowableBearingStress(self): return self.AllowableBearingStress3592    def set_AllowableBearingStress(self, AllowableBearingStress): self.AllowableBearingStress = AllowableBearingStress3593    def get_AllowableShearStress(self): return self.AllowableShearStress3594    def set_AllowableShearStress(self, AllowableShearStress): self.AllowableShearStress = AllowableShearStress3595    def get_AllowableTensileStress(self): return self.AllowableTensileStress3596    def set_AllowableTensileStress(self, AllowableTensileStress): self.AllowableTensileStress = AllowableTensileStress3597    def get__derived(self): return self._derived3598    def set__derived(self, _derived): self._derived = _derived3599    def get__real_archetype(self): return self._real_archetype3600    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype3601    def get__archetype(self): return self._archetype3602    def set__archetype(self, _archetype): self._archetype = _archetype3603    def get__subtype(self): return self._subtype3604    def set__subtype(self, _subtype): self._subtype = _subtype3605    def get__instances(self): return self._instances3606    def set__instances(self, _instances): self._instances = _instances3607    def get__desynched_atts(self): return self._desynched_atts3608    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts3609    def get__id(self): return self._id3610    def set__id(self, _id): self._id = _id3611    def hasContent_(self):3612        if (3613            self.AllowableBearingStress is not None or3614            self.AllowableShearStress is not None or3615            self.AllowableTensileStress is not None3616        ):3617            return True3618        else:3619            return False3620    def export(self, outfile, level, namespace_='', name_='MaterialPropertiesType', namespacedef_='', pretty_print=True):3621        if pretty_print:3622            eol_ = '\n'3623        else:3624            eol_ = ''3625        if self.original_tagname_ is not None:3626            name_ = self.original_tagname_3627        showIndent(outfile, level, pretty_print)3628        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3629        already_processed = set()3630        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MaterialPropertiesType')3631        if self.hasContent_():3632            outfile.write('>%s' % (eol_, ))3633            self.exportChildren(outfile, level + 1, namespace_='', name_='MaterialPropertiesType', pretty_print=pretty_print)3634            showIndent(outfile, level, pretty_print)3635            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))3636        else:3637            outfile.write('/>%s' % (eol_, ))3638    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MaterialPropertiesType'):3639        if self._derived is not None and '_derived' not in already_processed:3640            already_processed.add('_derived')3641            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))3642        if self._real_archetype is not None and '_real_archetype' not in already_processed:3643            already_processed.add('_real_archetype')3644            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))3645        if self._archetype is not None and '_archetype' not in already_processed:3646            already_processed.add('_archetype')3647            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))3648        if self._subtype is not None and '_subtype' not in already_processed:3649            already_processed.add('_subtype')3650            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))3651        if self._instances is not None and '_instances' not in already_processed:3652            already_processed.add('_instances')3653            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))3654        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3655            already_processed.add('_desynched_atts')3656            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))3657        if self._id is not None and '_id' not in already_processed:3658            already_processed.add('_id')3659            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))3660    def exportChildren(self, outfile, level, namespace_='', name_='MaterialPropertiesType', fromsubclass_=False, pretty_print=True):3661        if pretty_print:3662            eol_ = '\n'3663        else:3664            eol_ = ''3665        if self.AllowableBearingStress is not None:3666            self.AllowableBearingStress.export(outfile, level, namespace_, name_='AllowableBearingStress', pretty_print=pretty_print)3667        if self.AllowableShearStress is not None:3668            self.AllowableShearStress.export(outfile, level, namespace_, name_='AllowableShearStress', pretty_print=pretty_print)3669        if self.AllowableTensileStress is not None:3670            self.AllowableTensileStress.export(outfile, level, namespace_, name_='AllowableTensileStress', pretty_print=pretty_print)3671    def exportLiteral(self, outfile, level, name_='MaterialPropertiesType'):3672        level += 13673        already_processed = set()3674        self.exportLiteralAttributes(outfile, level, already_processed, name_)3675        if self.hasContent_():3676            self.exportLiteralChildren(outfile, level, name_)3677    def exportLiteralAttributes(self, outfile, level, already_processed, name_):3678        if self._derived is not None and '_derived' not in already_processed:3679            already_processed.add('_derived')3680            showIndent(outfile, level)3681            outfile.write('_derived="%s",\n' % (self._derived,))3682        if self._real_archetype is not None and '_real_archetype' not in already_processed:3683            already_processed.add('_real_archetype')3684            showIndent(outfile, level)3685            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))3686        if self._archetype is not None and '_archetype' not in already_processed:3687            already_processed.add('_archetype')3688            showIndent(outfile, level)3689            outfile.write('_archetype="%s",\n' % (self._archetype,))3690        if self._subtype is not None and '_subtype' not in already_processed:3691            already_processed.add('_subtype')3692            showIndent(outfile, level)3693            outfile.write('_subtype=%s,\n' % (self._subtype,))3694        if self._instances is not None and '_instances' not in already_processed:3695            already_processed.add('_instances')3696            showIndent(outfile, level)3697            outfile.write('_instances="%s",\n' % (self._instances,))3698        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:3699            already_processed.add('_desynched_atts')3700            showIndent(outfile, level)3701            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))3702        if self._id is not None and '_id' not in already_processed:3703            already_processed.add('_id')3704            showIndent(outfile, level)3705            outfile.write('_id="%s",\n' % (self._id,))3706    def exportLiteralChildren(self, outfile, level, name_):3707        if self.AllowableBearingStress is not None:3708            showIndent(outfile, level)3709            outfile.write('AllowableBearingStress=model_.AllowableBearingStressType(\n')3710            self.AllowableBearingStress.exportLiteral(outfile, level, name_='AllowableBearingStress')3711            showIndent(outfile, level)3712            outfile.write('),\n')3713        if self.AllowableShearStress is not None:3714            showIndent(outfile, level)3715            outfile.write('AllowableShearStress=model_.AllowableShearStressType(\n')3716            self.AllowableShearStress.exportLiteral(outfile, level, name_='AllowableShearStress')3717            showIndent(outfile, level)3718            outfile.write('),\n')3719        if self.AllowableTensileStress is not None:3720            showIndent(outfile, level)3721            outfile.write('AllowableTensileStress=model_.AllowableTensileStressType(\n')3722            self.AllowableTensileStress.exportLiteral(outfile, level, name_='AllowableTensileStress')3723            showIndent(outfile, level)3724            outfile.write('),\n')3725    def build(self, node):3726        already_processed = set()3727        self.buildAttributes(node, node.attrib, already_processed)3728        for child in node:3729            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3730            self.buildChildren(child, node, nodeName_)3731        return self3732    def buildAttributes(self, node, attrs, already_processed):3733        value = find_attr_value_('_derived', node)3734        if value is not None and '_derived' not in already_processed:3735            already_processed.add('_derived')3736            self._derived = value3737        value = find_attr_value_('_real_archetype', node)3738        if value is not None and '_real_archetype' not in already_processed:3739            already_processed.add('_real_archetype')3740            if value in ('true', '1'):3741                self._real_archetype = True3742            elif value in ('false', '0'):3743                self._real_archetype = False3744            else:3745                raise_parse_error(node, 'Bad boolean attribute')3746        value = find_attr_value_('_archetype', node)3747        if value is not None and '_archetype' not in already_processed:3748            already_processed.add('_archetype')3749            self._archetype = value3750        value = find_attr_value_('_subtype', node)3751        if value is not None and '_subtype' not in already_processed:3752            already_processed.add('_subtype')3753            if value in ('true', '1'):3754                self._subtype = True3755            elif value in ('false', '0'):3756                self._subtype = False3757            else:3758                raise_parse_error(node, 'Bad boolean attribute')3759        value = find_attr_value_('_instances', node)3760        if value is not None and '_instances' not in already_processed:3761            already_processed.add('_instances')3762            self._instances = value3763        value = find_attr_value_('_desynched_atts', node)3764        if value is not None and '_desynched_atts' not in already_processed:3765            already_processed.add('_desynched_atts')3766            self._desynched_atts = value3767        value = find_attr_value_('_id', node)3768        if value is not None and '_id' not in already_processed:3769            already_processed.add('_id')3770            self._id = value3771    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):3772        if nodeName_ == 'AllowableBearingStress':3773            obj_ = AllowableBearingStressType.factory()3774            obj_.build(child_)3775            self.AllowableBearingStress = obj_3776            obj_.original_tagname_ = 'AllowableBearingStress'3777        elif nodeName_ == 'AllowableShearStress':3778            obj_ = AllowableShearStressType.factory()3779            obj_.build(child_)3780            self.AllowableShearStress = obj_3781            obj_.original_tagname_ = 'AllowableShearStress'
...CreateAdamsModel_cadPostProcessing.py
Source:CreateAdamsModel_cadPostProcessing.py  
...454            text += child.tail455    return text456457458def find_attr_value_(attr_name, node):459    attrs = node.attrib460    attr_parts = attr_name.split(':')461    value = None462    if len(attr_parts) == 1:463        value = attrs.get(attr_name)464    elif len(attr_parts) == 2:465        prefix, name = attr_parts466        namespace = node.nsmap.get(prefix)467        if namespace is not None:468            value = attrs.get('{%s}%s' % (namespace, name, ))469    return value470471472class GDSParseError(Exception):473    pass474475476def raise_parse_error(node, msg):477    if XMLParser_import_library == XMLParser_import_lxml:478        msg = '%s (element %s/line %d)' % (479            msg, node.tag, node.sourceline, )480    else:481        msg = '%s (element %s)' % (msg, node.tag, )482    raise GDSParseError(msg)483484485class MixedContainer:486    # Constants for category:487    CategoryNone = 0488    CategoryText = 1489    CategorySimple = 2490    CategoryComplex = 3491    # Constants for content_type:492    TypeNone = 0493    TypeText = 1494    TypeString = 2495    TypeInteger = 3496    TypeFloat = 4497    TypeDecimal = 5498    TypeDouble = 6499    TypeBoolean = 7500    TypeBase64 = 8501    def __init__(self, category, content_type, name, value):502        self.category = category503        self.content_type = content_type504        self.name = name505        self.value = value506    def getCategory(self):507        return self.category508    def getContenttype(self, content_type):509        return self.content_type510    def getValue(self):511        return self.value512    def getName(self):513        return self.name514    def export(self, outfile, level, name, namespace, pretty_print=True):515        if self.category == MixedContainer.CategoryText:516            # Prevent exporting empty content as empty lines.517            if self.value.strip():518                outfile.write(self.value)519        elif self.category == MixedContainer.CategorySimple:520            self.exportSimple(outfile, level, name)521        else:    # category == MixedContainer.CategoryComplex522            self.value.export(outfile, level, namespace, name, pretty_print)523    def exportSimple(self, outfile, level, name):524        if self.content_type == MixedContainer.TypeString:525            outfile.write('<%s>%s</%s>' % (526                self.name, self.value, self.name))527        elif self.content_type == MixedContainer.TypeInteger or \528                self.content_type == MixedContainer.TypeBoolean:529            outfile.write('<%s>%d</%s>' % (530                self.name, self.value, self.name))531        elif self.content_type == MixedContainer.TypeFloat or \532                self.content_type == MixedContainer.TypeDecimal:533            outfile.write('<%s>%f</%s>' % (534                self.name, self.value, self.name))535        elif self.content_type == MixedContainer.TypeDouble:536            outfile.write('<%s>%g</%s>' % (537                self.name, self.value, self.name))538        elif self.content_type == MixedContainer.TypeBase64:539            outfile.write('<%s>%s</%s>' % (540                self.name, base64.b64encode(self.value), self.name))541    def to_etree(self, element):542        if self.category == MixedContainer.CategoryText:543            # Prevent exporting empty content as empty lines.544            if self.value.strip():545                if len(element) > 0:546                    if element[-1].tail is None:547                        element[-1].tail = self.value548                    else:549                        element[-1].tail += self.value550                else:551                    if element.text is None:552                        element.text = self.value553                    else:554                        element.text += self.value555        elif self.category == MixedContainer.CategorySimple:556            subelement = etree_.SubElement(element, '%s' % self.name)557            subelement.text = self.to_etree_simple()558        else:    # category == MixedContainer.CategoryComplex559            self.value.to_etree(element)560    def to_etree_simple(self):561        if self.content_type == MixedContainer.TypeString:562            text = self.value563        elif (self.content_type == MixedContainer.TypeInteger or564                self.content_type == MixedContainer.TypeBoolean):565            text = '%d' % self.value566        elif (self.content_type == MixedContainer.TypeFloat or567                self.content_type == MixedContainer.TypeDecimal):568            text = '%f' % self.value569        elif self.content_type == MixedContainer.TypeDouble:570            text = '%g' % self.value571        elif self.content_type == MixedContainer.TypeBase64:572            text = '%s' % base64.b64encode(self.value)573        return text574    def exportLiteral(self, outfile, level, name):575        if self.category == MixedContainer.CategoryText:576            showIndent(outfile, level)577            outfile.write(578                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (579                    self.category, self.content_type, self.name, self.value))580        elif self.category == MixedContainer.CategorySimple:581            showIndent(outfile, level)582            outfile.write(583                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (584                    self.category, self.content_type, self.name, self.value))585        else:    # category == MixedContainer.CategoryComplex586            showIndent(outfile, level)587            outfile.write(588                'model_.MixedContainer(%d, %d, "%s",\n' % (589                    self.category, self.content_type, self.name,))590            self.value.exportLiteral(outfile, level + 1)591            showIndent(outfile, level)592            outfile.write(')\n')593594595class MemberSpec_(object):596    def __init__(self, name='', data_type='', container=0):597        self.name = name598        self.data_type = data_type599        self.container = container600    def set_name(self, name): self.name = name601    def get_name(self): return self.name602    def set_data_type(self, data_type): self.data_type = data_type603    def get_data_type_chain(self): return self.data_type604    def get_data_type(self):605        if isinstance(self.data_type, list):606            if len(self.data_type) > 0:607                return self.data_type[-1]608            else:609                return 'xs:string'610        else:611            return self.data_type612    def set_container(self, container): self.container = container613    def get_container(self): return self.container614615616def _cast(typ, value):617    if typ is None or value is None:618        return value619    return typ(value)620621#622# Data representation classes.623#624625626class ComplexMetricType(GeneratedsSuper):627    subclass = None628    superclass = None629    def __init__(self, _instances=None, _derived=None, _real_archetype=None, _desynched_atts=None, MetricID=None, _subtype=None, SubType=None, DataFormat=None, _archetype=None, _id=None, Type=None, Metric=None):630        self.original_tagname_ = None631        self._instances = _cast(None, _instances)632        self._derived = _cast(None, _derived)633        self._real_archetype = _cast(bool, _real_archetype)634        self._desynched_atts = _cast(None, _desynched_atts)635        self.MetricID = _cast(None, MetricID)636        self._subtype = _cast(bool, _subtype)637        self.SubType = _cast(None, SubType)638        self.DataFormat = _cast(None, DataFormat)639        self._archetype = _cast(None, _archetype)640        self._id = _cast(None, _id)641        self.Type = _cast(None, Type)642        if Metric is None:643            self.Metric = []644        else:645            self.Metric = Metric646    def factory(*args_, **kwargs_):647        if ComplexMetricType.subclass:648            return ComplexMetricType.subclass(*args_, **kwargs_)649        else:650            return ComplexMetricType(*args_, **kwargs_)651    factory = staticmethod(factory)652    def get_Metric(self): return self.Metric653    def set_Metric(self, Metric): self.Metric = Metric654    def add_Metric(self, value): self.Metric.append(value)655    def insert_Metric(self, index, value): self.Metric[index] = value656    def get__instances(self): return self._instances657    def set__instances(self, _instances): self._instances = _instances658    def get__derived(self): return self._derived659    def set__derived(self, _derived): self._derived = _derived660    def get__real_archetype(self): return self._real_archetype661    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype662    def get__desynched_atts(self): return self._desynched_atts663    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts664    def get_MetricID(self): return self.MetricID665    def set_MetricID(self, MetricID): self.MetricID = MetricID666    def get__subtype(self): return self._subtype667    def set__subtype(self, _subtype): self._subtype = _subtype668    def get_SubType(self): return self.SubType669    def set_SubType(self, SubType): self.SubType = SubType670    def get_DataFormat(self): return self.DataFormat671    def set_DataFormat(self, DataFormat): self.DataFormat = DataFormat672    def get__archetype(self): return self._archetype673    def set__archetype(self, _archetype): self._archetype = _archetype674    def get__id(self): return self._id675    def set__id(self, _id): self._id = _id676    def get_Type(self): return self.Type677    def set_Type(self, Type): self.Type = Type678    def hasContent_(self):679        if (680            self.Metric681        ):682            return True683        else:684            return False685    def export(self, outfile, level, namespace_='', name_='ComplexMetricType', namespacedef_='', pretty_print=True):686        if pretty_print:687            eol_ = '\n'688        else:689            eol_ = ''690        if self.original_tagname_ is not None:691            name_ = self.original_tagname_692        showIndent(outfile, level, pretty_print)693        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))694        already_processed = set()695        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ComplexMetricType')696        if self.hasContent_():697            outfile.write('>%s' % (eol_, ))698            self.exportChildren(outfile, level + 1, namespace_='', name_='ComplexMetricType', pretty_print=pretty_print)699            showIndent(outfile, level, pretty_print)700            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))701        else:702            outfile.write('/>%s' % (eol_, ))703    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ComplexMetricType'):704        if self._instances is not None and '_instances' not in already_processed:705            already_processed.add('_instances')706            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))707        if self._derived is not None and '_derived' not in already_processed:708            already_processed.add('_derived')709            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))710        if self._real_archetype is not None and '_real_archetype' not in already_processed:711            already_processed.add('_real_archetype')712            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))713        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:714            already_processed.add('_desynched_atts')715            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))716        if self.MetricID is not None and 'MetricID' not in already_processed:717            already_processed.add('MetricID')718            outfile.write(' MetricID=%s' % (self.gds_format_string(quote_attrib(self.MetricID).encode(ExternalEncoding), input_name='MetricID'), ))719        if self._subtype is not None and '_subtype' not in already_processed:720            already_processed.add('_subtype')721            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))722        if self.SubType is not None and 'SubType' not in already_processed:723            already_processed.add('SubType')724            outfile.write(' SubType=%s' % (self.gds_format_string(quote_attrib(self.SubType).encode(ExternalEncoding), input_name='SubType'), ))725        if self.DataFormat is not None and 'DataFormat' not in already_processed:726            already_processed.add('DataFormat')727            outfile.write(' DataFormat=%s' % (self.gds_format_string(quote_attrib(self.DataFormat).encode(ExternalEncoding), input_name='DataFormat'), ))728        if self._archetype is not None and '_archetype' not in already_processed:729            already_processed.add('_archetype')730            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))731        if self._id is not None and '_id' not in already_processed:732            already_processed.add('_id')733            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))734        if self.Type is not None and 'Type' not in already_processed:735            already_processed.add('Type')736            outfile.write(' Type=%s' % (self.gds_format_string(quote_attrib(self.Type).encode(ExternalEncoding), input_name='Type'), ))737    def exportChildren(self, outfile, level, namespace_='', name_='ComplexMetricType', fromsubclass_=False, pretty_print=True):738        if pretty_print:739            eol_ = '\n'740        else:741            eol_ = ''742        for Metric_ in self.Metric:743            Metric_.export(outfile, level, namespace_, name_='Metric', pretty_print=pretty_print)744    def exportLiteral(self, outfile, level, name_='ComplexMetricType'):745        level += 1746        already_processed = set()747        self.exportLiteralAttributes(outfile, level, already_processed, name_)748        if self.hasContent_():749            self.exportLiteralChildren(outfile, level, name_)750    def exportLiteralAttributes(self, outfile, level, already_processed, name_):751        if self._instances is not None and '_instances' not in already_processed:752            already_processed.add('_instances')753            showIndent(outfile, level)754            outfile.write('_instances="%s",\n' % (self._instances,))755        if self._derived is not None and '_derived' not in already_processed:756            already_processed.add('_derived')757            showIndent(outfile, level)758            outfile.write('_derived="%s",\n' % (self._derived,))759        if self._real_archetype is not None and '_real_archetype' not in already_processed:760            already_processed.add('_real_archetype')761            showIndent(outfile, level)762            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))763        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:764            already_processed.add('_desynched_atts')765            showIndent(outfile, level)766            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))767        if self.MetricID is not None and 'MetricID' not in already_processed:768            already_processed.add('MetricID')769            showIndent(outfile, level)770            outfile.write('MetricID="%s",\n' % (self.MetricID,))771        if self._subtype is not None and '_subtype' not in already_processed:772            already_processed.add('_subtype')773            showIndent(outfile, level)774            outfile.write('_subtype=%s,\n' % (self._subtype,))775        if self.SubType is not None and 'SubType' not in already_processed:776            already_processed.add('SubType')777            showIndent(outfile, level)778            outfile.write('SubType="%s",\n' % (self.SubType,))779        if self.DataFormat is not None and 'DataFormat' not in already_processed:780            already_processed.add('DataFormat')781            showIndent(outfile, level)782            outfile.write('DataFormat="%s",\n' % (self.DataFormat,))783        if self._archetype is not None and '_archetype' not in already_processed:784            already_processed.add('_archetype')785            showIndent(outfile, level)786            outfile.write('_archetype="%s",\n' % (self._archetype,))787        if self._id is not None and '_id' not in already_processed:788            already_processed.add('_id')789            showIndent(outfile, level)790            outfile.write('_id="%s",\n' % (self._id,))791        if self.Type is not None and 'Type' not in already_processed:792            already_processed.add('Type')793            showIndent(outfile, level)794            outfile.write('Type="%s",\n' % (self.Type,))795    def exportLiteralChildren(self, outfile, level, name_):796        showIndent(outfile, level)797        outfile.write('Metric=[\n')798        level += 1799        for Metric_ in self.Metric:800            showIndent(outfile, level)801            outfile.write('model_.MetricType(\n')802            Metric_.exportLiteral(outfile, level, name_='MetricType')803            showIndent(outfile, level)804            outfile.write('),\n')805        level -= 1806        showIndent(outfile, level)807        outfile.write('],\n')808    def build(self, node):809        already_processed = set()810        self.buildAttributes(node, node.attrib, already_processed)811        for child in node:812            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]813            self.buildChildren(child, node, nodeName_)814        return self815    def buildAttributes(self, node, attrs, already_processed):816        value = find_attr_value_('_instances', node)817        if value is not None and '_instances' not in already_processed:818            already_processed.add('_instances')819            self._instances = value820        value = find_attr_value_('_derived', node)821        if value is not None and '_derived' not in already_processed:822            already_processed.add('_derived')823            self._derived = value824        value = find_attr_value_('_real_archetype', node)825        if value is not None and '_real_archetype' not in already_processed:826            already_processed.add('_real_archetype')827            if value in ('true', '1'):828                self._real_archetype = True829            elif value in ('false', '0'):830                self._real_archetype = False831            else:832                raise_parse_error(node, 'Bad boolean attribute')833        value = find_attr_value_('_desynched_atts', node)834        if value is not None and '_desynched_atts' not in already_processed:835            already_processed.add('_desynched_atts')836            self._desynched_atts = value837        value = find_attr_value_('MetricID', node)838        if value is not None and 'MetricID' not in already_processed:839            already_processed.add('MetricID')840            self.MetricID = value841        value = find_attr_value_('_subtype', node)842        if value is not None and '_subtype' not in already_processed:843            already_processed.add('_subtype')844            if value in ('true', '1'):845                self._subtype = True846            elif value in ('false', '0'):847                self._subtype = False848            else:849                raise_parse_error(node, 'Bad boolean attribute')850        value = find_attr_value_('SubType', node)851        if value is not None and 'SubType' not in already_processed:852            already_processed.add('SubType')853            self.SubType = value854        value = find_attr_value_('DataFormat', node)855        if value is not None and 'DataFormat' not in already_processed:856            already_processed.add('DataFormat')857            self.DataFormat = value858        value = find_attr_value_('_archetype', node)859        if value is not None and '_archetype' not in already_processed:860            already_processed.add('_archetype')861            self._archetype = value862        value = find_attr_value_('_id', node)863        if value is not None and '_id' not in already_processed:864            already_processed.add('_id')865            self._id = value866        value = find_attr_value_('Type', node)867        if value is not None and 'Type' not in already_processed:868            already_processed.add('Type')869            self.Type = value870    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):871        if nodeName_ == 'Metric':872            obj_ = MetricType.factory()873            obj_.build(child_)874            self.Metric.append(obj_)875            obj_.original_tagname_ = 'Metric'876# end class ComplexMetricType877878879class MetricType(GeneratedsSuper):880    subclass = None881    superclass = None882    def __init__(self, _instances=None, _derived=None, _real_archetype=None, _desynched_atts=None, Type=None, MetricID=None, _subtype=None, DataFormat=None, _archetype=None, Units=None, _id=None, ArrayValue=None):883        self.original_tagname_ = None884        self._instances = _cast(None, _instances)885        self._derived = _cast(None, _derived)886        self._real_archetype = _cast(bool, _real_archetype)887        self._desynched_atts = _cast(None, _desynched_atts)888        self.Type = _cast(None, Type)889        self.MetricID = _cast(None, MetricID)890        self._subtype = _cast(bool, _subtype)891        self.DataFormat = _cast(None, DataFormat)892        self._archetype = _cast(None, _archetype)893        self.Units = _cast(None, Units)894        self._id = _cast(None, _id)895        self.ArrayValue = _cast(None, ArrayValue)896    def factory(*args_, **kwargs_):897        if MetricType.subclass:898            return MetricType.subclass(*args_, **kwargs_)899        else:900            return MetricType(*args_, **kwargs_)901    factory = staticmethod(factory)902    def get__instances(self): return self._instances903    def set__instances(self, _instances): self._instances = _instances904    def get__derived(self): return self._derived905    def set__derived(self, _derived): self._derived = _derived906    def get__real_archetype(self): return self._real_archetype907    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype908    def get__desynched_atts(self): return self._desynched_atts909    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts910    def get_Type(self): return self.Type911    def set_Type(self, Type): self.Type = Type912    def get_MetricID(self): return self.MetricID913    def set_MetricID(self, MetricID): self.MetricID = MetricID914    def get__subtype(self): return self._subtype915    def set__subtype(self, _subtype): self._subtype = _subtype916    def get_DataFormat(self): return self.DataFormat917    def set_DataFormat(self, DataFormat): self.DataFormat = DataFormat918    def get__archetype(self): return self._archetype919    def set__archetype(self, _archetype): self._archetype = _archetype920    def get_Units(self): return self.Units921    def set_Units(self, Units): self.Units = Units922    def get__id(self): return self._id923    def set__id(self, _id): self._id = _id924    def get_ArrayValue(self): return self.ArrayValue925    def set_ArrayValue(self, ArrayValue): self.ArrayValue = ArrayValue926    def hasContent_(self):927        if (928929        ):930            return True931        else:932            return False933    def export(self, outfile, level, namespace_='', name_='MetricType', namespacedef_='', pretty_print=True):934        if pretty_print:935            eol_ = '\n'936        else:937            eol_ = ''938        if self.original_tagname_ is not None:939            name_ = self.original_tagname_940        showIndent(outfile, level, pretty_print)941        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))942        already_processed = set()943        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MetricType')944        if self.hasContent_():945            outfile.write('>%s' % (eol_, ))946            self.exportChildren(outfile, level + 1, namespace_='', name_='MetricType', pretty_print=pretty_print)947            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))948        else:949            outfile.write('/>%s' % (eol_, ))950    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MetricType'):951        if self._instances is not None and '_instances' not in already_processed:952            already_processed.add('_instances')953            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))954        if self._derived is not None and '_derived' not in already_processed:955            already_processed.add('_derived')956            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))957        if self._real_archetype is not None and '_real_archetype' not in already_processed:958            already_processed.add('_real_archetype')959            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))960        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:961            already_processed.add('_desynched_atts')962            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))963        if self.Type is not None and 'Type' not in already_processed:964            already_processed.add('Type')965            outfile.write(' Type=%s' % (self.gds_format_string(quote_attrib(self.Type).encode(ExternalEncoding), input_name='Type'), ))966        if self.MetricID is not None and 'MetricID' not in already_processed:967            already_processed.add('MetricID')968            outfile.write(' MetricID=%s' % (self.gds_format_string(quote_attrib(self.MetricID).encode(ExternalEncoding), input_name='MetricID'), ))969        if self._subtype is not None and '_subtype' not in already_processed:970            already_processed.add('_subtype')971            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))972        if self.DataFormat is not None and 'DataFormat' not in already_processed:973            already_processed.add('DataFormat')974            outfile.write(' DataFormat=%s' % (self.gds_format_string(quote_attrib(self.DataFormat).encode(ExternalEncoding), input_name='DataFormat'), ))975        if self._archetype is not None and '_archetype' not in already_processed:976            already_processed.add('_archetype')977            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))978        if self.Units is not None and 'Units' not in already_processed:979            already_processed.add('Units')980            outfile.write(' Units=%s' % (self.gds_format_string(quote_attrib(self.Units).encode(ExternalEncoding), input_name='Units'), ))981        if self._id is not None and '_id' not in already_processed:982            already_processed.add('_id')983            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))984        if self.ArrayValue is not None and 'ArrayValue' not in already_processed:985            already_processed.add('ArrayValue')986            outfile.write(' ArrayValue=%s' % (self.gds_format_string(quote_attrib(self.ArrayValue).encode(ExternalEncoding), input_name='ArrayValue'), ))987    def exportChildren(self, outfile, level, namespace_='', name_='MetricType', fromsubclass_=False, pretty_print=True):988        pass989    def exportLiteral(self, outfile, level, name_='MetricType'):990        level += 1991        already_processed = set()992        self.exportLiteralAttributes(outfile, level, already_processed, name_)993        if self.hasContent_():994            self.exportLiteralChildren(outfile, level, name_)995    def exportLiteralAttributes(self, outfile, level, already_processed, name_):996        if self._instances is not None and '_instances' not in already_processed:997            already_processed.add('_instances')998            showIndent(outfile, level)999            outfile.write('_instances="%s",\n' % (self._instances,))1000        if self._derived is not None and '_derived' not in already_processed:1001            already_processed.add('_derived')1002            showIndent(outfile, level)1003            outfile.write('_derived="%s",\n' % (self._derived,))1004        if self._real_archetype is not None and '_real_archetype' not in already_processed:1005            already_processed.add('_real_archetype')1006            showIndent(outfile, level)1007            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1008        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1009            already_processed.add('_desynched_atts')1010            showIndent(outfile, level)1011            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1012        if self.Type is not None and 'Type' not in already_processed:1013            already_processed.add('Type')1014            showIndent(outfile, level)1015            outfile.write('Type="%s",\n' % (self.Type,))1016        if self.MetricID is not None and 'MetricID' not in already_processed:1017            already_processed.add('MetricID')1018            showIndent(outfile, level)1019            outfile.write('MetricID="%s",\n' % (self.MetricID,))1020        if self._subtype is not None and '_subtype' not in already_processed:1021            already_processed.add('_subtype')1022            showIndent(outfile, level)1023            outfile.write('_subtype=%s,\n' % (self._subtype,))1024        if self.DataFormat is not None and 'DataFormat' not in already_processed:1025            already_processed.add('DataFormat')1026            showIndent(outfile, level)1027            outfile.write('DataFormat="%s",\n' % (self.DataFormat,))1028        if self._archetype is not None and '_archetype' not in already_processed:1029            already_processed.add('_archetype')1030            showIndent(outfile, level)1031            outfile.write('_archetype="%s",\n' % (self._archetype,))1032        if self.Units is not None and 'Units' not in already_processed:1033            already_processed.add('Units')1034            showIndent(outfile, level)1035            outfile.write('Units="%s",\n' % (self.Units,))1036        if self._id is not None and '_id' not in already_processed:1037            already_processed.add('_id')1038            showIndent(outfile, level)1039            outfile.write('_id="%s",\n' % (self._id,))1040        if self.ArrayValue is not None and 'ArrayValue' not in already_processed:1041            already_processed.add('ArrayValue')1042            showIndent(outfile, level)1043            outfile.write('ArrayValue="%s",\n' % (self.ArrayValue,))1044    def exportLiteralChildren(self, outfile, level, name_):1045        pass1046    def build(self, node):1047        already_processed = set()1048        self.buildAttributes(node, node.attrib, already_processed)1049        for child in node:1050            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1051            self.buildChildren(child, node, nodeName_)1052        return self1053    def buildAttributes(self, node, attrs, already_processed):1054        value = find_attr_value_('_instances', node)1055        if value is not None and '_instances' not in already_processed:1056            already_processed.add('_instances')1057            self._instances = value1058        value = find_attr_value_('_derived', node)1059        if value is not None and '_derived' not in already_processed:1060            already_processed.add('_derived')1061            self._derived = value1062        value = find_attr_value_('_real_archetype', node)1063        if value is not None and '_real_archetype' not in already_processed:1064            already_processed.add('_real_archetype')1065            if value in ('true', '1'):1066                self._real_archetype = True1067            elif value in ('false', '0'):1068                self._real_archetype = False1069            else:1070                raise_parse_error(node, 'Bad boolean attribute')1071        value = find_attr_value_('_desynched_atts', node)1072        if value is not None and '_desynched_atts' not in already_processed:1073            already_processed.add('_desynched_atts')1074            self._desynched_atts = value1075        value = find_attr_value_('Type', node)1076        if value is not None and 'Type' not in already_processed:1077            already_processed.add('Type')1078            self.Type = value1079        value = find_attr_value_('MetricID', node)1080        if value is not None and 'MetricID' not in already_processed:1081            already_processed.add('MetricID')1082            self.MetricID = value1083        value = find_attr_value_('_subtype', node)1084        if value is not None and '_subtype' not in already_processed:1085            already_processed.add('_subtype')1086            if value in ('true', '1'):1087                self._subtype = True1088            elif value in ('false', '0'):1089                self._subtype = False1090            else:1091                raise_parse_error(node, 'Bad boolean attribute')1092        value = find_attr_value_('DataFormat', node)1093        if value is not None and 'DataFormat' not in already_processed:1094            already_processed.add('DataFormat')1095            self.DataFormat = value1096        value = find_attr_value_('_archetype', node)1097        if value is not None and '_archetype' not in already_processed:1098            already_processed.add('_archetype')1099            self._archetype = value1100        value = find_attr_value_('Units', node)1101        if value is not None and 'Units' not in already_processed:1102            already_processed.add('Units')1103            self.Units = value1104        value = find_attr_value_('_id', node)1105        if value is not None and '_id' not in already_processed:1106            already_processed.add('_id')1107            self._id = value1108        value = find_attr_value_('ArrayValue', node)1109        if value is not None and 'ArrayValue' not in already_processed:1110            already_processed.add('ArrayValue')1111            self.ArrayValue = value1112    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1113        pass1114# end class MetricType111511161117class MetricsType(GeneratedsSuper):1118    subclass = None1119    superclass = None1120    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, ComplexMetric=None, Metric=None):1121        self.original_tagname_ = None1122        self._derived = _cast(None, _derived)1123        self._real_archetype = _cast(bool, _real_archetype)1124        self._archetype = _cast(None, _archetype)1125        self._subtype = _cast(bool, _subtype)1126        self._instances = _cast(None, _instances)1127        self._desynched_atts = _cast(None, _desynched_atts)1128        self._id = _cast(None, _id)1129        if ComplexMetric is None:1130            self.ComplexMetric = []1131        else:1132            self.ComplexMetric = ComplexMetric1133        if Metric is None:1134            self.Metric = []1135        else:1136            self.Metric = Metric1137    def factory(*args_, **kwargs_):1138        if MetricsType.subclass:1139            return MetricsType.subclass(*args_, **kwargs_)1140        else:1141            return MetricsType(*args_, **kwargs_)1142    factory = staticmethod(factory)1143    def get_ComplexMetric(self): return self.ComplexMetric1144    def set_ComplexMetric(self, ComplexMetric): self.ComplexMetric = ComplexMetric1145    def add_ComplexMetric(self, value): self.ComplexMetric.append(value)1146    def insert_ComplexMetric(self, index, value): self.ComplexMetric[index] = value1147    def get_Metric(self): return self.Metric1148    def set_Metric(self, Metric): self.Metric = Metric1149    def add_Metric(self, value): self.Metric.append(value)1150    def insert_Metric(self, index, value): self.Metric[index] = value1151    def get__derived(self): return self._derived1152    def set__derived(self, _derived): self._derived = _derived1153    def get__real_archetype(self): return self._real_archetype1154    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1155    def get__archetype(self): return self._archetype1156    def set__archetype(self, _archetype): self._archetype = _archetype1157    def get__subtype(self): return self._subtype1158    def set__subtype(self, _subtype): self._subtype = _subtype1159    def get__instances(self): return self._instances1160    def set__instances(self, _instances): self._instances = _instances1161    def get__desynched_atts(self): return self._desynched_atts1162    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1163    def get__id(self): return self._id1164    def set__id(self, _id): self._id = _id1165    def hasContent_(self):1166        if (1167            self.ComplexMetric or1168            self.Metric1169        ):1170            return True1171        else:1172            return False1173    def export(self, outfile, level, namespace_='', name_='MetricsType', namespacedef_='', pretty_print=True):1174        if pretty_print:1175            eol_ = '\n'1176        else:1177            eol_ = ''1178        if self.original_tagname_ is not None:1179            name_ = self.original_tagname_1180        showIndent(outfile, level, pretty_print)1181        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1182        already_processed = set()1183        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MetricsType')1184        if self.hasContent_():1185            outfile.write('>%s' % (eol_, ))1186            self.exportChildren(outfile, level + 1, namespace_='', name_='MetricsType', pretty_print=pretty_print)1187            showIndent(outfile, level, pretty_print)1188            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1189        else:1190            outfile.write('/>%s' % (eol_, ))1191    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MetricsType'):1192        if self._derived is not None and '_derived' not in already_processed:1193            already_processed.add('_derived')1194            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1195        if self._real_archetype is not None and '_real_archetype' not in already_processed:1196            already_processed.add('_real_archetype')1197            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1198        if self._archetype is not None and '_archetype' not in already_processed:1199            already_processed.add('_archetype')1200            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1201        if self._subtype is not None and '_subtype' not in already_processed:1202            already_processed.add('_subtype')1203            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1204        if self._instances is not None and '_instances' not in already_processed:1205            already_processed.add('_instances')1206            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1207        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1208            already_processed.add('_desynched_atts')1209            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1210        if self._id is not None and '_id' not in already_processed:1211            already_processed.add('_id')1212            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1213    def exportChildren(self, outfile, level, namespace_='', name_='MetricsType', fromsubclass_=False, pretty_print=True):1214        if pretty_print:1215            eol_ = '\n'1216        else:1217            eol_ = ''1218        for ComplexMetric_ in self.ComplexMetric:1219            ComplexMetric_.export(outfile, level, namespace_, name_='ComplexMetric', pretty_print=pretty_print)1220        for Metric_ in self.Metric:1221            Metric_.export(outfile, level, namespace_, name_='Metric', pretty_print=pretty_print)1222    def exportLiteral(self, outfile, level, name_='MetricsType'):1223        level += 11224        already_processed = set()1225        self.exportLiteralAttributes(outfile, level, already_processed, name_)1226        if self.hasContent_():1227            self.exportLiteralChildren(outfile, level, name_)1228    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1229        if self._derived is not None and '_derived' not in already_processed:1230            already_processed.add('_derived')1231            showIndent(outfile, level)1232            outfile.write('_derived="%s",\n' % (self._derived,))1233        if self._real_archetype is not None and '_real_archetype' not in already_processed:1234            already_processed.add('_real_archetype')1235            showIndent(outfile, level)1236            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1237        if self._archetype is not None and '_archetype' not in already_processed:1238            already_processed.add('_archetype')1239            showIndent(outfile, level)1240            outfile.write('_archetype="%s",\n' % (self._archetype,))1241        if self._subtype is not None and '_subtype' not in already_processed:1242            already_processed.add('_subtype')1243            showIndent(outfile, level)1244            outfile.write('_subtype=%s,\n' % (self._subtype,))1245        if self._instances is not None and '_instances' not in already_processed:1246            already_processed.add('_instances')1247            showIndent(outfile, level)1248            outfile.write('_instances="%s",\n' % (self._instances,))1249        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1250            already_processed.add('_desynched_atts')1251            showIndent(outfile, level)1252            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1253        if self._id is not None and '_id' not in already_processed:1254            already_processed.add('_id')1255            showIndent(outfile, level)1256            outfile.write('_id="%s",\n' % (self._id,))1257    def exportLiteralChildren(self, outfile, level, name_):1258        showIndent(outfile, level)1259        outfile.write('ComplexMetric=[\n')1260        level += 11261        for ComplexMetric_ in self.ComplexMetric:1262            showIndent(outfile, level)1263            outfile.write('model_.ComplexMetricType(\n')1264            ComplexMetric_.exportLiteral(outfile, level, name_='ComplexMetricType')1265            showIndent(outfile, level)1266            outfile.write('),\n')1267        level -= 11268        showIndent(outfile, level)1269        outfile.write('],\n')1270        showIndent(outfile, level)1271        outfile.write('Metric=[\n')1272        level += 11273        for Metric_ in self.Metric:1274            showIndent(outfile, level)1275            outfile.write('model_.MetricType(\n')1276            Metric_.exportLiteral(outfile, level, name_='MetricType')1277            showIndent(outfile, level)1278            outfile.write('),\n')1279        level -= 11280        showIndent(outfile, level)1281        outfile.write('],\n')1282    def build(self, node):1283        already_processed = set()1284        self.buildAttributes(node, node.attrib, already_processed)1285        for child in node:1286            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1287            self.buildChildren(child, node, nodeName_)1288        return self1289    def buildAttributes(self, node, attrs, already_processed):1290        value = find_attr_value_('_derived', node)1291        if value is not None and '_derived' not in already_processed:1292            already_processed.add('_derived')1293            self._derived = value1294        value = find_attr_value_('_real_archetype', node)1295        if value is not None and '_real_archetype' not in already_processed:1296            already_processed.add('_real_archetype')1297            if value in ('true', '1'):1298                self._real_archetype = True1299            elif value in ('false', '0'):1300                self._real_archetype = False1301            else:1302                raise_parse_error(node, 'Bad boolean attribute')1303        value = find_attr_value_('_archetype', node)1304        if value is not None and '_archetype' not in already_processed:1305            already_processed.add('_archetype')1306            self._archetype = value1307        value = find_attr_value_('_subtype', node)1308        if value is not None and '_subtype' not in already_processed:1309            already_processed.add('_subtype')1310            if value in ('true', '1'):1311                self._subtype = True1312            elif value in ('false', '0'):1313                self._subtype = False1314            else:1315                raise_parse_error(node, 'Bad boolean attribute')1316        value = find_attr_value_('_instances', node)1317        if value is not None and '_instances' not in already_processed:1318            already_processed.add('_instances')1319            self._instances = value1320        value = find_attr_value_('_desynched_atts', node)1321        if value is not None and '_desynched_atts' not in already_processed:1322            already_processed.add('_desynched_atts')1323            self._desynched_atts = value1324        value = find_attr_value_('_id', node)1325        if value is not None and '_id' not in already_processed:1326            already_processed.add('_id')1327            self._id = value1328    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1329        if nodeName_ == 'ComplexMetric':1330            obj_ = ComplexMetricType.factory()1331            obj_.build(child_)1332            self.ComplexMetric.append(obj_)1333            obj_.original_tagname_ = 'ComplexMetric'1334        elif nodeName_ == 'Metric':1335            obj_ = MetricType.factory()1336            obj_.build(child_)1337            self.Metric.append(obj_)1338            obj_.original_tagname_ = 'Metric'1339# end class MetricsType134013411342class MaterialType(GeneratedsSuper):1343    subclass = None1344    superclass = None1345    def __init__(self, Bearing=None, _derived=None, _real_archetype=None, _desynched_atts=None, _subtype=None, _instances=None, _archetype=None, Units=None, _id=None, Mises=None, Shear=None):1346        self.original_tagname_ = None1347        self.Bearing = _cast(float, Bearing)1348        self._derived = _cast(None, _derived)1349        self._real_archetype = _cast(bool, _real_archetype)1350        self._desynched_atts = _cast(None, _desynched_atts)1351        self._subtype = _cast(bool, _subtype)1352        self._instances = _cast(None, _instances)1353        self._archetype = _cast(None, _archetype)1354        self.Units = _cast(None, Units)1355        self._id = _cast(None, _id)1356        self.Mises = _cast(float, Mises)1357        self.Shear = _cast(float, Shear)1358    def factory(*args_, **kwargs_):1359        if MaterialType.subclass:1360            return MaterialType.subclass(*args_, **kwargs_)1361        else:1362            return MaterialType(*args_, **kwargs_)1363    factory = staticmethod(factory)1364    def get_Bearing(self): return self.Bearing1365    def set_Bearing(self, Bearing): self.Bearing = Bearing1366    def get__derived(self): return self._derived1367    def set__derived(self, _derived): self._derived = _derived1368    def get__real_archetype(self): return self._real_archetype1369    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1370    def get__desynched_atts(self): return self._desynched_atts1371    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1372    def get__subtype(self): return self._subtype1373    def set__subtype(self, _subtype): self._subtype = _subtype1374    def get__instances(self): return self._instances1375    def set__instances(self, _instances): self._instances = _instances1376    def get__archetype(self): return self._archetype1377    def set__archetype(self, _archetype): self._archetype = _archetype1378    def get_Units(self): return self.Units1379    def set_Units(self, Units): self.Units = Units1380    def get__id(self): return self._id1381    def set__id(self, _id): self._id = _id1382    def get_Mises(self): return self.Mises1383    def set_Mises(self, Mises): self.Mises = Mises1384    def get_Shear(self): return self.Shear1385    def set_Shear(self, Shear): self.Shear = Shear1386    def hasContent_(self):1387        if (13881389        ):1390            return True1391        else:1392            return False1393    def export(self, outfile, level, namespace_='', name_='MaterialType', namespacedef_='', pretty_print=True):1394        if pretty_print:1395            eol_ = '\n'1396        else:1397            eol_ = ''1398        if self.original_tagname_ is not None:1399            name_ = self.original_tagname_1400        showIndent(outfile, level, pretty_print)1401        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1402        already_processed = set()1403        self.exportAttributes(outfile, level, already_processed, namespace_, name_='MaterialType')1404        if self.hasContent_():1405            outfile.write('>%s' % (eol_, ))1406            self.exportChildren(outfile, level + 1, namespace_='', name_='MaterialType', pretty_print=pretty_print)1407            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1408        else:1409            outfile.write('/>%s' % (eol_, ))1410    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='MaterialType'):1411        if self.Bearing is not None and 'Bearing' not in already_processed:1412            already_processed.add('Bearing')1413            outfile.write(' Bearing="%s"' % self.gds_format_double(self.Bearing, input_name='Bearing'))1414        if self._derived is not None and '_derived' not in already_processed:1415            already_processed.add('_derived')1416            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1417        if self._real_archetype is not None and '_real_archetype' not in already_processed:1418            already_processed.add('_real_archetype')1419            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1420        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1421            already_processed.add('_desynched_atts')1422            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1423        if self._subtype is not None and '_subtype' not in already_processed:1424            already_processed.add('_subtype')1425            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1426        if self._instances is not None and '_instances' not in already_processed:1427            already_processed.add('_instances')1428            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1429        if self._archetype is not None and '_archetype' not in already_processed:1430            already_processed.add('_archetype')1431            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1432        if self.Units is not None and 'Units' not in already_processed:1433            already_processed.add('Units')1434            outfile.write(' Units=%s' % (self.gds_format_string(quote_attrib(self.Units).encode(ExternalEncoding), input_name='Units'), ))1435        if self._id is not None and '_id' not in already_processed:1436            already_processed.add('_id')1437            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1438        if self.Mises is not None and 'Mises' not in already_processed:1439            already_processed.add('Mises')1440            outfile.write(' Mises="%s"' % self.gds_format_double(self.Mises, input_name='Mises'))1441        if self.Shear is not None and 'Shear' not in already_processed:1442            already_processed.add('Shear')1443            outfile.write(' Shear="%s"' % self.gds_format_double(self.Shear, input_name='Shear'))1444    def exportChildren(self, outfile, level, namespace_='', name_='MaterialType', fromsubclass_=False, pretty_print=True):1445        pass1446    def exportLiteral(self, outfile, level, name_='MaterialType'):1447        level += 11448        already_processed = set()1449        self.exportLiteralAttributes(outfile, level, already_processed, name_)1450        if self.hasContent_():1451            self.exportLiteralChildren(outfile, level, name_)1452    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1453        if self.Bearing is not None and 'Bearing' not in already_processed:1454            already_processed.add('Bearing')1455            showIndent(outfile, level)1456            outfile.write('Bearing=%e,\n' % (self.Bearing,))1457        if self._derived is not None and '_derived' not in already_processed:1458            already_processed.add('_derived')1459            showIndent(outfile, level)1460            outfile.write('_derived="%s",\n' % (self._derived,))1461        if self._real_archetype is not None and '_real_archetype' not in already_processed:1462            already_processed.add('_real_archetype')1463            showIndent(outfile, level)1464            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1465        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1466            already_processed.add('_desynched_atts')1467            showIndent(outfile, level)1468            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1469        if self._subtype is not None and '_subtype' not in already_processed:1470            already_processed.add('_subtype')1471            showIndent(outfile, level)1472            outfile.write('_subtype=%s,\n' % (self._subtype,))1473        if self._instances is not None and '_instances' not in already_processed:1474            already_processed.add('_instances')1475            showIndent(outfile, level)1476            outfile.write('_instances="%s",\n' % (self._instances,))1477        if self._archetype is not None and '_archetype' not in already_processed:1478            already_processed.add('_archetype')1479            showIndent(outfile, level)1480            outfile.write('_archetype="%s",\n' % (self._archetype,))1481        if self.Units is not None and 'Units' not in already_processed:1482            already_processed.add('Units')1483            showIndent(outfile, level)1484            outfile.write('Units="%s",\n' % (self.Units,))1485        if self._id is not None and '_id' not in already_processed:1486            already_processed.add('_id')1487            showIndent(outfile, level)1488            outfile.write('_id="%s",\n' % (self._id,))1489        if self.Mises is not None and 'Mises' not in already_processed:1490            already_processed.add('Mises')1491            showIndent(outfile, level)1492            outfile.write('Mises=%e,\n' % (self.Mises,))1493        if self.Shear is not None and 'Shear' not in already_processed:1494            already_processed.add('Shear')1495            showIndent(outfile, level)1496            outfile.write('Shear=%e,\n' % (self.Shear,))1497    def exportLiteralChildren(self, outfile, level, name_):1498        pass1499    def build(self, node):1500        already_processed = set()1501        self.buildAttributes(node, node.attrib, already_processed)1502        for child in node:1503            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1504            self.buildChildren(child, node, nodeName_)1505        return self1506    def buildAttributes(self, node, attrs, already_processed):1507        value = find_attr_value_('Bearing', node)1508        if value is not None and 'Bearing' not in already_processed:1509            already_processed.add('Bearing')1510            try:1511                self.Bearing = float(value)1512            except ValueError, exp:1513                raise ValueError('Bad float/double attribute (Bearing): %s' % exp)1514        value = find_attr_value_('_derived', node)1515        if value is not None and '_derived' not in already_processed:1516            already_processed.add('_derived')1517            self._derived = value1518        value = find_attr_value_('_real_archetype', node)1519        if value is not None and '_real_archetype' not in already_processed:1520            already_processed.add('_real_archetype')1521            if value in ('true', '1'):1522                self._real_archetype = True1523            elif value in ('false', '0'):1524                self._real_archetype = False1525            else:1526                raise_parse_error(node, 'Bad boolean attribute')1527        value = find_attr_value_('_desynched_atts', node)1528        if value is not None and '_desynched_atts' not in already_processed:1529            already_processed.add('_desynched_atts')1530            self._desynched_atts = value1531        value = find_attr_value_('_subtype', node)1532        if value is not None and '_subtype' not in already_processed:1533            already_processed.add('_subtype')1534            if value in ('true', '1'):1535                self._subtype = True1536            elif value in ('false', '0'):1537                self._subtype = False1538            else:1539                raise_parse_error(node, 'Bad boolean attribute')1540        value = find_attr_value_('_instances', node)1541        if value is not None and '_instances' not in already_processed:1542            already_processed.add('_instances')1543            self._instances = value1544        value = find_attr_value_('_archetype', node)1545        if value is not None and '_archetype' not in already_processed:1546            already_processed.add('_archetype')1547            self._archetype = value1548        value = find_attr_value_('Units', node)1549        if value is not None and 'Units' not in already_processed:1550            already_processed.add('Units')1551            self.Units = value1552        value = find_attr_value_('_id', node)1553        if value is not None and '_id' not in already_processed:1554            already_processed.add('_id')1555            self._id = value1556        value = find_attr_value_('Mises', node)1557        if value is not None and 'Mises' not in already_processed:1558            already_processed.add('Mises')1559            try:1560                self.Mises = float(value)1561            except ValueError, exp:1562                raise ValueError('Bad float/double attribute (Mises): %s' % exp)1563        value = find_attr_value_('Shear', node)1564        if value is not None and 'Shear' not in already_processed:1565            already_processed.add('Shear')1566            try:1567                self.Shear = float(value)1568            except ValueError, exp:1569                raise ValueError('Bad float/double attribute (Shear): %s' % exp)1570    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1571        pass1572# end class MaterialType157315741575class ComponentType(GeneratedsSuper):1576    subclass = None1577    superclass = None1578    def __init__(self, _derived=None, _real_archetype=None, _desynched_atts=None, ComponentInstanceID=None, FEAElementID=None, _instances=None, _archetype=None, _subtype=None, _id=None, Material=None, Metrics=None):1579        self.original_tagname_ = None1580        self._derived = _cast(None, _derived)1581        self._real_archetype = _cast(bool, _real_archetype)1582        self._desynched_atts = _cast(None, _desynched_atts)1583        self.ComponentInstanceID = _cast(None, ComponentInstanceID)1584        self.FEAElementID = _cast(None, FEAElementID)1585        self._instances = _cast(None, _instances)1586        self._archetype = _cast(None, _archetype)1587        self._subtype = _cast(bool, _subtype)1588        self._id = _cast(None, _id)1589        self.Material = Material1590        self.Metrics = Metrics1591    def factory(*args_, **kwargs_):1592        if ComponentType.subclass:1593            return ComponentType.subclass(*args_, **kwargs_)1594        else:1595            return ComponentType(*args_, **kwargs_)1596    factory = staticmethod(factory)1597    def get_Material(self): return self.Material1598    def set_Material(self, Material): self.Material = Material1599    def get_Metrics(self): return self.Metrics1600    def set_Metrics(self, Metrics): self.Metrics = Metrics1601    def get__derived(self): return self._derived1602    def set__derived(self, _derived): self._derived = _derived1603    def get__real_archetype(self): return self._real_archetype1604    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1605    def get__desynched_atts(self): return self._desynched_atts1606    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1607    def get_ComponentInstanceID(self): return self.ComponentInstanceID1608    def set_ComponentInstanceID(self, ComponentInstanceID): self.ComponentInstanceID = ComponentInstanceID1609    def get_FEAElementID(self): return self.FEAElementID1610    def set_FEAElementID(self, FEAElementID): self.FEAElementID = FEAElementID1611    def get__instances(self): return self._instances1612    def set__instances(self, _instances): self._instances = _instances1613    def get__archetype(self): return self._archetype1614    def set__archetype(self, _archetype): self._archetype = _archetype1615    def get__subtype(self): return self._subtype1616    def set__subtype(self, _subtype): self._subtype = _subtype1617    def get__id(self): return self._id1618    def set__id(self, _id): self._id = _id1619    def hasContent_(self):1620        if (1621            self.Material is not None or1622            self.Metrics is not None1623        ):1624            return True1625        else:1626            return False1627    def export(self, outfile, level, namespace_='', name_='ComponentType', namespacedef_='', pretty_print=True):1628        if pretty_print:1629            eol_ = '\n'1630        else:1631            eol_ = ''1632        if self.original_tagname_ is not None:1633            name_ = self.original_tagname_1634        showIndent(outfile, level, pretty_print)1635        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1636        already_processed = set()1637        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ComponentType')1638        if self.hasContent_():1639            outfile.write('>%s' % (eol_, ))1640            self.exportChildren(outfile, level + 1, namespace_='', name_='ComponentType', pretty_print=pretty_print)1641            showIndent(outfile, level, pretty_print)1642            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1643        else:1644            outfile.write('/>%s' % (eol_, ))1645    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ComponentType'):1646        if self._derived is not None and '_derived' not in already_processed:1647            already_processed.add('_derived')1648            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1649        if self._real_archetype is not None and '_real_archetype' not in already_processed:1650            already_processed.add('_real_archetype')1651            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1652        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1653            already_processed.add('_desynched_atts')1654            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1655        if self.ComponentInstanceID is not None and 'ComponentInstanceID' not in already_processed:1656            already_processed.add('ComponentInstanceID')1657            outfile.write(' ComponentInstanceID=%s' % (self.gds_format_string(quote_attrib(self.ComponentInstanceID).encode(ExternalEncoding), input_name='ComponentInstanceID'), ))1658        if self.FEAElementID is not None and 'FEAElementID' not in already_processed:1659            already_processed.add('FEAElementID')1660            outfile.write(' FEAElementID=%s' % (self.gds_format_string(quote_attrib(self.FEAElementID).encode(ExternalEncoding), input_name='FEAElementID'), ))1661        if self._instances is not None and '_instances' not in already_processed:1662            already_processed.add('_instances')1663            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1664        if self._archetype is not None and '_archetype' not in already_processed:1665            already_processed.add('_archetype')1666            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1667        if self._subtype is not None and '_subtype' not in already_processed:1668            already_processed.add('_subtype')1669            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1670        if self._id is not None and '_id' not in already_processed:1671            already_processed.add('_id')1672            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1673    def exportChildren(self, outfile, level, namespace_='', name_='ComponentType', fromsubclass_=False, pretty_print=True):1674        if pretty_print:1675            eol_ = '\n'1676        else:1677            eol_ = ''1678        if self.Material is not None:1679            self.Material.export(outfile, level, namespace_, name_='Material', pretty_print=pretty_print)1680        if self.Metrics is not None:1681            self.Metrics.export(outfile, level, namespace_, name_='Metrics', pretty_print=pretty_print)1682    def exportLiteral(self, outfile, level, name_='ComponentType'):1683        level += 11684        already_processed = set()1685        self.exportLiteralAttributes(outfile, level, already_processed, name_)1686        if self.hasContent_():1687            self.exportLiteralChildren(outfile, level, name_)1688    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1689        if self._derived is not None and '_derived' not in already_processed:1690            already_processed.add('_derived')1691            showIndent(outfile, level)1692            outfile.write('_derived="%s",\n' % (self._derived,))1693        if self._real_archetype is not None and '_real_archetype' not in already_processed:1694            already_processed.add('_real_archetype')1695            showIndent(outfile, level)1696            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1697        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1698            already_processed.add('_desynched_atts')1699            showIndent(outfile, level)1700            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1701        if self.ComponentInstanceID is not None and 'ComponentInstanceID' not in already_processed:1702            already_processed.add('ComponentInstanceID')1703            showIndent(outfile, level)1704            outfile.write('ComponentInstanceID="%s",\n' % (self.ComponentInstanceID,))1705        if self.FEAElementID is not None and 'FEAElementID' not in already_processed:1706            already_processed.add('FEAElementID')1707            showIndent(outfile, level)1708            outfile.write('FEAElementID="%s",\n' % (self.FEAElementID,))1709        if self._instances is not None and '_instances' not in already_processed:1710            already_processed.add('_instances')1711            showIndent(outfile, level)1712            outfile.write('_instances="%s",\n' % (self._instances,))1713        if self._archetype is not None and '_archetype' not in already_processed:1714            already_processed.add('_archetype')1715            showIndent(outfile, level)1716            outfile.write('_archetype="%s",\n' % (self._archetype,))1717        if self._subtype is not None and '_subtype' not in already_processed:1718            already_processed.add('_subtype')1719            showIndent(outfile, level)1720            outfile.write('_subtype=%s,\n' % (self._subtype,))1721        if self._id is not None and '_id' not in already_processed:1722            already_processed.add('_id')1723            showIndent(outfile, level)1724            outfile.write('_id="%s",\n' % (self._id,))1725    def exportLiteralChildren(self, outfile, level, name_):1726        if self.Material is not None:1727            showIndent(outfile, level)1728            outfile.write('Material=model_.MaterialType(\n')1729            self.Material.exportLiteral(outfile, level, name_='Material')1730            showIndent(outfile, level)1731            outfile.write('),\n')1732        if self.Metrics is not None:1733            showIndent(outfile, level)1734            outfile.write('Metrics=model_.MetricsType(\n')1735            self.Metrics.exportLiteral(outfile, level, name_='Metrics')1736            showIndent(outfile, level)1737            outfile.write('),\n')1738    def build(self, node):1739        already_processed = set()1740        self.buildAttributes(node, node.attrib, already_processed)1741        for child in node:1742            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1743            self.buildChildren(child, node, nodeName_)1744        return self1745    def buildAttributes(self, node, attrs, already_processed):1746        value = find_attr_value_('_derived', node)1747        if value is not None and '_derived' not in already_processed:1748            already_processed.add('_derived')1749            self._derived = value1750        value = find_attr_value_('_real_archetype', node)1751        if value is not None and '_real_archetype' not in already_processed:1752            already_processed.add('_real_archetype')1753            if value in ('true', '1'):1754                self._real_archetype = True1755            elif value in ('false', '0'):1756                self._real_archetype = False1757            else:1758                raise_parse_error(node, 'Bad boolean attribute')1759        value = find_attr_value_('_desynched_atts', node)1760        if value is not None and '_desynched_atts' not in already_processed:1761            already_processed.add('_desynched_atts')1762            self._desynched_atts = value1763        value = find_attr_value_('ComponentInstanceID', node)1764        if value is not None and 'ComponentInstanceID' not in already_processed:1765            already_processed.add('ComponentInstanceID')1766            self.ComponentInstanceID = value1767        value = find_attr_value_('FEAElementID', node)1768        if value is not None and 'FEAElementID' not in already_processed:1769            already_processed.add('FEAElementID')1770            self.FEAElementID = value1771        value = find_attr_value_('_instances', node)1772        if value is not None and '_instances' not in already_processed:1773            already_processed.add('_instances')1774            self._instances = value1775        value = find_attr_value_('_archetype', node)1776        if value is not None and '_archetype' not in already_processed:1777            already_processed.add('_archetype')1778            self._archetype = value1779        value = find_attr_value_('_subtype', node)1780        if value is not None and '_subtype' not in already_processed:1781            already_processed.add('_subtype')1782            if value in ('true', '1'):1783                self._subtype = True1784            elif value in ('false', '0'):1785                self._subtype = False1786            else:1787                raise_parse_error(node, 'Bad boolean attribute')1788        value = find_attr_value_('_id', node)1789        if value is not None and '_id' not in already_processed:1790            already_processed.add('_id')1791            self._id = value1792    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1793        if nodeName_ == 'Material':1794            obj_ = MaterialType.factory()1795            obj_.build(child_)1796            self.Material = obj_1797            obj_.original_tagname_ = 'Material'1798        elif nodeName_ == 'Metrics':1799            obj_ = MetricsType.factory()1800            obj_.build(child_)1801            self.Metrics = obj_1802            obj_.original_tagname_ = 'Metrics'1803# end class ComponentType180418051806class ComponentsType(GeneratedsSuper):1807    subclass = None1808    superclass = None1809    def __init__(self, _derived=None, _real_archetype=None, _archetype=None, ConfigurationID=None, _subtype=None, _instances=None, _desynched_atts=None, _id=None, _libname=None, Component=None, Components=None):1810        self.original_tagname_ = None1811        self._derived = _cast(None, _derived)1812        self._real_archetype = _cast(bool, _real_archetype)1813        self._archetype = _cast(None, _archetype)1814        self.ConfigurationID = _cast(None, ConfigurationID)1815        self._subtype = _cast(bool, _subtype)1816        self._instances = _cast(None, _instances)1817        self._desynched_atts = _cast(None, _desynched_atts)1818        self._id = _cast(None, _id)1819        self._libname = _cast(None, _libname)1820        if Component is None:1821            self.Component = []1822        else:1823            self.Component = Component1824        if Components is None:1825            self.Components = []1826        else:1827            self.Components = Components1828    def factory(*args_, **kwargs_):1829        if ComponentsType.subclass:1830            return ComponentsType.subclass(*args_, **kwargs_)1831        else:1832            return ComponentsType(*args_, **kwargs_)1833    factory = staticmethod(factory)1834    def get_Component(self): return self.Component1835    def set_Component(self, Component): self.Component = Component1836    def add_Component(self, value): self.Component.append(value)1837    def insert_Component(self, index, value): self.Component[index] = value1838    def get_Components(self): return self.Components1839    def set_Components(self, Components): self.Components = Components1840    def add_Components(self, value): self.Components.append(value)1841    def insert_Components(self, index, value): self.Components[index] = value1842    def get__derived(self): return self._derived1843    def set__derived(self, _derived): self._derived = _derived1844    def get__real_archetype(self): return self._real_archetype1845    def set__real_archetype(self, _real_archetype): self._real_archetype = _real_archetype1846    def get__archetype(self): return self._archetype1847    def set__archetype(self, _archetype): self._archetype = _archetype1848    def get_ConfigurationID(self): return self.ConfigurationID1849    def set_ConfigurationID(self, ConfigurationID): self.ConfigurationID = ConfigurationID1850    def get__subtype(self): return self._subtype1851    def set__subtype(self, _subtype): self._subtype = _subtype1852    def get__instances(self): return self._instances1853    def set__instances(self, _instances): self._instances = _instances1854    def get__desynched_atts(self): return self._desynched_atts1855    def set__desynched_atts(self, _desynched_atts): self._desynched_atts = _desynched_atts1856    def get__id(self): return self._id1857    def set__id(self, _id): self._id = _id1858    def get__libname(self): return self._libname1859    def set__libname(self, _libname): self._libname = _libname1860    def hasContent_(self):1861        if (1862            self.Component or1863            self.Components1864        ):1865            return True1866        else:1867            return False1868    def export(self, outfile, level, namespace_='', name_='ComponentsType', namespacedef_='', pretty_print=True):1869        if pretty_print:1870            eol_ = '\n'1871        else:1872            eol_ = ''1873        if self.original_tagname_ is not None:1874            name_ = self.original_tagname_1875        showIndent(outfile, level, pretty_print)1876        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1877        already_processed = set()1878        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ComponentsType')1879        if self.hasContent_():1880            outfile.write('>%s' % (eol_, ))1881            self.exportChildren(outfile, level + 1, namespace_='', name_='ComponentsType', pretty_print=pretty_print)1882            showIndent(outfile, level, pretty_print)1883            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))1884        else:1885            outfile.write('/>%s' % (eol_, ))1886    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ComponentsType'):1887        if self._derived is not None and '_derived' not in already_processed:1888            already_processed.add('_derived')1889            outfile.write(' _derived=%s' % (self.gds_format_string(quote_attrib(self._derived).encode(ExternalEncoding), input_name='_derived'), ))1890        if self._real_archetype is not None and '_real_archetype' not in already_processed:1891            already_processed.add('_real_archetype')1892            outfile.write(' _real_archetype="%s"' % self.gds_format_boolean(self._real_archetype, input_name='_real_archetype'))1893        if self._archetype is not None and '_archetype' not in already_processed:1894            already_processed.add('_archetype')1895            outfile.write(' _archetype=%s' % (self.gds_format_string(quote_attrib(self._archetype).encode(ExternalEncoding), input_name='_archetype'), ))1896        if self.ConfigurationID is not None and 'ConfigurationID' not in already_processed:1897            already_processed.add('ConfigurationID')1898            outfile.write(' ConfigurationID=%s' % (self.gds_format_string(quote_attrib(self.ConfigurationID).encode(ExternalEncoding), input_name='ConfigurationID'), ))1899        if self._subtype is not None and '_subtype' not in already_processed:1900            already_processed.add('_subtype')1901            outfile.write(' _subtype="%s"' % self.gds_format_boolean(self._subtype, input_name='_subtype'))1902        if self._instances is not None and '_instances' not in already_processed:1903            already_processed.add('_instances')1904            outfile.write(' _instances=%s' % (self.gds_format_string(quote_attrib(self._instances).encode(ExternalEncoding), input_name='_instances'), ))1905        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1906            already_processed.add('_desynched_atts')1907            outfile.write(' _desynched_atts=%s' % (self.gds_format_string(quote_attrib(self._desynched_atts).encode(ExternalEncoding), input_name='_desynched_atts'), ))1908        if self._id is not None and '_id' not in already_processed:1909            already_processed.add('_id')1910            outfile.write(' _id=%s' % (self.gds_format_string(quote_attrib(self._id).encode(ExternalEncoding), input_name='_id'), ))1911        if self._libname is not None and '_libname' not in already_processed:1912            already_processed.add('_libname')1913            outfile.write(' _libname=%s' % (self.gds_format_string(quote_attrib(self._libname).encode(ExternalEncoding), input_name='_libname'), ))1914    def exportChildren(self, outfile, level, namespace_='', name_='ComponentsType', fromsubclass_=False, pretty_print=True):1915        if pretty_print:1916            eol_ = '\n'1917        else:1918            eol_ = ''1919        for Component_ in self.Component:1920            Component_.export(outfile, level, namespace_, name_='Component', pretty_print=pretty_print)1921        for Components_ in self.Components:1922            Components_.export(outfile, level, namespace_, name_='Components', pretty_print=pretty_print)1923    def exportLiteral(self, outfile, level, name_='ComponentsType'):1924        level += 11925        already_processed = set()1926        self.exportLiteralAttributes(outfile, level, already_processed, name_)1927        if self.hasContent_():1928            self.exportLiteralChildren(outfile, level, name_)1929    def exportLiteralAttributes(self, outfile, level, already_processed, name_):1930        if self._derived is not None and '_derived' not in already_processed:1931            already_processed.add('_derived')1932            showIndent(outfile, level)1933            outfile.write('_derived="%s",\n' % (self._derived,))1934        if self._real_archetype is not None and '_real_archetype' not in already_processed:1935            already_processed.add('_real_archetype')1936            showIndent(outfile, level)1937            outfile.write('_real_archetype=%s,\n' % (self._real_archetype,))1938        if self._archetype is not None and '_archetype' not in already_processed:1939            already_processed.add('_archetype')1940            showIndent(outfile, level)1941            outfile.write('_archetype="%s",\n' % (self._archetype,))1942        if self.ConfigurationID is not None and 'ConfigurationID' not in already_processed:1943            already_processed.add('ConfigurationID')1944            showIndent(outfile, level)1945            outfile.write('ConfigurationID="%s",\n' % (self.ConfigurationID,))1946        if self._subtype is not None and '_subtype' not in already_processed:1947            already_processed.add('_subtype')1948            showIndent(outfile, level)1949            outfile.write('_subtype=%s,\n' % (self._subtype,))1950        if self._instances is not None and '_instances' not in already_processed:1951            already_processed.add('_instances')1952            showIndent(outfile, level)1953            outfile.write('_instances="%s",\n' % (self._instances,))1954        if self._desynched_atts is not None and '_desynched_atts' not in already_processed:1955            already_processed.add('_desynched_atts')1956            showIndent(outfile, level)1957            outfile.write('_desynched_atts="%s",\n' % (self._desynched_atts,))1958        if self._id is not None and '_id' not in already_processed:1959            already_processed.add('_id')1960            showIndent(outfile, level)1961            outfile.write('_id="%s",\n' % (self._id,))1962        if self._libname is not None and '_libname' not in already_processed:1963            already_processed.add('_libname')1964            showIndent(outfile, level)1965            outfile.write('_libname="%s",\n' % (self._libname,))1966    def exportLiteralChildren(self, outfile, level, name_):1967        showIndent(outfile, level)1968        outfile.write('Component=[\n')1969        level += 11970        for Component_ in self.Component:1971            showIndent(outfile, level)1972            outfile.write('model_.ComponentType(\n')1973            Component_.exportLiteral(outfile, level, name_='ComponentType')1974            showIndent(outfile, level)1975            outfile.write('),\n')1976        level -= 11977        showIndent(outfile, level)1978        outfile.write('],\n')1979        showIndent(outfile, level)1980        outfile.write('Components=[\n')1981        level += 11982        for Components_ in self.Components:1983            showIndent(outfile, level)1984            outfile.write('model_.ComponentsType(\n')1985            Components_.exportLiteral(outfile, level, name_='ComponentsType')1986            showIndent(outfile, level)1987            outfile.write('),\n')1988        level -= 11989        showIndent(outfile, level)1990        outfile.write('],\n')1991    def build(self, node):1992        already_processed = set()1993        self.buildAttributes(node, node.attrib, already_processed)1994        for child in node:1995            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1996            self.buildChildren(child, node, nodeName_)1997        return self1998    def buildAttributes(self, node, attrs, already_processed):1999        value = find_attr_value_('_derived', node)2000        if value is not None and '_derived' not in already_processed:2001            already_processed.add('_derived')2002            self._derived = value2003        value = find_attr_value_('_real_archetype', node)2004        if value is not None and '_real_archetype' not in already_processed:2005            already_processed.add('_real_archetype')2006            if value in ('true', '1'):2007                self._real_archetype = True2008            elif value in ('false', '0'):2009                self._real_archetype = False2010            else:2011                raise_parse_error(node, 'Bad boolean attribute')2012        value = find_attr_value_('_archetype', node)2013        if value is not None and '_archetype' not in already_processed:2014            already_processed.add('_archetype')2015            self._archetype = value2016        value = find_attr_value_('ConfigurationID', node)2017        if value is not None and 'ConfigurationID' not in already_processed:2018            already_processed.add('ConfigurationID')2019            self.ConfigurationID = value2020        value = find_attr_value_('_subtype', node)2021        if value is not None and '_subtype' not in already_processed:2022            already_processed.add('_subtype')2023            if value in ('true', '1'):2024                self._subtype = True2025            elif value in ('false', '0'):2026                self._subtype = False2027            else:2028                raise_parse_error(node, 'Bad boolean attribute')2029        value = find_attr_value_('_instances', node)2030        if value is not None and '_instances' not in already_processed:2031            already_processed.add('_instances')2032            self._instances = value2033        value = find_attr_value_('_desynched_atts', node)2034        if value is not None and '_desynched_atts' not in already_processed:2035            already_processed.add('_desynched_atts')2036            self._desynched_atts = value2037        value = find_attr_value_('_id', node)2038        if value is not None and '_id' not in already_processed:2039            already_processed.add('_id')2040            self._id = value2041        value = find_attr_value_('_libname', node)2042        if value is not None and '_libname' not in already_processed:2043            already_processed.add('_libname')2044            self._libname = value2045    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2046        if nodeName_ == 'Component':2047            obj_ = ComponentType.factory()2048            obj_.build(child_)2049            self.Component.append(obj_)2050            obj_.original_tagname_ = 'Component'2051        elif nodeName_ == 'Components':2052            obj_ = ComponentsType.factory()2053            obj_.build(child_)2054            self.Components.append(obj_)2055            obj_.original_tagname_ = 'Components'
...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
