Best Python code snippet using autotest_python
gWDSMatrix.py
Source:gWDSMatrix.py
...295 decimal_.Decimal(value)296 except (TypeError, ValueError):297 raise_parse_error(node, 'Requires sequence of decimal values')298 return values299 def gds_format_double(self, input_data, input_name=''):300 return '%s' % input_data301 def gds_parse_double(self, input_data, node=None, input_name=''):302 try:303 fval_ = float(input_data)304 except (TypeError, ValueError) as exp:305 raise_parse_error(node, 'Requires double or float value: %s' % exp)306 return fval_307 def gds_validate_double(self, input_data, node=None, input_name=''):308 try:309 value = float(input_data)310 except (TypeError, ValueError):311 raise_parse_error(node, 'Requires double or float value')312 return value313 def gds_format_double_list(self, input_data, input_name=''):314 if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):315 input_data = [str(s) for s in input_data]316 return '%s' % ' '.join(input_data)317 def gds_validate_double_list(318 self, input_data, node=None, input_name=''):319 values = input_data.split()320 for value in values:321 try:322 float(value)323 except (TypeError, ValueError):324 raise_parse_error(325 node, 'Requires sequence of double or float values')326 return values327 def gds_format_boolean(self, input_data, input_name=''):328 return ('%s' % input_data).lower()329 def gds_parse_boolean(self, input_data, node=None, input_name=''):330 input_data = input_data.strip()331 if input_data in ('true', '1'):332 bval = True333 elif input_data in ('false', '0'):334 bval = False335 else:336 raise_parse_error(node, 'Requires boolean value')337 return bval338 def gds_validate_boolean(self, input_data, node=None, input_name=''):339 if input_data not in (True, 1, False, 0, ):340 raise_parse_error(341 node,342 'Requires boolean value '343 '(one of True, 1, False, 0)')344 return input_data345 def gds_format_boolean_list(self, input_data, input_name=''):346 if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):347 input_data = [str(s) for s in input_data]348 return '%s' % ' '.join(input_data)349 def gds_validate_boolean_list(350 self, input_data, node=None, input_name=''):351 values = input_data.split()352 for value in values:353 value = self.gds_parse_boolean(value, node, input_name)354 if value not in (True, 1, False, 0, ):355 raise_parse_error(356 node,357 'Requires sequence of boolean values '358 '(one of True, 1, False, 0)')359 return values360 def gds_validate_datetime(self, input_data, node=None, input_name=''):361 return input_data362 def gds_format_datetime(self, input_data, input_name=''):363 if input_data.microsecond == 0:364 _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (365 input_data.year,366 input_data.month,367 input_data.day,368 input_data.hour,369 input_data.minute,370 input_data.second,371 )372 else:373 _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (374 input_data.year,375 input_data.month,376 input_data.day,377 input_data.hour,378 input_data.minute,379 input_data.second,380 ('%f' % (float(input_data.microsecond) / 1000000))[2:],381 )382 if input_data.tzinfo is not None:383 tzoff = input_data.tzinfo.utcoffset(input_data)384 if tzoff is not None:385 total_seconds = tzoff.seconds + (86400 * tzoff.days)386 if total_seconds == 0:387 _svalue += 'Z'388 else:389 if total_seconds < 0:390 _svalue += '-'391 total_seconds *= -1392 else:393 _svalue += '+'394 hours = total_seconds // 3600395 minutes = (total_seconds - (hours * 3600)) // 60396 _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)397 return _svalue398 @classmethod399 def gds_parse_datetime(cls, input_data):400 tz = None401 if input_data[-1] == 'Z':402 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')403 input_data = input_data[:-1]404 else:405 results = GeneratedsSuper.tzoff_pattern.search(input_data)406 if results is not None:407 tzoff_parts = results.group(2).split(':')408 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])409 if results.group(1) == '-':410 tzoff *= -1411 tz = GeneratedsSuper._FixedOffsetTZ(412 tzoff, results.group(0))413 input_data = input_data[:-6]414 time_parts = input_data.split('.')415 if len(time_parts) > 1:416 micro_seconds = int(float('0.' + time_parts[1]) * 1000000)417 input_data = '%s.%s' % (418 time_parts[0], "{}".format(micro_seconds).rjust(6, "0"), )419 dt = datetime_.datetime.strptime(420 input_data, '%Y-%m-%dT%H:%M:%S.%f')421 else:422 dt = datetime_.datetime.strptime(423 input_data, '%Y-%m-%dT%H:%M:%S')424 dt = dt.replace(tzinfo=tz)425 return dt426 def gds_validate_date(self, input_data, node=None, input_name=''):427 return input_data428 def gds_format_date(self, input_data, input_name=''):429 _svalue = '%04d-%02d-%02d' % (430 input_data.year,431 input_data.month,432 input_data.day,433 )434 try:435 if input_data.tzinfo is not None:436 tzoff = input_data.tzinfo.utcoffset(input_data)437 if tzoff is not None:438 total_seconds = tzoff.seconds + (86400 * tzoff.days)439 if total_seconds == 0:440 _svalue += 'Z'441 else:442 if total_seconds < 0:443 _svalue += '-'444 total_seconds *= -1445 else:446 _svalue += '+'447 hours = total_seconds // 3600448 minutes = (total_seconds - (hours * 3600)) // 60449 _svalue += '{0:02d}:{1:02d}'.format(450 hours, minutes)451 except AttributeError:452 pass453 return _svalue454 @classmethod455 def gds_parse_date(cls, input_data):456 tz = None457 if input_data[-1] == 'Z':458 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')459 input_data = input_data[:-1]460 else:461 results = GeneratedsSuper.tzoff_pattern.search(input_data)462 if results is not None:463 tzoff_parts = results.group(2).split(':')464 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])465 if results.group(1) == '-':466 tzoff *= -1467 tz = GeneratedsSuper._FixedOffsetTZ(468 tzoff, results.group(0))469 input_data = input_data[:-6]470 dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')471 dt = dt.replace(tzinfo=tz)472 return dt.date()473 def gds_validate_time(self, input_data, node=None, input_name=''):474 return input_data475 def gds_format_time(self, input_data, input_name=''):476 if input_data.microsecond == 0:477 _svalue = '%02d:%02d:%02d' % (478 input_data.hour,479 input_data.minute,480 input_data.second,481 )482 else:483 _svalue = '%02d:%02d:%02d.%s' % (484 input_data.hour,485 input_data.minute,486 input_data.second,487 ('%f' % (float(input_data.microsecond) / 1000000))[2:],488 )489 if input_data.tzinfo is not None:490 tzoff = input_data.tzinfo.utcoffset(input_data)491 if tzoff is not None:492 total_seconds = tzoff.seconds + (86400 * tzoff.days)493 if total_seconds == 0:494 _svalue += 'Z'495 else:496 if total_seconds < 0:497 _svalue += '-'498 total_seconds *= -1499 else:500 _svalue += '+'501 hours = total_seconds // 3600502 minutes = (total_seconds - (hours * 3600)) // 60503 _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)504 return _svalue505 def gds_validate_simple_patterns(self, patterns, target):506 # pat is a list of lists of strings/patterns.507 # The target value must match at least one of the patterns508 # in order for the test to succeed.509 found1 = True510 target = str(target)511 for patterns1 in patterns:512 found2 = False513 for patterns2 in patterns1:514 mo = re_.search(patterns2, target)515 if mo is not None and len(mo.group(0)) == len(target):516 found2 = True517 break518 if not found2:519 found1 = False520 break521 return found1522 @classmethod523 def gds_parse_time(cls, input_data):524 tz = None525 if input_data[-1] == 'Z':526 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')527 input_data = input_data[:-1]528 else:529 results = GeneratedsSuper.tzoff_pattern.search(input_data)530 if results is not None:531 tzoff_parts = results.group(2).split(':')532 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])533 if results.group(1) == '-':534 tzoff *= -1535 tz = GeneratedsSuper._FixedOffsetTZ(536 tzoff, results.group(0))537 input_data = input_data[:-6]538 if len(input_data.split('.')) > 1:539 dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')540 else:541 dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')542 dt = dt.replace(tzinfo=tz)543 return dt.time()544 def gds_check_cardinality_(545 self, value, input_name,546 min_occurs=0, max_occurs=1, required=None):547 if value is None:548 length = 0549 elif isinstance(value, list):550 length = len(value)551 else:552 length = 1553 if required is not None :554 if required and length < 1:555 self.gds_collector_.add_message(556 "Required value {}{} is missing".format(557 input_name, self.gds_get_node_lineno_()))558 if length < min_occurs:559 self.gds_collector_.add_message(560 "Number of values for {}{} is below "561 "the minimum allowed, "562 "expected at least {}, found {}".format(563 input_name, self.gds_get_node_lineno_(),564 min_occurs, length))565 elif length > max_occurs:566 self.gds_collector_.add_message(567 "Number of values for {}{} is above "568 "the maximum allowed, "569 "expected at most {}, found {}".format(570 input_name, self.gds_get_node_lineno_(),571 max_occurs, length))572 def gds_validate_builtin_ST_(573 self, validator, value, input_name,574 min_occurs=None, max_occurs=None, required=None):575 if value is not None:576 try:577 validator(value, input_name=input_name)578 except GDSParseError as parse_error:579 self.gds_collector_.add_message(str(parse_error))580 def gds_validate_defined_ST_(581 self, validator, value, input_name,582 min_occurs=None, max_occurs=None, required=None):583 if value is not None:584 try:585 validator(value)586 except GDSParseError as parse_error:587 self.gds_collector_.add_message(str(parse_error))588 def gds_str_lower(self, instring):589 return instring.lower()590 def get_path_(self, node):591 path_list = []592 self.get_path_list_(node, path_list)593 path_list.reverse()594 path = '/'.join(path_list)595 return path596 Tag_strip_pattern_ = re_.compile(r'\{.*\}')597 def get_path_list_(self, node, path_list):598 if node is None:599 return600 tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)601 if tag:602 path_list.append(tag)603 self.get_path_list_(node.getparent(), path_list)604 def get_class_obj_(self, node, default_class=None):605 class_obj1 = default_class606 if 'xsi' in node.nsmap:607 classname = node.get('{%s}type' % node.nsmap['xsi'])608 if classname is not None:609 names = classname.split(':')610 if len(names) == 2:611 classname = names[1]612 class_obj2 = globals().get(classname)613 if class_obj2 is not None:614 class_obj1 = class_obj2615 return class_obj1616 def gds_build_any(self, node, type_name=None):617 # provide default value in case option --disable-xml is used.618 content = ""619 content = etree_.tostring(node, encoding="unicode")620 return content621 @classmethod622 def gds_reverse_node_mapping(cls, mapping):623 return dict(((v, k) for k, v in mapping.items()))624 @staticmethod625 def gds_encode(instring):626 if sys.version_info.major == 2:627 if ExternalEncoding:628 encoding = ExternalEncoding629 else:630 encoding = 'utf-8'631 return instring.encode(encoding)632 else:633 return instring634 @staticmethod635 def convert_unicode(instring):636 if isinstance(instring, str):637 result = quote_xml(instring)638 elif sys.version_info.major == 2 and isinstance(instring, unicode):639 result = quote_xml(instring).encode('utf8')640 else:641 result = GeneratedsSuper.gds_encode(str(instring))642 return result643 def __eq__(self, other):644 def excl_select_objs_(obj):645 return (obj[0] != 'parent_object_' and646 obj[0] != 'gds_collector_')647 if type(self) != type(other):648 return False649 return all(x == y for x, y in zip_longest(650 filter(excl_select_objs_, self.__dict__.items()),651 filter(excl_select_objs_, other.__dict__.items())))652 def __ne__(self, other):653 return not self.__eq__(other)654 # Django ETL transform hooks.655 def gds_djo_etl_transform(self):656 pass657 def gds_djo_etl_transform_db_obj(self, dbobj):658 pass659 # SQLAlchemy ETL transform hooks.660 def gds_sqa_etl_transform(self):661 return 0, None662 def gds_sqa_etl_transform_db_obj(self, dbobj):663 pass664 def gds_get_node_lineno_(self):665 if (hasattr(self, "gds_elementtree_node_") and666 self.gds_elementtree_node_ is not None):667 return ' near line {}'.format(668 self.gds_elementtree_node_.sourceline)669 else:670 return ""671 672 673 def getSubclassFromModule_(module, class_):674 '''Get the subclass of a class from a specific module.'''675 name = class_.__name__ + 'Sub'676 if hasattr(module, name):677 return getattr(module, name)678 else:679 return None680#681# If you have installed IPython you can uncomment and use the following.682# IPython is available from http://ipython.scipy.org/.683#684## from IPython.Shell import IPShellEmbed685## args = ''686## ipshell = IPShellEmbed(args,687## banner = 'Dropping into IPython',688## exit_msg = 'Leaving Interpreter, back to program.')689# Then use the following line where and when you want to drop into the690# IPython shell:691# ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')692#693# Globals694#695ExternalEncoding = ''696# Set this to false in order to deactivate during export, the use of697# name space prefixes captured from the input document.698UseCapturedNS_ = True699CapturedNsmap_ = {}700Tag_pattern_ = re_.compile(r'({.*})?(.*)')701String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")702Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')703CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)704# Change this to redirect the generated superclass module to use a705# specific subclass module.706CurrentSubclassModule_ = None707#708# Support/utility functions.709#710def showIndent(outfile, level, pretty_print=True):711 if pretty_print:712 for idx in range(level):713 outfile.write(' ')714def quote_xml(inStr):715 "Escape markup chars, but do not modify CDATA sections."716 if not inStr:717 return ''718 s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)719 s2 = ''720 pos = 0721 matchobjects = CDATA_pattern_.finditer(s1)722 for mo in matchobjects:723 s3 = s1[pos:mo.start()]724 s2 += quote_xml_aux(s3)725 s2 += s1[mo.start():mo.end()]726 pos = mo.end()727 s3 = s1[pos:]728 s2 += quote_xml_aux(s3)729 return s2730def quote_xml_aux(inStr):731 s1 = inStr.replace('&', '&')732 s1 = s1.replace('<', '<')733 s1 = s1.replace('>', '>')734 return s1735def quote_attrib(inStr):736 s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)737 s1 = s1.replace('&', '&')738 s1 = s1.replace('<', '<')739 s1 = s1.replace('>', '>')740 s1 = s1.replace('\n', ' ')741 if '"' in s1:742 if "'" in s1:743 s1 = '"%s"' % s1.replace('"', """)744 else:745 s1 = "'%s'" % s1746 else:747 s1 = '"%s"' % s1748 return s1749def quote_python(inStr):750 s1 = inStr751 if s1.find("'") == -1:752 if s1.find('\n') == -1:753 return "'%s'" % s1754 else:755 return "'''%s'''" % s1756 else:757 if s1.find('"') != -1:758 s1 = s1.replace('"', '\\"')759 if s1.find('\n') == -1:760 return '"%s"' % s1761 else:762 return '"""%s"""' % s1763def get_all_text_(node):764 if node.text is not None:765 text = node.text766 else:767 text = ''768 for child in node:769 if child.tail is not None:770 text += child.tail771 return text772def find_attr_value_(attr_name, node):773 attrs = node.attrib774 attr_parts = attr_name.split(':')775 value = None776 if len(attr_parts) == 1:777 value = attrs.get(attr_name)778 elif len(attr_parts) == 2:779 prefix, name = attr_parts780 if prefix == 'xml':781 namespace = 'http://www.w3.org/XML/1998/namespace'782 else:783 namespace = node.nsmap.get(prefix)784 if namespace is not None:785 value = attrs.get('{%s}%s' % (namespace, name, ))786 return value787def encode_str_2_3(instr):788 return instr789class GDSParseError(Exception):790 pass791def raise_parse_error(node, msg):792 if node is not None:793 msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )794 raise GDSParseError(msg)795class MixedContainer:796 # Constants for category:797 CategoryNone = 0798 CategoryText = 1799 CategorySimple = 2800 CategoryComplex = 3801 # Constants for content_type:802 TypeNone = 0803 TypeText = 1804 TypeString = 2805 TypeInteger = 3806 TypeFloat = 4807 TypeDecimal = 5808 TypeDouble = 6809 TypeBoolean = 7810 TypeBase64 = 8811 def __init__(self, category, content_type, name, value):812 self.category = category813 self.content_type = content_type814 self.name = name815 self.value = value816 def getCategory(self):817 return self.category818 def getContenttype(self, content_type):819 return self.content_type820 def getValue(self):821 return self.value822 def getName(self):823 return self.name824 def export(self, outfile, level, name, namespace,825 pretty_print=True):826 if self.category == MixedContainer.CategoryText:827 # Prevent exporting empty content as empty lines.828 if self.value.strip():829 outfile.write(self.value)830 elif self.category == MixedContainer.CategorySimple:831 self.exportSimple(outfile, level, name)832 else: # category == MixedContainer.CategoryComplex833 self.value.export(834 outfile, level, namespace, name_=name,835 pretty_print=pretty_print)836 def exportSimple(self, outfile, level, name):837 if self.content_type == MixedContainer.TypeString:838 outfile.write('<%s>%s</%s>' % (839 self.name, self.value, self.name))840 elif self.content_type == MixedContainer.TypeInteger or \841 self.content_type == MixedContainer.TypeBoolean:842 outfile.write('<%s>%d</%s>' % (843 self.name, self.value, self.name))844 elif self.content_type == MixedContainer.TypeFloat or \845 self.content_type == MixedContainer.TypeDecimal:846 outfile.write('<%s>%f</%s>' % (847 self.name, self.value, self.name))848 elif self.content_type == MixedContainer.TypeDouble:849 outfile.write('<%s>%g</%s>' % (850 self.name, self.value, self.name))851 elif self.content_type == MixedContainer.TypeBase64:852 outfile.write('<%s>%s</%s>' % (853 self.name,854 base64.b64encode(self.value),855 self.name))856 def to_etree(self, element, mapping_=None, reverse_mapping_=None, nsmap_=None):857 if self.category == MixedContainer.CategoryText:858 # Prevent exporting empty content as empty lines.859 if self.value.strip():860 if len(element) > 0:861 if element[-1].tail is None:862 element[-1].tail = self.value863 else:864 element[-1].tail += self.value865 else:866 if element.text is None:867 element.text = self.value868 else:869 element.text += self.value870 elif self.category == MixedContainer.CategorySimple:871 subelement = etree_.SubElement(872 element, '%s' % self.name)873 subelement.text = self.to_etree_simple()874 else: # category == MixedContainer.CategoryComplex875 self.value.to_etree(element)876 def to_etree_simple(self, mapping_=None, reverse_mapping_=None, nsmap_=None):877 if self.content_type == MixedContainer.TypeString:878 text = self.value879 elif (self.content_type == MixedContainer.TypeInteger or880 self.content_type == MixedContainer.TypeBoolean):881 text = '%d' % self.value882 elif (self.content_type == MixedContainer.TypeFloat or883 self.content_type == MixedContainer.TypeDecimal):884 text = '%f' % self.value885 elif self.content_type == MixedContainer.TypeDouble:886 text = '%g' % self.value887 elif self.content_type == MixedContainer.TypeBase64:888 text = '%s' % base64.b64encode(self.value)889 return text890 def exportLiteral(self, outfile, level, name):891 if self.category == MixedContainer.CategoryText:892 showIndent(outfile, level)893 outfile.write(894 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (895 self.category, self.content_type,896 self.name, self.value))897 elif self.category == MixedContainer.CategorySimple:898 showIndent(outfile, level)899 outfile.write(900 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (901 self.category, self.content_type,902 self.name, self.value))903 else: # category == MixedContainer.CategoryComplex904 showIndent(outfile, level)905 outfile.write(906 'model_.MixedContainer(%d, %d, "%s",\n' % (907 self.category, self.content_type, self.name,))908 self.value.exportLiteral(outfile, level + 1)909 showIndent(outfile, level)910 outfile.write(')\n')911class MemberSpec_(object):912 def __init__(self, name='', data_type='', container=0,913 optional=0, child_attrs=None, choice=None):914 self.name = name915 self.data_type = data_type916 self.container = container917 self.child_attrs = child_attrs918 self.choice = choice919 self.optional = optional920 def set_name(self, name): self.name = name921 def get_name(self): return self.name922 def set_data_type(self, data_type): self.data_type = data_type923 def get_data_type_chain(self): return self.data_type924 def get_data_type(self):925 if isinstance(self.data_type, list):926 if len(self.data_type) > 0:927 return self.data_type[-1]928 else:929 return 'xs:string'930 else:931 return self.data_type932 def set_container(self, container): self.container = container933 def get_container(self): return self.container934 def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs935 def get_child_attrs(self): return self.child_attrs936 def set_choice(self, choice): self.choice = choice937 def get_choice(self): return self.choice938 def set_optional(self, optional): self.optional = optional939 def get_optional(self): return self.optional940def _cast(typ, value):941 if typ is None or value is None:942 return value943 return typ(value)944#945# Data representation classes.946#947class WDSMatrix(GeneratedsSuper):948 __hash__ = GeneratedsSuper.__hash__949 subclass = None950 superclass = None951 def __init__(self, Name=None, NumberOfStates=None, NumberOfAdditionalAxes=None, ProvidesNonZeroCoords=None, AdditionalAxesUpperLimits=None, AdditionalAxesLowerLimits=None, StateLabels=None, NonZeroElements=None, MData=None, Betas=None, FunctionalInputs=None, RedundantFunctionalInputs=None, gds_collector_=None, **kwargs_):952 self.gds_collector_ = gds_collector_953 self.gds_elementtree_node_ = None954 self.original_tagname_ = None955 self.parent_object_ = kwargs_.get('parent_object_')956 self.ns_prefix_ = None957 self.Name = _cast(None, Name)958 self.Name_nsprefix_ = None959 self.NumberOfStates = NumberOfStates960 self.NumberOfStates_nsprefix_ = None961 self.NumberOfAdditionalAxes = NumberOfAdditionalAxes962 self.NumberOfAdditionalAxes_nsprefix_ = None963 self.ProvidesNonZeroCoords = ProvidesNonZeroCoords964 self.ProvidesNonZeroCoords_nsprefix_ = None965 self.AdditionalAxesUpperLimits = AdditionalAxesUpperLimits966 self.AdditionalAxesUpperLimits_nsprefix_ = None967 self.AdditionalAxesLowerLimits = AdditionalAxesLowerLimits968 self.AdditionalAxesLowerLimits_nsprefix_ = None969 self.StateLabels = StateLabels970 self.StateLabels_nsprefix_ = None971 self.NonZeroElements = NonZeroElements972 self.NonZeroElements_nsprefix_ = None973 if MData is None:974 self.MData = []975 else:976 self.MData = MData977 self.MData_nsprefix_ = None978 self.Betas = Betas979 self.Betas_nsprefix_ = None980 self.FunctionalInputs = FunctionalInputs981 self.FunctionalInputs_nsprefix_ = None982 self.RedundantFunctionalInputs = RedundantFunctionalInputs983 self.RedundantFunctionalInputs_nsprefix_ = None984 def factory(*args_, **kwargs_):985 if CurrentSubclassModule_ is not None:986 subclass = getSubclassFromModule_(987 CurrentSubclassModule_, WDSMatrix)988 if subclass is not None:989 return subclass(*args_, **kwargs_)990 if WDSMatrix.subclass:991 return WDSMatrix.subclass(*args_, **kwargs_)992 else:993 return WDSMatrix(*args_, **kwargs_)994 factory = staticmethod(factory)995 def get_ns_prefix_(self):996 return self.ns_prefix_997 def set_ns_prefix_(self, ns_prefix):998 self.ns_prefix_ = ns_prefix999 def get_NumberOfStates(self):1000 return self.NumberOfStates1001 def set_NumberOfStates(self, NumberOfStates):1002 self.NumberOfStates = NumberOfStates1003 def get_NumberOfAdditionalAxes(self):1004 return self.NumberOfAdditionalAxes1005 def set_NumberOfAdditionalAxes(self, NumberOfAdditionalAxes):1006 self.NumberOfAdditionalAxes = NumberOfAdditionalAxes1007 def get_ProvidesNonZeroCoords(self):1008 return self.ProvidesNonZeroCoords1009 def set_ProvidesNonZeroCoords(self, ProvidesNonZeroCoords):1010 self.ProvidesNonZeroCoords = ProvidesNonZeroCoords1011 def get_AdditionalAxesUpperLimits(self):1012 return self.AdditionalAxesUpperLimits1013 def set_AdditionalAxesUpperLimits(self, AdditionalAxesUpperLimits):1014 self.AdditionalAxesUpperLimits = AdditionalAxesUpperLimits1015 def get_AdditionalAxesLowerLimits(self):1016 return self.AdditionalAxesLowerLimits1017 def set_AdditionalAxesLowerLimits(self, AdditionalAxesLowerLimits):1018 self.AdditionalAxesLowerLimits = AdditionalAxesLowerLimits1019 def get_StateLabels(self):1020 return self.StateLabels1021 def set_StateLabels(self, StateLabels):1022 self.StateLabels = StateLabels1023 def get_NonZeroElements(self):1024 return self.NonZeroElements1025 def set_NonZeroElements(self, NonZeroElements):1026 self.NonZeroElements = NonZeroElements1027 def get_MData(self):1028 return self.MData1029 def set_MData(self, MData):1030 self.MData = MData1031 def add_MData(self, value):1032 self.MData.append(value)1033 def insert_MData_at(self, index, value):1034 self.MData.insert(index, value)1035 def replace_MData_at(self, index, value):1036 self.MData[index] = value1037 def get_Betas(self):1038 return self.Betas1039 def set_Betas(self, Betas):1040 self.Betas = Betas1041 def get_FunctionalInputs(self):1042 return self.FunctionalInputs1043 def set_FunctionalInputs(self, FunctionalInputs):1044 self.FunctionalInputs = FunctionalInputs1045 def get_RedundantFunctionalInputs(self):1046 return self.RedundantFunctionalInputs1047 def set_RedundantFunctionalInputs(self, RedundantFunctionalInputs):1048 self.RedundantFunctionalInputs = RedundantFunctionalInputs1049 def get_Name(self):1050 return self.Name1051 def set_Name(self, Name):1052 self.Name = Name1053 def _hasContent(self):1054 if (1055 self.NumberOfStates is not None or1056 self.NumberOfAdditionalAxes is not None or1057 self.ProvidesNonZeroCoords is not None or1058 self.AdditionalAxesUpperLimits is not None or1059 self.AdditionalAxesLowerLimits is not None or1060 self.StateLabels is not None or1061 self.NonZeroElements is not None or1062 self.MData or1063 self.Betas is not None or1064 self.FunctionalInputs is not None or1065 self.RedundantFunctionalInputs is not None1066 ):1067 return True1068 else:1069 return False1070 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='WDSMatrix', pretty_print=True):1071 imported_ns_def_ = GenerateDSNamespaceDefs_.get('WDSMatrix')1072 if imported_ns_def_ is not None:1073 namespacedef_ = imported_ns_def_1074 if pretty_print:1075 eol_ = '\n'1076 else:1077 eol_ = ''1078 if self.original_tagname_ is not None and name_ == 'WDSMatrix':1079 name_ = self.original_tagname_1080 if UseCapturedNS_ and self.ns_prefix_:1081 namespaceprefix_ = self.ns_prefix_ + ':'1082 showIndent(outfile, level, pretty_print)1083 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1084 already_processed = set()1085 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='WDSMatrix')1086 if self._hasContent():1087 outfile.write('>%s' % (eol_, ))1088 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='WDSMatrix', pretty_print=pretty_print)1089 showIndent(outfile, level, pretty_print)1090 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1091 else:1092 outfile.write('/>%s' % (eol_, ))1093 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='WDSMatrix'):1094 if self.Name is not None and 'Name' not in already_processed:1095 already_processed.add('Name')1096 outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))1097 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='WDSMatrix', fromsubclass_=False, pretty_print=True):1098 if pretty_print:1099 eol_ = '\n'1100 else:1101 eol_ = ''1102 if self.NumberOfStates is not None:1103 namespaceprefix_ = self.NumberOfStates_nsprefix_ + ':' if (UseCapturedNS_ and self.NumberOfStates_nsprefix_) else ''1104 showIndent(outfile, level, pretty_print)1105 outfile.write('<%sNumberOfStates>%s</%sNumberOfStates>%s' % (namespaceprefix_ , self.gds_format_integer(self.NumberOfStates, input_name='NumberOfStates'), namespaceprefix_ , eol_))1106 if self.NumberOfAdditionalAxes is not None:1107 namespaceprefix_ = self.NumberOfAdditionalAxes_nsprefix_ + ':' if (UseCapturedNS_ and self.NumberOfAdditionalAxes_nsprefix_) else ''1108 showIndent(outfile, level, pretty_print)1109 outfile.write('<%sNumberOfAdditionalAxes>%s</%sNumberOfAdditionalAxes>%s' % (namespaceprefix_ , self.gds_format_integer(self.NumberOfAdditionalAxes, input_name='NumberOfAdditionalAxes'), namespaceprefix_ , eol_))1110 if self.ProvidesNonZeroCoords is not None:1111 namespaceprefix_ = self.ProvidesNonZeroCoords_nsprefix_ + ':' if (UseCapturedNS_ and self.ProvidesNonZeroCoords_nsprefix_) else ''1112 showIndent(outfile, level, pretty_print)1113 outfile.write('<%sProvidesNonZeroCoords>%s</%sProvidesNonZeroCoords>%s' % (namespaceprefix_ , self.gds_format_integer(self.ProvidesNonZeroCoords, input_name='ProvidesNonZeroCoords'), namespaceprefix_ , eol_))1114 if self.AdditionalAxesUpperLimits is not None:1115 namespaceprefix_ = self.AdditionalAxesUpperLimits_nsprefix_ + ':' if (UseCapturedNS_ and self.AdditionalAxesUpperLimits_nsprefix_) else ''1116 self.AdditionalAxesUpperLimits.export(outfile, level, namespaceprefix_, namespacedef_='', name_='AdditionalAxesUpperLimits', pretty_print=pretty_print)1117 if self.AdditionalAxesLowerLimits is not None:1118 namespaceprefix_ = self.AdditionalAxesLowerLimits_nsprefix_ + ':' if (UseCapturedNS_ and self.AdditionalAxesLowerLimits_nsprefix_) else ''1119 self.AdditionalAxesLowerLimits.export(outfile, level, namespaceprefix_, namespacedef_='', name_='AdditionalAxesLowerLimits', pretty_print=pretty_print)1120 if self.StateLabels is not None:1121 namespaceprefix_ = self.StateLabels_nsprefix_ + ':' if (UseCapturedNS_ and self.StateLabels_nsprefix_) else ''1122 self.StateLabels.export(outfile, level, namespaceprefix_, namespacedef_='', name_='StateLabels', pretty_print=pretty_print)1123 if self.NonZeroElements is not None:1124 namespaceprefix_ = self.NonZeroElements_nsprefix_ + ':' if (UseCapturedNS_ and self.NonZeroElements_nsprefix_) else ''1125 self.NonZeroElements.export(outfile, level, namespaceprefix_, namespacedef_='', name_='NonZeroElements', pretty_print=pretty_print)1126 for MData_ in self.MData:1127 namespaceprefix_ = self.MData_nsprefix_ + ':' if (UseCapturedNS_ and self.MData_nsprefix_) else ''1128 MData_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='MData', pretty_print=pretty_print)1129 if self.Betas is not None:1130 namespaceprefix_ = self.Betas_nsprefix_ + ':' if (UseCapturedNS_ and self.Betas_nsprefix_) else ''1131 self.Betas.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Betas', pretty_print=pretty_print)1132 if self.FunctionalInputs is not None:1133 namespaceprefix_ = self.FunctionalInputs_nsprefix_ + ':' if (UseCapturedNS_ and self.FunctionalInputs_nsprefix_) else ''1134 self.FunctionalInputs.export(outfile, level, namespaceprefix_, namespacedef_='', name_='FunctionalInputs', pretty_print=pretty_print)1135 if self.RedundantFunctionalInputs is not None:1136 namespaceprefix_ = self.RedundantFunctionalInputs_nsprefix_ + ':' if (UseCapturedNS_ and self.RedundantFunctionalInputs_nsprefix_) else ''1137 self.RedundantFunctionalInputs.export(outfile, level, namespaceprefix_, namespacedef_='', name_='RedundantFunctionalInputs', pretty_print=pretty_print)1138 def to_etree(self, parent_element=None, name_='WDSMatrix', mapping_=None, reverse_mapping_=None, nsmap_=None):1139 if parent_element is None:1140 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1141 else:1142 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1143 if self.Name is not None:1144 element.set('Name', self.gds_format_string(self.Name))1145 if self.NumberOfStates is not None:1146 NumberOfStates_ = self.NumberOfStates1147 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}NumberOfStates').text = self.gds_format_integer(NumberOfStates_)1148 if self.NumberOfAdditionalAxes is not None:1149 NumberOfAdditionalAxes_ = self.NumberOfAdditionalAxes1150 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}NumberOfAdditionalAxes').text = self.gds_format_integer(NumberOfAdditionalAxes_)1151 if self.ProvidesNonZeroCoords is not None:1152 ProvidesNonZeroCoords_ = self.ProvidesNonZeroCoords1153 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}ProvidesNonZeroCoords').text = self.gds_format_integer(ProvidesNonZeroCoords_)1154 if self.AdditionalAxesUpperLimits is not None:1155 AdditionalAxesUpperLimits_ = self.AdditionalAxesUpperLimits1156 AdditionalAxesUpperLimits_.to_etree(element, name_='AdditionalAxesUpperLimits', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1157 if self.AdditionalAxesLowerLimits is not None:1158 AdditionalAxesLowerLimits_ = self.AdditionalAxesLowerLimits1159 AdditionalAxesLowerLimits_.to_etree(element, name_='AdditionalAxesLowerLimits', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1160 if self.StateLabels is not None:1161 StateLabels_ = self.StateLabels1162 StateLabels_.to_etree(element, name_='StateLabels', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1163 if self.NonZeroElements is not None:1164 NonZeroElements_ = self.NonZeroElements1165 NonZeroElements_.to_etree(element, name_='NonZeroElements', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1166 for MData_ in self.MData:1167 MData_.to_etree(element, name_='MData', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1168 if self.Betas is not None:1169 Betas_ = self.Betas1170 Betas_.to_etree(element, name_='Betas', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1171 if self.FunctionalInputs is not None:1172 FunctionalInputs_ = self.FunctionalInputs1173 FunctionalInputs_.to_etree(element, name_='FunctionalInputs', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1174 if self.RedundantFunctionalInputs is not None:1175 RedundantFunctionalInputs_ = self.RedundantFunctionalInputs1176 RedundantFunctionalInputs_.to_etree(element, name_='RedundantFunctionalInputs', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1177 if mapping_ is not None:1178 mapping_[id(self)] = element1179 if reverse_mapping_ is not None:1180 reverse_mapping_[element] = self1181 return element1182 def build(self, node, gds_collector_=None):1183 self.gds_collector_ = gds_collector_1184 if SaveElementTreeNode:1185 self.gds_elementtree_node_ = node1186 already_processed = set()1187 self.ns_prefix_ = node.prefix1188 self._buildAttributes(node, node.attrib, already_processed)1189 for child in node:1190 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1191 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1192 return self1193 def _buildAttributes(self, node, attrs, already_processed):1194 value = find_attr_value_('Name', node)1195 if value is not None and 'Name' not in already_processed:1196 already_processed.add('Name')1197 self.Name = value1198 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1199 if nodeName_ == 'NumberOfStates' and child_.text:1200 sval_ = child_.text1201 ival_ = self.gds_parse_integer(sval_, node, 'NumberOfStates')1202 ival_ = self.gds_validate_integer(ival_, node, 'NumberOfStates')1203 self.NumberOfStates = ival_1204 self.NumberOfStates_nsprefix_ = child_.prefix1205 elif nodeName_ == 'NumberOfAdditionalAxes' and child_.text:1206 sval_ = child_.text1207 ival_ = self.gds_parse_integer(sval_, node, 'NumberOfAdditionalAxes')1208 ival_ = self.gds_validate_integer(ival_, node, 'NumberOfAdditionalAxes')1209 self.NumberOfAdditionalAxes = ival_1210 self.NumberOfAdditionalAxes_nsprefix_ = child_.prefix1211 elif nodeName_ == 'ProvidesNonZeroCoords' and child_.text:1212 sval_ = child_.text1213 ival_ = self.gds_parse_integer(sval_, node, 'ProvidesNonZeroCoords')1214 ival_ = self.gds_validate_integer(ival_, node, 'ProvidesNonZeroCoords')1215 self.ProvidesNonZeroCoords = ival_1216 self.ProvidesNonZeroCoords_nsprefix_ = child_.prefix1217 elif nodeName_ == 'AdditionalAxesUpperLimits':1218 obj_ = AdditionalAxesUpperLimitsType.factory(parent_object_=self)1219 obj_.build(child_, gds_collector_=gds_collector_)1220 self.AdditionalAxesUpperLimits = obj_1221 obj_.original_tagname_ = 'AdditionalAxesUpperLimits'1222 elif nodeName_ == 'AdditionalAxesLowerLimits':1223 obj_ = AdditionalAxesLowerLimitsType.factory(parent_object_=self)1224 obj_.build(child_, gds_collector_=gds_collector_)1225 self.AdditionalAxesLowerLimits = obj_1226 obj_.original_tagname_ = 'AdditionalAxesLowerLimits'1227 elif nodeName_ == 'StateLabels':1228 obj_ = StateLabelsType.factory(parent_object_=self)1229 obj_.build(child_, gds_collector_=gds_collector_)1230 self.StateLabels = obj_1231 obj_.original_tagname_ = 'StateLabels'1232 elif nodeName_ == 'NonZeroElements':1233 obj_ = NonZeroElementsType.factory(parent_object_=self)1234 obj_.build(child_, gds_collector_=gds_collector_)1235 self.NonZeroElements = obj_1236 obj_.original_tagname_ = 'NonZeroElements'1237 elif nodeName_ == 'MData':1238 obj_ = MDataType.factory(parent_object_=self)1239 obj_.build(child_, gds_collector_=gds_collector_)1240 self.MData.append(obj_)1241 obj_.original_tagname_ = 'MData'1242 elif nodeName_ == 'Betas':1243 obj_ = BetasType.factory(parent_object_=self)1244 obj_.build(child_, gds_collector_=gds_collector_)1245 self.Betas = obj_1246 obj_.original_tagname_ = 'Betas'1247 elif nodeName_ == 'FunctionalInputs':1248 obj_ = FunctionalInputsType.factory(parent_object_=self)1249 obj_.build(child_, gds_collector_=gds_collector_)1250 self.FunctionalInputs = obj_1251 obj_.original_tagname_ = 'FunctionalInputs'1252 elif nodeName_ == 'RedundantFunctionalInputs':1253 obj_ = RedundantFunctionalInputsType.factory(parent_object_=self)1254 obj_.build(child_, gds_collector_=gds_collector_)1255 self.RedundantFunctionalInputs = obj_1256 obj_.original_tagname_ = 'RedundantFunctionalInputs'1257# end class WDSMatrix1258class AdditionalAxesUpperLimitsType(GeneratedsSuper):1259 __hash__ = GeneratedsSuper.__hash__1260 subclass = None1261 superclass = None1262 def __init__(self, Axis1=None, Axis2=None, Axis3=None, Axis4=None, gds_collector_=None, **kwargs_):1263 self.gds_collector_ = gds_collector_1264 self.gds_elementtree_node_ = None1265 self.original_tagname_ = None1266 self.parent_object_ = kwargs_.get('parent_object_')1267 self.ns_prefix_ = None1268 self.Axis1 = Axis11269 self.Axis1_nsprefix_ = None1270 self.Axis2 = Axis21271 self.Axis2_nsprefix_ = None1272 self.Axis3 = Axis31273 self.Axis3_nsprefix_ = None1274 self.Axis4 = Axis41275 self.Axis4_nsprefix_ = None1276 def factory(*args_, **kwargs_):1277 if CurrentSubclassModule_ is not None:1278 subclass = getSubclassFromModule_(1279 CurrentSubclassModule_, AdditionalAxesUpperLimitsType)1280 if subclass is not None:1281 return subclass(*args_, **kwargs_)1282 if AdditionalAxesUpperLimitsType.subclass:1283 return AdditionalAxesUpperLimitsType.subclass(*args_, **kwargs_)1284 else:1285 return AdditionalAxesUpperLimitsType(*args_, **kwargs_)1286 factory = staticmethod(factory)1287 def get_ns_prefix_(self):1288 return self.ns_prefix_1289 def set_ns_prefix_(self, ns_prefix):1290 self.ns_prefix_ = ns_prefix1291 def get_Axis1(self):1292 return self.Axis11293 def set_Axis1(self, Axis1):1294 self.Axis1 = Axis11295 def get_Axis2(self):1296 return self.Axis21297 def set_Axis2(self, Axis2):1298 self.Axis2 = Axis21299 def get_Axis3(self):1300 return self.Axis31301 def set_Axis3(self, Axis3):1302 self.Axis3 = Axis31303 def get_Axis4(self):1304 return self.Axis41305 def set_Axis4(self, Axis4):1306 self.Axis4 = Axis41307 def _hasContent(self):1308 if (1309 self.Axis1 is not None or1310 self.Axis2 is not None or1311 self.Axis3 is not None or1312 self.Axis4 is not None1313 ):1314 return True1315 else:1316 return False1317 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesUpperLimitsType', pretty_print=True):1318 imported_ns_def_ = GenerateDSNamespaceDefs_.get('AdditionalAxesUpperLimitsType')1319 if imported_ns_def_ is not None:1320 namespacedef_ = imported_ns_def_1321 if pretty_print:1322 eol_ = '\n'1323 else:1324 eol_ = ''1325 if self.original_tagname_ is not None and name_ == 'AdditionalAxesUpperLimitsType':1326 name_ = self.original_tagname_1327 if UseCapturedNS_ and self.ns_prefix_:1328 namespaceprefix_ = self.ns_prefix_ + ':'1329 showIndent(outfile, level, pretty_print)1330 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1331 already_processed = set()1332 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdditionalAxesUpperLimitsType')1333 if self._hasContent():1334 outfile.write('>%s' % (eol_, ))1335 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='AdditionalAxesUpperLimitsType', pretty_print=pretty_print)1336 showIndent(outfile, level, pretty_print)1337 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1338 else:1339 outfile.write('/>%s' % (eol_, ))1340 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AdditionalAxesUpperLimitsType'):1341 pass1342 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesUpperLimitsType', fromsubclass_=False, pretty_print=True):1343 if pretty_print:1344 eol_ = '\n'1345 else:1346 eol_ = ''1347 if self.Axis1 is not None:1348 namespaceprefix_ = self.Axis1_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis1_nsprefix_) else ''1349 showIndent(outfile, level, pretty_print)1350 outfile.write('<%sAxis1>%s</%sAxis1>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis1, input_name='Axis1'), namespaceprefix_ , eol_))1351 if self.Axis2 is not None:1352 namespaceprefix_ = self.Axis2_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis2_nsprefix_) else ''1353 showIndent(outfile, level, pretty_print)1354 outfile.write('<%sAxis2>%s</%sAxis2>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis2, input_name='Axis2'), namespaceprefix_ , eol_))1355 if self.Axis3 is not None:1356 namespaceprefix_ = self.Axis3_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis3_nsprefix_) else ''1357 showIndent(outfile, level, pretty_print)1358 outfile.write('<%sAxis3>%s</%sAxis3>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis3, input_name='Axis3'), namespaceprefix_ , eol_))1359 if self.Axis4 is not None:1360 namespaceprefix_ = self.Axis4_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis4_nsprefix_) else ''1361 showIndent(outfile, level, pretty_print)1362 outfile.write('<%sAxis4>%s</%sAxis4>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis4, input_name='Axis4'), namespaceprefix_ , eol_))1363 def to_etree(self, parent_element=None, name_='AdditionalAxesUpperLimitsType', mapping_=None, reverse_mapping_=None, nsmap_=None):1364 if parent_element is None:1365 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1366 else:1367 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1368 if self.Axis1 is not None:1369 Axis1_ = self.Axis11370 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis1').text = self.gds_format_integer(Axis1_)1371 if self.Axis2 is not None:1372 Axis2_ = self.Axis21373 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis2').text = self.gds_format_integer(Axis2_)1374 if self.Axis3 is not None:1375 Axis3_ = self.Axis31376 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis3').text = self.gds_format_integer(Axis3_)1377 if self.Axis4 is not None:1378 Axis4_ = self.Axis41379 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis4').text = self.gds_format_integer(Axis4_)1380 if mapping_ is not None:1381 mapping_[id(self)] = element1382 if reverse_mapping_ is not None:1383 reverse_mapping_[element] = self1384 return element1385 def build(self, node, gds_collector_=None):1386 self.gds_collector_ = gds_collector_1387 if SaveElementTreeNode:1388 self.gds_elementtree_node_ = node1389 already_processed = set()1390 self.ns_prefix_ = node.prefix1391 self._buildAttributes(node, node.attrib, already_processed)1392 for child in node:1393 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1394 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1395 return self1396 def _buildAttributes(self, node, attrs, already_processed):1397 pass1398 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1399 if nodeName_ == 'Axis1' and child_.text:1400 sval_ = child_.text1401 ival_ = self.gds_parse_integer(sval_, node, 'Axis1')1402 ival_ = self.gds_validate_integer(ival_, node, 'Axis1')1403 self.Axis1 = ival_1404 self.Axis1_nsprefix_ = child_.prefix1405 elif nodeName_ == 'Axis2' and child_.text:1406 sval_ = child_.text1407 ival_ = self.gds_parse_integer(sval_, node, 'Axis2')1408 ival_ = self.gds_validate_integer(ival_, node, 'Axis2')1409 self.Axis2 = ival_1410 self.Axis2_nsprefix_ = child_.prefix1411 elif nodeName_ == 'Axis3' and child_.text:1412 sval_ = child_.text1413 ival_ = self.gds_parse_integer(sval_, node, 'Axis3')1414 ival_ = self.gds_validate_integer(ival_, node, 'Axis3')1415 self.Axis3 = ival_1416 self.Axis3_nsprefix_ = child_.prefix1417 elif nodeName_ == 'Axis4' and child_.text:1418 sval_ = child_.text1419 ival_ = self.gds_parse_integer(sval_, node, 'Axis4')1420 ival_ = self.gds_validate_integer(ival_, node, 'Axis4')1421 self.Axis4 = ival_1422 self.Axis4_nsprefix_ = child_.prefix1423# end class AdditionalAxesUpperLimitsType1424class AdditionalAxesLowerLimitsType(GeneratedsSuper):1425 __hash__ = GeneratedsSuper.__hash__1426 subclass = None1427 superclass = None1428 def __init__(self, Axis1=None, Axis2=None, Axis3=None, Axis4=None, gds_collector_=None, **kwargs_):1429 self.gds_collector_ = gds_collector_1430 self.gds_elementtree_node_ = None1431 self.original_tagname_ = None1432 self.parent_object_ = kwargs_.get('parent_object_')1433 self.ns_prefix_ = None1434 self.Axis1 = Axis11435 self.Axis1_nsprefix_ = None1436 self.Axis2 = Axis21437 self.Axis2_nsprefix_ = None1438 self.Axis3 = Axis31439 self.Axis3_nsprefix_ = None1440 self.Axis4 = Axis41441 self.Axis4_nsprefix_ = None1442 def factory(*args_, **kwargs_):1443 if CurrentSubclassModule_ is not None:1444 subclass = getSubclassFromModule_(1445 CurrentSubclassModule_, AdditionalAxesLowerLimitsType)1446 if subclass is not None:1447 return subclass(*args_, **kwargs_)1448 if AdditionalAxesLowerLimitsType.subclass:1449 return AdditionalAxesLowerLimitsType.subclass(*args_, **kwargs_)1450 else:1451 return AdditionalAxesLowerLimitsType(*args_, **kwargs_)1452 factory = staticmethod(factory)1453 def get_ns_prefix_(self):1454 return self.ns_prefix_1455 def set_ns_prefix_(self, ns_prefix):1456 self.ns_prefix_ = ns_prefix1457 def get_Axis1(self):1458 return self.Axis11459 def set_Axis1(self, Axis1):1460 self.Axis1 = Axis11461 def get_Axis2(self):1462 return self.Axis21463 def set_Axis2(self, Axis2):1464 self.Axis2 = Axis21465 def get_Axis3(self):1466 return self.Axis31467 def set_Axis3(self, Axis3):1468 self.Axis3 = Axis31469 def get_Axis4(self):1470 return self.Axis41471 def set_Axis4(self, Axis4):1472 self.Axis4 = Axis41473 def _hasContent(self):1474 if (1475 self.Axis1 is not None or1476 self.Axis2 is not None or1477 self.Axis3 is not None or1478 self.Axis4 is not None1479 ):1480 return True1481 else:1482 return False1483 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesLowerLimitsType', pretty_print=True):1484 imported_ns_def_ = GenerateDSNamespaceDefs_.get('AdditionalAxesLowerLimitsType')1485 if imported_ns_def_ is not None:1486 namespacedef_ = imported_ns_def_1487 if pretty_print:1488 eol_ = '\n'1489 else:1490 eol_ = ''1491 if self.original_tagname_ is not None and name_ == 'AdditionalAxesLowerLimitsType':1492 name_ = self.original_tagname_1493 if UseCapturedNS_ and self.ns_prefix_:1494 namespaceprefix_ = self.ns_prefix_ + ':'1495 showIndent(outfile, level, pretty_print)1496 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1497 already_processed = set()1498 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdditionalAxesLowerLimitsType')1499 if self._hasContent():1500 outfile.write('>%s' % (eol_, ))1501 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='AdditionalAxesLowerLimitsType', pretty_print=pretty_print)1502 showIndent(outfile, level, pretty_print)1503 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1504 else:1505 outfile.write('/>%s' % (eol_, ))1506 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AdditionalAxesLowerLimitsType'):1507 pass1508 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesLowerLimitsType', fromsubclass_=False, pretty_print=True):1509 if pretty_print:1510 eol_ = '\n'1511 else:1512 eol_ = ''1513 if self.Axis1 is not None:1514 namespaceprefix_ = self.Axis1_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis1_nsprefix_) else ''1515 showIndent(outfile, level, pretty_print)1516 outfile.write('<%sAxis1>%s</%sAxis1>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis1, input_name='Axis1'), namespaceprefix_ , eol_))1517 if self.Axis2 is not None:1518 namespaceprefix_ = self.Axis2_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis2_nsprefix_) else ''1519 showIndent(outfile, level, pretty_print)1520 outfile.write('<%sAxis2>%s</%sAxis2>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis2, input_name='Axis2'), namespaceprefix_ , eol_))1521 if self.Axis3 is not None:1522 namespaceprefix_ = self.Axis3_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis3_nsprefix_) else ''1523 showIndent(outfile, level, pretty_print)1524 outfile.write('<%sAxis3>%s</%sAxis3>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis3, input_name='Axis3'), namespaceprefix_ , eol_))1525 if self.Axis4 is not None:1526 namespaceprefix_ = self.Axis4_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis4_nsprefix_) else ''1527 showIndent(outfile, level, pretty_print)1528 outfile.write('<%sAxis4>%s</%sAxis4>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis4, input_name='Axis4'), namespaceprefix_ , eol_))1529 def to_etree(self, parent_element=None, name_='AdditionalAxesLowerLimitsType', mapping_=None, reverse_mapping_=None, nsmap_=None):1530 if parent_element is None:1531 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1532 else:1533 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1534 if self.Axis1 is not None:1535 Axis1_ = self.Axis11536 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis1').text = self.gds_format_integer(Axis1_)1537 if self.Axis2 is not None:1538 Axis2_ = self.Axis21539 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis2').text = self.gds_format_integer(Axis2_)1540 if self.Axis3 is not None:1541 Axis3_ = self.Axis31542 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis3').text = self.gds_format_integer(Axis3_)1543 if self.Axis4 is not None:1544 Axis4_ = self.Axis41545 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Axis4').text = self.gds_format_integer(Axis4_)1546 if mapping_ is not None:1547 mapping_[id(self)] = element1548 if reverse_mapping_ is not None:1549 reverse_mapping_[element] = self1550 return element1551 def build(self, node, gds_collector_=None):1552 self.gds_collector_ = gds_collector_1553 if SaveElementTreeNode:1554 self.gds_elementtree_node_ = node1555 already_processed = set()1556 self.ns_prefix_ = node.prefix1557 self._buildAttributes(node, node.attrib, already_processed)1558 for child in node:1559 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1560 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1561 return self1562 def _buildAttributes(self, node, attrs, already_processed):1563 pass1564 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1565 if nodeName_ == 'Axis1' and child_.text:1566 sval_ = child_.text1567 ival_ = self.gds_parse_integer(sval_, node, 'Axis1')1568 ival_ = self.gds_validate_integer(ival_, node, 'Axis1')1569 self.Axis1 = ival_1570 self.Axis1_nsprefix_ = child_.prefix1571 elif nodeName_ == 'Axis2' and child_.text:1572 sval_ = child_.text1573 ival_ = self.gds_parse_integer(sval_, node, 'Axis2')1574 ival_ = self.gds_validate_integer(ival_, node, 'Axis2')1575 self.Axis2 = ival_1576 self.Axis2_nsprefix_ = child_.prefix1577 elif nodeName_ == 'Axis3' and child_.text:1578 sval_ = child_.text1579 ival_ = self.gds_parse_integer(sval_, node, 'Axis3')1580 ival_ = self.gds_validate_integer(ival_, node, 'Axis3')1581 self.Axis3 = ival_1582 self.Axis3_nsprefix_ = child_.prefix1583 elif nodeName_ == 'Axis4' and child_.text:1584 sval_ = child_.text1585 ival_ = self.gds_parse_integer(sval_, node, 'Axis4')1586 ival_ = self.gds_validate_integer(ival_, node, 'Axis4')1587 self.Axis4 = ival_1588 self.Axis4_nsprefix_ = child_.prefix1589# end class AdditionalAxesLowerLimitsType1590class StateLabelsType(GeneratedsSuper):1591 __hash__ = GeneratedsSuper.__hash__1592 subclass = None1593 superclass = None1594 def __init__(self, StateLabel=None, gds_collector_=None, **kwargs_):1595 self.gds_collector_ = gds_collector_1596 self.gds_elementtree_node_ = None1597 self.original_tagname_ = None1598 self.parent_object_ = kwargs_.get('parent_object_')1599 self.ns_prefix_ = None1600 if StateLabel is None:1601 self.StateLabel = []1602 else:1603 self.StateLabel = StateLabel1604 self.StateLabel_nsprefix_ = None1605 def factory(*args_, **kwargs_):1606 if CurrentSubclassModule_ is not None:1607 subclass = getSubclassFromModule_(1608 CurrentSubclassModule_, StateLabelsType)1609 if subclass is not None:1610 return subclass(*args_, **kwargs_)1611 if StateLabelsType.subclass:1612 return StateLabelsType.subclass(*args_, **kwargs_)1613 else:1614 return StateLabelsType(*args_, **kwargs_)1615 factory = staticmethod(factory)1616 def get_ns_prefix_(self):1617 return self.ns_prefix_1618 def set_ns_prefix_(self, ns_prefix):1619 self.ns_prefix_ = ns_prefix1620 def get_StateLabel(self):1621 return self.StateLabel1622 def set_StateLabel(self, StateLabel):1623 self.StateLabel = StateLabel1624 def add_StateLabel(self, value):1625 self.StateLabel.append(value)1626 def insert_StateLabel_at(self, index, value):1627 self.StateLabel.insert(index, value)1628 def replace_StateLabel_at(self, index, value):1629 self.StateLabel[index] = value1630 def _hasContent(self):1631 if (1632 self.StateLabel1633 ):1634 return True1635 else:1636 return False1637 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelsType', pretty_print=True):1638 imported_ns_def_ = GenerateDSNamespaceDefs_.get('StateLabelsType')1639 if imported_ns_def_ is not None:1640 namespacedef_ = imported_ns_def_1641 if pretty_print:1642 eol_ = '\n'1643 else:1644 eol_ = ''1645 if self.original_tagname_ is not None and name_ == 'StateLabelsType':1646 name_ = self.original_tagname_1647 if UseCapturedNS_ and self.ns_prefix_:1648 namespaceprefix_ = self.ns_prefix_ + ':'1649 showIndent(outfile, level, pretty_print)1650 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1651 already_processed = set()1652 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='StateLabelsType')1653 if self._hasContent():1654 outfile.write('>%s' % (eol_, ))1655 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='StateLabelsType', pretty_print=pretty_print)1656 showIndent(outfile, level, pretty_print)1657 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1658 else:1659 outfile.write('/>%s' % (eol_, ))1660 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='StateLabelsType'):1661 pass1662 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelsType', fromsubclass_=False, pretty_print=True):1663 if pretty_print:1664 eol_ = '\n'1665 else:1666 eol_ = ''1667 for StateLabel_ in self.StateLabel:1668 namespaceprefix_ = self.StateLabel_nsprefix_ + ':' if (UseCapturedNS_ and self.StateLabel_nsprefix_) else ''1669 StateLabel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='StateLabel', pretty_print=pretty_print)1670 def to_etree(self, parent_element=None, name_='StateLabelsType', mapping_=None, reverse_mapping_=None, nsmap_=None):1671 if parent_element is None:1672 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1673 else:1674 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1675 for StateLabel_ in self.StateLabel:1676 StateLabel_.to_etree(element, name_='StateLabel', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1677 if mapping_ is not None:1678 mapping_[id(self)] = element1679 if reverse_mapping_ is not None:1680 reverse_mapping_[element] = self1681 return element1682 def build(self, node, gds_collector_=None):1683 self.gds_collector_ = gds_collector_1684 if SaveElementTreeNode:1685 self.gds_elementtree_node_ = node1686 already_processed = set()1687 self.ns_prefix_ = node.prefix1688 self._buildAttributes(node, node.attrib, already_processed)1689 for child in node:1690 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1691 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1692 return self1693 def _buildAttributes(self, node, attrs, already_processed):1694 pass1695 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1696 if nodeName_ == 'StateLabel':1697 obj_ = StateLabelType.factory(parent_object_=self)1698 obj_.build(child_, gds_collector_=gds_collector_)1699 self.StateLabel.append(obj_)1700 obj_.original_tagname_ = 'StateLabel'1701# end class StateLabelsType1702class StateLabelType(GeneratedsSuper):1703 __hash__ = GeneratedsSuper.__hash__1704 subclass = None1705 superclass = None1706 def __init__(self, Position=None, valueOf_=None, gds_collector_=None, **kwargs_):1707 self.gds_collector_ = gds_collector_1708 self.gds_elementtree_node_ = None1709 self.original_tagname_ = None1710 self.parent_object_ = kwargs_.get('parent_object_')1711 self.ns_prefix_ = None1712 self.Position = _cast(int, Position)1713 self.Position_nsprefix_ = None1714 self.valueOf_ = valueOf_1715 def factory(*args_, **kwargs_):1716 if CurrentSubclassModule_ is not None:1717 subclass = getSubclassFromModule_(1718 CurrentSubclassModule_, StateLabelType)1719 if subclass is not None:1720 return subclass(*args_, **kwargs_)1721 if StateLabelType.subclass:1722 return StateLabelType.subclass(*args_, **kwargs_)1723 else:1724 return StateLabelType(*args_, **kwargs_)1725 factory = staticmethod(factory)1726 def get_ns_prefix_(self):1727 return self.ns_prefix_1728 def set_ns_prefix_(self, ns_prefix):1729 self.ns_prefix_ = ns_prefix1730 def get_Position(self):1731 return self.Position1732 def set_Position(self, Position):1733 self.Position = Position1734 def get_valueOf_(self): return self.valueOf_1735 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_1736 def _hasContent(self):1737 if (1738 (1 if type(self.valueOf_) in [int,float] else self.valueOf_)1739 ):1740 return True1741 else:1742 return False1743 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelType', pretty_print=True):1744 imported_ns_def_ = GenerateDSNamespaceDefs_.get('StateLabelType')1745 if imported_ns_def_ is not None:1746 namespacedef_ = imported_ns_def_1747 if pretty_print:1748 eol_ = '\n'1749 else:1750 eol_ = ''1751 if self.original_tagname_ is not None and name_ == 'StateLabelType':1752 name_ = self.original_tagname_1753 if UseCapturedNS_ and self.ns_prefix_:1754 namespaceprefix_ = self.ns_prefix_ + ':'1755 showIndent(outfile, level, pretty_print)1756 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1757 already_processed = set()1758 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='StateLabelType')1759 if self._hasContent():1760 outfile.write('>')1761 outfile.write(self.convert_unicode(self.valueOf_))1762 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='StateLabelType', pretty_print=pretty_print)1763 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1764 else:1765 outfile.write('/>%s' % (eol_, ))1766 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='StateLabelType'):1767 if self.Position is not None and 'Position' not in already_processed:1768 already_processed.add('Position')1769 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))1770 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelType', fromsubclass_=False, pretty_print=True):1771 pass1772 def to_etree(self, parent_element=None, name_='StateLabelType', mapping_=None, reverse_mapping_=None, nsmap_=None):1773 if parent_element is None:1774 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1775 else:1776 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1777 if self.Position is not None:1778 element.set('Position', self.gds_format_integer(self.Position))1779 if self._hasContent():1780 element.text = self.gds_format_string(self.get_valueOf_())1781 if mapping_ is not None:1782 mapping_[id(self)] = element1783 if reverse_mapping_ is not None:1784 reverse_mapping_[element] = self1785 return element1786 def build(self, node, gds_collector_=None):1787 self.gds_collector_ = gds_collector_1788 if SaveElementTreeNode:1789 self.gds_elementtree_node_ = node1790 already_processed = set()1791 self.ns_prefix_ = node.prefix1792 self._buildAttributes(node, node.attrib, already_processed)1793 self.valueOf_ = get_all_text_(node)1794 for child in node:1795 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1796 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1797 return self1798 def _buildAttributes(self, node, attrs, already_processed):1799 value = find_attr_value_('Position', node)1800 if value is not None and 'Position' not in already_processed:1801 already_processed.add('Position')1802 self.Position = self.gds_parse_integer(value, node, 'Position')1803 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1804 pass1805# end class StateLabelType1806class NonZeroElementsType(GeneratedsSuper):1807 __hash__ = GeneratedsSuper.__hash__1808 subclass = None1809 superclass = None1810 def __init__(self, Number=None, NonZeroCoordinates=None, gds_collector_=None, **kwargs_):1811 self.gds_collector_ = gds_collector_1812 self.gds_elementtree_node_ = None1813 self.original_tagname_ = None1814 self.parent_object_ = kwargs_.get('parent_object_')1815 self.ns_prefix_ = None1816 self.Number = Number1817 self.Number_nsprefix_ = None1818 self.NonZeroCoordinates = NonZeroCoordinates1819 self.NonZeroCoordinates_nsprefix_ = None1820 def factory(*args_, **kwargs_):1821 if CurrentSubclassModule_ is not None:1822 subclass = getSubclassFromModule_(1823 CurrentSubclassModule_, NonZeroElementsType)1824 if subclass is not None:1825 return subclass(*args_, **kwargs_)1826 if NonZeroElementsType.subclass:1827 return NonZeroElementsType.subclass(*args_, **kwargs_)1828 else:1829 return NonZeroElementsType(*args_, **kwargs_)1830 factory = staticmethod(factory)1831 def get_ns_prefix_(self):1832 return self.ns_prefix_1833 def set_ns_prefix_(self, ns_prefix):1834 self.ns_prefix_ = ns_prefix1835 def get_Number(self):1836 return self.Number1837 def set_Number(self, Number):1838 self.Number = Number1839 def get_NonZeroCoordinates(self):1840 return self.NonZeroCoordinates1841 def set_NonZeroCoordinates(self, NonZeroCoordinates):1842 self.NonZeroCoordinates = NonZeroCoordinates1843 def _hasContent(self):1844 if (1845 self.Number is not None or1846 self.NonZeroCoordinates is not None1847 ):1848 return True1849 else:1850 return False1851 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroElementsType', pretty_print=True):1852 imported_ns_def_ = GenerateDSNamespaceDefs_.get('NonZeroElementsType')1853 if imported_ns_def_ is not None:1854 namespacedef_ = imported_ns_def_1855 if pretty_print:1856 eol_ = '\n'1857 else:1858 eol_ = ''1859 if self.original_tagname_ is not None and name_ == 'NonZeroElementsType':1860 name_ = self.original_tagname_1861 if UseCapturedNS_ and self.ns_prefix_:1862 namespaceprefix_ = self.ns_prefix_ + ':'1863 showIndent(outfile, level, pretty_print)1864 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1865 already_processed = set()1866 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NonZeroElementsType')1867 if self._hasContent():1868 outfile.write('>%s' % (eol_, ))1869 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NonZeroElementsType', pretty_print=pretty_print)1870 showIndent(outfile, level, pretty_print)1871 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1872 else:1873 outfile.write('/>%s' % (eol_, ))1874 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NonZeroElementsType'):1875 pass1876 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroElementsType', fromsubclass_=False, pretty_print=True):1877 if pretty_print:1878 eol_ = '\n'1879 else:1880 eol_ = ''1881 if self.Number is not None:1882 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''1883 showIndent(outfile, level, pretty_print)1884 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))1885 if self.NonZeroCoordinates is not None:1886 namespaceprefix_ = self.NonZeroCoordinates_nsprefix_ + ':' if (UseCapturedNS_ and self.NonZeroCoordinates_nsprefix_) else ''1887 self.NonZeroCoordinates.export(outfile, level, namespaceprefix_, namespacedef_='', name_='NonZeroCoordinates', pretty_print=pretty_print)1888 def to_etree(self, parent_element=None, name_='NonZeroElementsType', mapping_=None, reverse_mapping_=None, nsmap_=None):1889 if parent_element is None:1890 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1891 else:1892 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)1893 if self.Number is not None:1894 Number_ = self.Number1895 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Number').text = self.gds_format_integer(Number_)1896 if self.NonZeroCoordinates is not None:1897 NonZeroCoordinates_ = self.NonZeroCoordinates1898 NonZeroCoordinates_.to_etree(element, name_='NonZeroCoordinates', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)1899 if mapping_ is not None:1900 mapping_[id(self)] = element1901 if reverse_mapping_ is not None:1902 reverse_mapping_[element] = self1903 return element1904 def build(self, node, gds_collector_=None):1905 self.gds_collector_ = gds_collector_1906 if SaveElementTreeNode:1907 self.gds_elementtree_node_ = node1908 already_processed = set()1909 self.ns_prefix_ = node.prefix1910 self._buildAttributes(node, node.attrib, already_processed)1911 for child in node:1912 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1913 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1914 return self1915 def _buildAttributes(self, node, attrs, already_processed):1916 pass1917 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1918 if nodeName_ == 'Number' and child_.text:1919 sval_ = child_.text1920 ival_ = self.gds_parse_integer(sval_, node, 'Number')1921 ival_ = self.gds_validate_integer(ival_, node, 'Number')1922 self.Number = ival_1923 self.Number_nsprefix_ = child_.prefix1924 elif nodeName_ == 'NonZeroCoordinates':1925 obj_ = NonZeroCoordinatesType.factory(parent_object_=self)1926 obj_.build(child_, gds_collector_=gds_collector_)1927 self.NonZeroCoordinates = obj_1928 obj_.original_tagname_ = 'NonZeroCoordinates'1929# end class NonZeroElementsType1930class NonZeroCoordinatesType(GeneratedsSuper):1931 __hash__ = GeneratedsSuper.__hash__1932 subclass = None1933 superclass = None1934 def __init__(self, NonZeroCoordinate=None, gds_collector_=None, **kwargs_):1935 self.gds_collector_ = gds_collector_1936 self.gds_elementtree_node_ = None1937 self.original_tagname_ = None1938 self.parent_object_ = kwargs_.get('parent_object_')1939 self.ns_prefix_ = None1940 if NonZeroCoordinate is None:1941 self.NonZeroCoordinate = []1942 else:1943 self.NonZeroCoordinate = NonZeroCoordinate1944 self.NonZeroCoordinate_nsprefix_ = None1945 def factory(*args_, **kwargs_):1946 if CurrentSubclassModule_ is not None:1947 subclass = getSubclassFromModule_(1948 CurrentSubclassModule_, NonZeroCoordinatesType)1949 if subclass is not None:1950 return subclass(*args_, **kwargs_)1951 if NonZeroCoordinatesType.subclass:1952 return NonZeroCoordinatesType.subclass(*args_, **kwargs_)1953 else:1954 return NonZeroCoordinatesType(*args_, **kwargs_)1955 factory = staticmethod(factory)1956 def get_ns_prefix_(self):1957 return self.ns_prefix_1958 def set_ns_prefix_(self, ns_prefix):1959 self.ns_prefix_ = ns_prefix1960 def get_NonZeroCoordinate(self):1961 return self.NonZeroCoordinate1962 def set_NonZeroCoordinate(self, NonZeroCoordinate):1963 self.NonZeroCoordinate = NonZeroCoordinate1964 def add_NonZeroCoordinate(self, value):1965 self.NonZeroCoordinate.append(value)1966 def insert_NonZeroCoordinate_at(self, index, value):1967 self.NonZeroCoordinate.insert(index, value)1968 def replace_NonZeroCoordinate_at(self, index, value):1969 self.NonZeroCoordinate[index] = value1970 def _hasContent(self):1971 if (1972 self.NonZeroCoordinate1973 ):1974 return True1975 else:1976 return False1977 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinatesType', pretty_print=True):1978 imported_ns_def_ = GenerateDSNamespaceDefs_.get('NonZeroCoordinatesType')1979 if imported_ns_def_ is not None:1980 namespacedef_ = imported_ns_def_1981 if pretty_print:1982 eol_ = '\n'1983 else:1984 eol_ = ''1985 if self.original_tagname_ is not None and name_ == 'NonZeroCoordinatesType':1986 name_ = self.original_tagname_1987 if UseCapturedNS_ and self.ns_prefix_:1988 namespaceprefix_ = self.ns_prefix_ + ':'1989 showIndent(outfile, level, pretty_print)1990 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1991 already_processed = set()1992 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NonZeroCoordinatesType')1993 if self._hasContent():1994 outfile.write('>%s' % (eol_, ))1995 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NonZeroCoordinatesType', pretty_print=pretty_print)1996 showIndent(outfile, level, pretty_print)1997 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1998 else:1999 outfile.write('/>%s' % (eol_, ))2000 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NonZeroCoordinatesType'):2001 pass2002 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinatesType', fromsubclass_=False, pretty_print=True):2003 if pretty_print:2004 eol_ = '\n'2005 else:2006 eol_ = ''2007 for NonZeroCoordinate_ in self.NonZeroCoordinate:2008 namespaceprefix_ = self.NonZeroCoordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.NonZeroCoordinate_nsprefix_) else ''2009 NonZeroCoordinate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='NonZeroCoordinate', pretty_print=pretty_print)2010 def to_etree(self, parent_element=None, name_='NonZeroCoordinatesType', mapping_=None, reverse_mapping_=None, nsmap_=None):2011 if parent_element is None:2012 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)2013 else:2014 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)2015 for NonZeroCoordinate_ in self.NonZeroCoordinate:2016 NonZeroCoordinate_.to_etree(element, name_='NonZeroCoordinate', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)2017 if mapping_ is not None:2018 mapping_[id(self)] = element2019 if reverse_mapping_ is not None:2020 reverse_mapping_[element] = self2021 return element2022 def build(self, node, gds_collector_=None):2023 self.gds_collector_ = gds_collector_2024 if SaveElementTreeNode:2025 self.gds_elementtree_node_ = node2026 already_processed = set()2027 self.ns_prefix_ = node.prefix2028 self._buildAttributes(node, node.attrib, already_processed)2029 for child in node:2030 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2031 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)2032 return self2033 def _buildAttributes(self, node, attrs, already_processed):2034 pass2035 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):2036 if nodeName_ == 'NonZeroCoordinate':2037 obj_ = NonZeroCoordinateType.factory(parent_object_=self)2038 obj_.build(child_, gds_collector_=gds_collector_)2039 self.NonZeroCoordinate.append(obj_)2040 obj_.original_tagname_ = 'NonZeroCoordinate'2041# end class NonZeroCoordinatesType2042class NonZeroCoordinateType(GeneratedsSuper):2043 __hash__ = GeneratedsSuper.__hash__2044 subclass = None2045 superclass = None2046 def __init__(self, Position=None, I=None, J=None, gds_collector_=None, **kwargs_):2047 self.gds_collector_ = gds_collector_2048 self.gds_elementtree_node_ = None2049 self.original_tagname_ = None2050 self.parent_object_ = kwargs_.get('parent_object_')2051 self.ns_prefix_ = None2052 self.Position = _cast(int, Position)2053 self.Position_nsprefix_ = None2054 self.I = I2055 self.I_nsprefix_ = None2056 self.J = J2057 self.J_nsprefix_ = None2058 def factory(*args_, **kwargs_):2059 if CurrentSubclassModule_ is not None:2060 subclass = getSubclassFromModule_(2061 CurrentSubclassModule_, NonZeroCoordinateType)2062 if subclass is not None:2063 return subclass(*args_, **kwargs_)2064 if NonZeroCoordinateType.subclass:2065 return NonZeroCoordinateType.subclass(*args_, **kwargs_)2066 else:2067 return NonZeroCoordinateType(*args_, **kwargs_)2068 factory = staticmethod(factory)2069 def get_ns_prefix_(self):2070 return self.ns_prefix_2071 def set_ns_prefix_(self, ns_prefix):2072 self.ns_prefix_ = ns_prefix2073 def get_I(self):2074 return self.I2075 def set_I(self, I):2076 self.I = I2077 def get_J(self):2078 return self.J2079 def set_J(self, J):2080 self.J = J2081 def get_Position(self):2082 return self.Position2083 def set_Position(self, Position):2084 self.Position = Position2085 def _hasContent(self):2086 if (2087 self.I is not None or2088 self.J is not None2089 ):2090 return True2091 else:2092 return False2093 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinateType', pretty_print=True):2094 imported_ns_def_ = GenerateDSNamespaceDefs_.get('NonZeroCoordinateType')2095 if imported_ns_def_ is not None:2096 namespacedef_ = imported_ns_def_2097 if pretty_print:2098 eol_ = '\n'2099 else:2100 eol_ = ''2101 if self.original_tagname_ is not None and name_ == 'NonZeroCoordinateType':2102 name_ = self.original_tagname_2103 if UseCapturedNS_ and self.ns_prefix_:2104 namespaceprefix_ = self.ns_prefix_ + ':'2105 showIndent(outfile, level, pretty_print)2106 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2107 already_processed = set()2108 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NonZeroCoordinateType')2109 if self._hasContent():2110 outfile.write('>%s' % (eol_, ))2111 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NonZeroCoordinateType', pretty_print=pretty_print)2112 showIndent(outfile, level, pretty_print)2113 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))2114 else:2115 outfile.write('/>%s' % (eol_, ))2116 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NonZeroCoordinateType'):2117 if self.Position is not None and 'Position' not in already_processed:2118 already_processed.add('Position')2119 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))2120 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinateType', fromsubclass_=False, pretty_print=True):2121 if pretty_print:2122 eol_ = '\n'2123 else:2124 eol_ = ''2125 if self.I is not None:2126 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''2127 showIndent(outfile, level, pretty_print)2128 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))2129 if self.J is not None:2130 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''2131 showIndent(outfile, level, pretty_print)2132 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))2133 def to_etree(self, parent_element=None, name_='NonZeroCoordinateType', mapping_=None, reverse_mapping_=None, nsmap_=None):2134 if parent_element is None:2135 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)2136 else:2137 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)2138 if self.Position is not None:2139 element.set('Position', self.gds_format_integer(self.Position))2140 if self.I is not None:2141 I_ = self.I2142 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}I').text = self.gds_format_integer(I_)2143 if self.J is not None:2144 J_ = self.J2145 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}J').text = self.gds_format_integer(J_)2146 if mapping_ is not None:2147 mapping_[id(self)] = element2148 if reverse_mapping_ is not None:2149 reverse_mapping_[element] = self2150 return element2151 def build(self, node, gds_collector_=None):2152 self.gds_collector_ = gds_collector_2153 if SaveElementTreeNode:2154 self.gds_elementtree_node_ = node2155 already_processed = set()2156 self.ns_prefix_ = node.prefix2157 self._buildAttributes(node, node.attrib, already_processed)2158 for child in node:2159 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2160 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)2161 return self2162 def _buildAttributes(self, node, attrs, already_processed):2163 value = find_attr_value_('Position', node)2164 if value is not None and 'Position' not in already_processed:2165 already_processed.add('Position')2166 self.Position = self.gds_parse_integer(value, node, 'Position')2167 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):2168 if nodeName_ == 'I' and child_.text:2169 sval_ = child_.text2170 ival_ = self.gds_parse_integer(sval_, node, 'I')2171 ival_ = self.gds_validate_integer(ival_, node, 'I')2172 self.I = ival_2173 self.I_nsprefix_ = child_.prefix2174 elif nodeName_ == 'J' and child_.text:2175 sval_ = child_.text2176 ival_ = self.gds_parse_integer(sval_, node, 'J')2177 ival_ = self.gds_validate_integer(ival_, node, 'J')2178 self.J = ival_2179 self.J_nsprefix_ = child_.prefix2180# end class NonZeroCoordinateType2181class MDataType(GeneratedsSuper):2182 __hash__ = GeneratedsSuper.__hash__2183 subclass = None2184 superclass = None2185 def __init__(self, Row=None, Axis1=None, Axis2=None, Axis3=None, Axis4=None, Col1=None, Col2=None, Col3=None, Col4=None, Col5=None, Col6=None, Col7=None, Col8=None, Col9=None, Col10=None, Col11=None, Col12=None, Col13=None, Col14=None, Col15=None, Col16=None, Col17=None, Col18=None, Col19=None, Col20=None, Col21=None, Col22=None, Col23=None, Col24=None, Col25=None, Col26=None, Col27=None, Col28=None, Col29=None, Col30=None, Col31=None, Col32=None, Col33=None, Col34=None, Col35=None, Col36=None, Col37=None, Col38=None, Col39=None, Col40=None, Col41=None, Col42=None, Col43=None, Col44=None, Col45=None, Col46=None, Col47=None, Col48=None, Col49=None, Col50=None, Col51=None, Col52=None, Col53=None, Col54=None, Col55=None, Col56=None, Col57=None, Col58=None, Col59=None, Col60=None, Col61=None, Col62=None, Col63=None, Col64=None, gds_collector_=None, **kwargs_):2186 self.gds_collector_ = gds_collector_2187 self.gds_elementtree_node_ = None2188 self.original_tagname_ = None2189 self.parent_object_ = kwargs_.get('parent_object_')2190 self.ns_prefix_ = None2191 self.Row = _cast(int, Row)2192 self.Row_nsprefix_ = None2193 self.Axis1 = _cast(int, Axis1)2194 self.Axis1_nsprefix_ = None2195 self.Axis2 = _cast(int, Axis2)2196 self.Axis2_nsprefix_ = None2197 self.Axis3 = _cast(int, Axis3)2198 self.Axis3_nsprefix_ = None2199 self.Axis4 = _cast(int, Axis4)2200 self.Axis4_nsprefix_ = None2201 self.Col1 = Col12202 self.Col1_nsprefix_ = None2203 self.Col2 = Col22204 self.Col2_nsprefix_ = None2205 self.Col3 = Col32206 self.Col3_nsprefix_ = None2207 self.Col4 = Col42208 self.Col4_nsprefix_ = None2209 self.Col5 = Col52210 self.Col5_nsprefix_ = None2211 self.Col6 = Col62212 self.Col6_nsprefix_ = None2213 self.Col7 = Col72214 self.Col7_nsprefix_ = None2215 self.Col8 = Col82216 self.Col8_nsprefix_ = None2217 self.Col9 = Col92218 self.Col9_nsprefix_ = None2219 self.Col10 = Col102220 self.Col10_nsprefix_ = None2221 self.Col11 = Col112222 self.Col11_nsprefix_ = None2223 self.Col12 = Col122224 self.Col12_nsprefix_ = None2225 self.Col13 = Col132226 self.Col13_nsprefix_ = None2227 self.Col14 = Col142228 self.Col14_nsprefix_ = None2229 self.Col15 = Col152230 self.Col15_nsprefix_ = None2231 self.Col16 = Col162232 self.Col16_nsprefix_ = None2233 self.Col17 = Col172234 self.Col17_nsprefix_ = None2235 self.Col18 = Col182236 self.Col18_nsprefix_ = None2237 self.Col19 = Col192238 self.Col19_nsprefix_ = None2239 self.Col20 = Col202240 self.Col20_nsprefix_ = None2241 self.Col21 = Col212242 self.Col21_nsprefix_ = None2243 self.Col22 = Col222244 self.Col22_nsprefix_ = None2245 self.Col23 = Col232246 self.Col23_nsprefix_ = None2247 self.Col24 = Col242248 self.Col24_nsprefix_ = None2249 self.Col25 = Col252250 self.Col25_nsprefix_ = None2251 self.Col26 = Col262252 self.Col26_nsprefix_ = None2253 self.Col27 = Col272254 self.Col27_nsprefix_ = None2255 self.Col28 = Col282256 self.Col28_nsprefix_ = None2257 self.Col29 = Col292258 self.Col29_nsprefix_ = None2259 self.Col30 = Col302260 self.Col30_nsprefix_ = None2261 self.Col31 = Col312262 self.Col31_nsprefix_ = None2263 self.Col32 = Col322264 self.Col32_nsprefix_ = None2265 self.Col33 = Col332266 self.Col33_nsprefix_ = None2267 self.Col34 = Col342268 self.Col34_nsprefix_ = None2269 self.Col35 = Col352270 self.Col35_nsprefix_ = None2271 self.Col36 = Col362272 self.Col36_nsprefix_ = None2273 self.Col37 = Col372274 self.Col37_nsprefix_ = None2275 self.Col38 = Col382276 self.Col38_nsprefix_ = None2277 self.Col39 = Col392278 self.Col39_nsprefix_ = None2279 self.Col40 = Col402280 self.Col40_nsprefix_ = None2281 self.Col41 = Col412282 self.Col41_nsprefix_ = None2283 self.Col42 = Col422284 self.Col42_nsprefix_ = None2285 self.Col43 = Col432286 self.Col43_nsprefix_ = None2287 self.Col44 = Col442288 self.Col44_nsprefix_ = None2289 self.Col45 = Col452290 self.Col45_nsprefix_ = None2291 self.Col46 = Col462292 self.Col46_nsprefix_ = None2293 self.Col47 = Col472294 self.Col47_nsprefix_ = None2295 self.Col48 = Col482296 self.Col48_nsprefix_ = None2297 self.Col49 = Col492298 self.Col49_nsprefix_ = None2299 self.Col50 = Col502300 self.Col50_nsprefix_ = None2301 self.Col51 = Col512302 self.Col51_nsprefix_ = None2303 self.Col52 = Col522304 self.Col52_nsprefix_ = None2305 self.Col53 = Col532306 self.Col53_nsprefix_ = None2307 self.Col54 = Col542308 self.Col54_nsprefix_ = None2309 self.Col55 = Col552310 self.Col55_nsprefix_ = None2311 self.Col56 = Col562312 self.Col56_nsprefix_ = None2313 self.Col57 = Col572314 self.Col57_nsprefix_ = None2315 self.Col58 = Col582316 self.Col58_nsprefix_ = None2317 self.Col59 = Col592318 self.Col59_nsprefix_ = None2319 self.Col60 = Col602320 self.Col60_nsprefix_ = None2321 self.Col61 = Col612322 self.Col61_nsprefix_ = None2323 self.Col62 = Col622324 self.Col62_nsprefix_ = None2325 self.Col63 = Col632326 self.Col63_nsprefix_ = None2327 self.Col64 = Col642328 self.Col64_nsprefix_ = None2329 def factory(*args_, **kwargs_):2330 if CurrentSubclassModule_ is not None:2331 subclass = getSubclassFromModule_(2332 CurrentSubclassModule_, MDataType)2333 if subclass is not None:2334 return subclass(*args_, **kwargs_)2335 if MDataType.subclass:2336 return MDataType.subclass(*args_, **kwargs_)2337 else:2338 return MDataType(*args_, **kwargs_)2339 factory = staticmethod(factory)2340 def get_ns_prefix_(self):2341 return self.ns_prefix_2342 def set_ns_prefix_(self, ns_prefix):2343 self.ns_prefix_ = ns_prefix2344 def get_Col1(self):2345 return self.Col12346 def set_Col1(self, Col1):2347 self.Col1 = Col12348 def get_Col2(self):2349 return self.Col22350 def set_Col2(self, Col2):2351 self.Col2 = Col22352 def get_Col3(self):2353 return self.Col32354 def set_Col3(self, Col3):2355 self.Col3 = Col32356 def get_Col4(self):2357 return self.Col42358 def set_Col4(self, Col4):2359 self.Col4 = Col42360 def get_Col5(self):2361 return self.Col52362 def set_Col5(self, Col5):2363 self.Col5 = Col52364 def get_Col6(self):2365 return self.Col62366 def set_Col6(self, Col6):2367 self.Col6 = Col62368 def get_Col7(self):2369 return self.Col72370 def set_Col7(self, Col7):2371 self.Col7 = Col72372 def get_Col8(self):2373 return self.Col82374 def set_Col8(self, Col8):2375 self.Col8 = Col82376 def get_Col9(self):2377 return self.Col92378 def set_Col9(self, Col9):2379 self.Col9 = Col92380 def get_Col10(self):2381 return self.Col102382 def set_Col10(self, Col10):2383 self.Col10 = Col102384 def get_Col11(self):2385 return self.Col112386 def set_Col11(self, Col11):2387 self.Col11 = Col112388 def get_Col12(self):2389 return self.Col122390 def set_Col12(self, Col12):2391 self.Col12 = Col122392 def get_Col13(self):2393 return self.Col132394 def set_Col13(self, Col13):2395 self.Col13 = Col132396 def get_Col14(self):2397 return self.Col142398 def set_Col14(self, Col14):2399 self.Col14 = Col142400 def get_Col15(self):2401 return self.Col152402 def set_Col15(self, Col15):2403 self.Col15 = Col152404 def get_Col16(self):2405 return self.Col162406 def set_Col16(self, Col16):2407 self.Col16 = Col162408 def get_Col17(self):2409 return self.Col172410 def set_Col17(self, Col17):2411 self.Col17 = Col172412 def get_Col18(self):2413 return self.Col182414 def set_Col18(self, Col18):2415 self.Col18 = Col182416 def get_Col19(self):2417 return self.Col192418 def set_Col19(self, Col19):2419 self.Col19 = Col192420 def get_Col20(self):2421 return self.Col202422 def set_Col20(self, Col20):2423 self.Col20 = Col202424 def get_Col21(self):2425 return self.Col212426 def set_Col21(self, Col21):2427 self.Col21 = Col212428 def get_Col22(self):2429 return self.Col222430 def set_Col22(self, Col22):2431 self.Col22 = Col222432 def get_Col23(self):2433 return self.Col232434 def set_Col23(self, Col23):2435 self.Col23 = Col232436 def get_Col24(self):2437 return self.Col242438 def set_Col24(self, Col24):2439 self.Col24 = Col242440 def get_Col25(self):2441 return self.Col252442 def set_Col25(self, Col25):2443 self.Col25 = Col252444 def get_Col26(self):2445 return self.Col262446 def set_Col26(self, Col26):2447 self.Col26 = Col262448 def get_Col27(self):2449 return self.Col272450 def set_Col27(self, Col27):2451 self.Col27 = Col272452 def get_Col28(self):2453 return self.Col282454 def set_Col28(self, Col28):2455 self.Col28 = Col282456 def get_Col29(self):2457 return self.Col292458 def set_Col29(self, Col29):2459 self.Col29 = Col292460 def get_Col30(self):2461 return self.Col302462 def set_Col30(self, Col30):2463 self.Col30 = Col302464 def get_Col31(self):2465 return self.Col312466 def set_Col31(self, Col31):2467 self.Col31 = Col312468 def get_Col32(self):2469 return self.Col322470 def set_Col32(self, Col32):2471 self.Col32 = Col322472 def get_Col33(self):2473 return self.Col332474 def set_Col33(self, Col33):2475 self.Col33 = Col332476 def get_Col34(self):2477 return self.Col342478 def set_Col34(self, Col34):2479 self.Col34 = Col342480 def get_Col35(self):2481 return self.Col352482 def set_Col35(self, Col35):2483 self.Col35 = Col352484 def get_Col36(self):2485 return self.Col362486 def set_Col36(self, Col36):2487 self.Col36 = Col362488 def get_Col37(self):2489 return self.Col372490 def set_Col37(self, Col37):2491 self.Col37 = Col372492 def get_Col38(self):2493 return self.Col382494 def set_Col38(self, Col38):2495 self.Col38 = Col382496 def get_Col39(self):2497 return self.Col392498 def set_Col39(self, Col39):2499 self.Col39 = Col392500 def get_Col40(self):2501 return self.Col402502 def set_Col40(self, Col40):2503 self.Col40 = Col402504 def get_Col41(self):2505 return self.Col412506 def set_Col41(self, Col41):2507 self.Col41 = Col412508 def get_Col42(self):2509 return self.Col422510 def set_Col42(self, Col42):2511 self.Col42 = Col422512 def get_Col43(self):2513 return self.Col432514 def set_Col43(self, Col43):2515 self.Col43 = Col432516 def get_Col44(self):2517 return self.Col442518 def set_Col44(self, Col44):2519 self.Col44 = Col442520 def get_Col45(self):2521 return self.Col452522 def set_Col45(self, Col45):2523 self.Col45 = Col452524 def get_Col46(self):2525 return self.Col462526 def set_Col46(self, Col46):2527 self.Col46 = Col462528 def get_Col47(self):2529 return self.Col472530 def set_Col47(self, Col47):2531 self.Col47 = Col472532 def get_Col48(self):2533 return self.Col482534 def set_Col48(self, Col48):2535 self.Col48 = Col482536 def get_Col49(self):2537 return self.Col492538 def set_Col49(self, Col49):2539 self.Col49 = Col492540 def get_Col50(self):2541 return self.Col502542 def set_Col50(self, Col50):2543 self.Col50 = Col502544 def get_Col51(self):2545 return self.Col512546 def set_Col51(self, Col51):2547 self.Col51 = Col512548 def get_Col52(self):2549 return self.Col522550 def set_Col52(self, Col52):2551 self.Col52 = Col522552 def get_Col53(self):2553 return self.Col532554 def set_Col53(self, Col53):2555 self.Col53 = Col532556 def get_Col54(self):2557 return self.Col542558 def set_Col54(self, Col54):2559 self.Col54 = Col542560 def get_Col55(self):2561 return self.Col552562 def set_Col55(self, Col55):2563 self.Col55 = Col552564 def get_Col56(self):2565 return self.Col562566 def set_Col56(self, Col56):2567 self.Col56 = Col562568 def get_Col57(self):2569 return self.Col572570 def set_Col57(self, Col57):2571 self.Col57 = Col572572 def get_Col58(self):2573 return self.Col582574 def set_Col58(self, Col58):2575 self.Col58 = Col582576 def get_Col59(self):2577 return self.Col592578 def set_Col59(self, Col59):2579 self.Col59 = Col592580 def get_Col60(self):2581 return self.Col602582 def set_Col60(self, Col60):2583 self.Col60 = Col602584 def get_Col61(self):2585 return self.Col612586 def set_Col61(self, Col61):2587 self.Col61 = Col612588 def get_Col62(self):2589 return self.Col622590 def set_Col62(self, Col62):2591 self.Col62 = Col622592 def get_Col63(self):2593 return self.Col632594 def set_Col63(self, Col63):2595 self.Col63 = Col632596 def get_Col64(self):2597 return self.Col642598 def set_Col64(self, Col64):2599 self.Col64 = Col642600 def get_Row(self):2601 return self.Row2602 def set_Row(self, Row):2603 self.Row = Row2604 def get_Axis1(self):2605 return self.Axis12606 def set_Axis1(self, Axis1):2607 self.Axis1 = Axis12608 def get_Axis2(self):2609 return self.Axis22610 def set_Axis2(self, Axis2):2611 self.Axis2 = Axis22612 def get_Axis3(self):2613 return self.Axis32614 def set_Axis3(self, Axis3):2615 self.Axis3 = Axis32616 def get_Axis4(self):2617 return self.Axis42618 def set_Axis4(self, Axis4):2619 self.Axis4 = Axis42620 def _hasContent(self):2621 if (2622 self.Col1 is not None or2623 self.Col2 is not None or2624 self.Col3 is not None or2625 self.Col4 is not None or2626 self.Col5 is not None or2627 self.Col6 is not None or2628 self.Col7 is not None or2629 self.Col8 is not None or2630 self.Col9 is not None or2631 self.Col10 is not None or2632 self.Col11 is not None or2633 self.Col12 is not None or2634 self.Col13 is not None or2635 self.Col14 is not None or2636 self.Col15 is not None or2637 self.Col16 is not None or2638 self.Col17 is not None or2639 self.Col18 is not None or2640 self.Col19 is not None or2641 self.Col20 is not None or2642 self.Col21 is not None or2643 self.Col22 is not None or2644 self.Col23 is not None or2645 self.Col24 is not None or2646 self.Col25 is not None or2647 self.Col26 is not None or2648 self.Col27 is not None or2649 self.Col28 is not None or2650 self.Col29 is not None or2651 self.Col30 is not None or2652 self.Col31 is not None or2653 self.Col32 is not None or2654 self.Col33 is not None or2655 self.Col34 is not None or2656 self.Col35 is not None or2657 self.Col36 is not None or2658 self.Col37 is not None or2659 self.Col38 is not None or2660 self.Col39 is not None or2661 self.Col40 is not None or2662 self.Col41 is not None or2663 self.Col42 is not None or2664 self.Col43 is not None or2665 self.Col44 is not None or2666 self.Col45 is not None or2667 self.Col46 is not None or2668 self.Col47 is not None or2669 self.Col48 is not None or2670 self.Col49 is not None or2671 self.Col50 is not None or2672 self.Col51 is not None or2673 self.Col52 is not None or2674 self.Col53 is not None or2675 self.Col54 is not None or2676 self.Col55 is not None or2677 self.Col56 is not None or2678 self.Col57 is not None or2679 self.Col58 is not None or2680 self.Col59 is not None or2681 self.Col60 is not None or2682 self.Col61 is not None or2683 self.Col62 is not None or2684 self.Col63 is not None or2685 self.Col64 is not None2686 ):2687 return True2688 else:2689 return False2690 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='MDataType', pretty_print=True):2691 imported_ns_def_ = GenerateDSNamespaceDefs_.get('MDataType')2692 if imported_ns_def_ is not None:2693 namespacedef_ = imported_ns_def_2694 if pretty_print:2695 eol_ = '\n'2696 else:2697 eol_ = ''2698 if self.original_tagname_ is not None and name_ == 'MDataType':2699 name_ = self.original_tagname_2700 if UseCapturedNS_ and self.ns_prefix_:2701 namespaceprefix_ = self.ns_prefix_ + ':'2702 showIndent(outfile, level, pretty_print)2703 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2704 already_processed = set()2705 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MDataType')2706 if self._hasContent():2707 outfile.write('>%s' % (eol_, ))2708 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='MDataType', pretty_print=pretty_print)2709 showIndent(outfile, level, pretty_print)2710 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))2711 else:2712 outfile.write('/>%s' % (eol_, ))2713 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='MDataType'):2714 if self.Row is not None and 'Row' not in already_processed:2715 already_processed.add('Row')2716 outfile.write(' Row="%s"' % self.gds_format_integer(self.Row, input_name='Row'))2717 if self.Axis1 is not None and 'Axis1' not in already_processed:2718 already_processed.add('Axis1')2719 outfile.write(' Axis1="%s"' % self.gds_format_integer(self.Axis1, input_name='Axis1'))2720 if self.Axis2 is not None and 'Axis2' not in already_processed:2721 already_processed.add('Axis2')2722 outfile.write(' Axis2="%s"' % self.gds_format_integer(self.Axis2, input_name='Axis2'))2723 if self.Axis3 is not None and 'Axis3' not in already_processed:2724 already_processed.add('Axis3')2725 outfile.write(' Axis3="%s"' % self.gds_format_integer(self.Axis3, input_name='Axis3'))2726 if self.Axis4 is not None and 'Axis4' not in already_processed:2727 already_processed.add('Axis4')2728 outfile.write(' Axis4="%s"' % self.gds_format_integer(self.Axis4, input_name='Axis4'))2729 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='MDataType', fromsubclass_=False, pretty_print=True):2730 if pretty_print:2731 eol_ = '\n'2732 else:2733 eol_ = ''2734 if self.Col1 is not None:2735 namespaceprefix_ = self.Col1_nsprefix_ + ':' if (UseCapturedNS_ and self.Col1_nsprefix_) else ''2736 showIndent(outfile, level, pretty_print)2737 outfile.write('<%sCol1>%s</%sCol1>%s' % (namespaceprefix_ , self.gds_format_double(self.Col1, input_name='Col1'), namespaceprefix_ , eol_))2738 if self.Col2 is not None:2739 namespaceprefix_ = self.Col2_nsprefix_ + ':' if (UseCapturedNS_ and self.Col2_nsprefix_) else ''2740 showIndent(outfile, level, pretty_print)2741 outfile.write('<%sCol2>%s</%sCol2>%s' % (namespaceprefix_ , self.gds_format_double(self.Col2, input_name='Col2'), namespaceprefix_ , eol_))2742 if self.Col3 is not None:2743 namespaceprefix_ = self.Col3_nsprefix_ + ':' if (UseCapturedNS_ and self.Col3_nsprefix_) else ''2744 showIndent(outfile, level, pretty_print)2745 outfile.write('<%sCol3>%s</%sCol3>%s' % (namespaceprefix_ , self.gds_format_double(self.Col3, input_name='Col3'), namespaceprefix_ , eol_))2746 if self.Col4 is not None:2747 namespaceprefix_ = self.Col4_nsprefix_ + ':' if (UseCapturedNS_ and self.Col4_nsprefix_) else ''2748 showIndent(outfile, level, pretty_print)2749 outfile.write('<%sCol4>%s</%sCol4>%s' % (namespaceprefix_ , self.gds_format_double(self.Col4, input_name='Col4'), namespaceprefix_ , eol_))2750 if self.Col5 is not None:2751 namespaceprefix_ = self.Col5_nsprefix_ + ':' if (UseCapturedNS_ and self.Col5_nsprefix_) else ''2752 showIndent(outfile, level, pretty_print)2753 outfile.write('<%sCol5>%s</%sCol5>%s' % (namespaceprefix_ , self.gds_format_double(self.Col5, input_name='Col5'), namespaceprefix_ , eol_))2754 if self.Col6 is not None:2755 namespaceprefix_ = self.Col6_nsprefix_ + ':' if (UseCapturedNS_ and self.Col6_nsprefix_) else ''2756 showIndent(outfile, level, pretty_print)2757 outfile.write('<%sCol6>%s</%sCol6>%s' % (namespaceprefix_ , self.gds_format_double(self.Col6, input_name='Col6'), namespaceprefix_ , eol_))2758 if self.Col7 is not None:2759 namespaceprefix_ = self.Col7_nsprefix_ + ':' if (UseCapturedNS_ and self.Col7_nsprefix_) else ''2760 showIndent(outfile, level, pretty_print)2761 outfile.write('<%sCol7>%s</%sCol7>%s' % (namespaceprefix_ , self.gds_format_double(self.Col7, input_name='Col7'), namespaceprefix_ , eol_))2762 if self.Col8 is not None:2763 namespaceprefix_ = self.Col8_nsprefix_ + ':' if (UseCapturedNS_ and self.Col8_nsprefix_) else ''2764 showIndent(outfile, level, pretty_print)2765 outfile.write('<%sCol8>%s</%sCol8>%s' % (namespaceprefix_ , self.gds_format_double(self.Col8, input_name='Col8'), namespaceprefix_ , eol_))2766 if self.Col9 is not None:2767 namespaceprefix_ = self.Col9_nsprefix_ + ':' if (UseCapturedNS_ and self.Col9_nsprefix_) else ''2768 showIndent(outfile, level, pretty_print)2769 outfile.write('<%sCol9>%s</%sCol9>%s' % (namespaceprefix_ , self.gds_format_double(self.Col9, input_name='Col9'), namespaceprefix_ , eol_))2770 if self.Col10 is not None:2771 namespaceprefix_ = self.Col10_nsprefix_ + ':' if (UseCapturedNS_ and self.Col10_nsprefix_) else ''2772 showIndent(outfile, level, pretty_print)2773 outfile.write('<%sCol10>%s</%sCol10>%s' % (namespaceprefix_ , self.gds_format_double(self.Col10, input_name='Col10'), namespaceprefix_ , eol_))2774 if self.Col11 is not None:2775 namespaceprefix_ = self.Col11_nsprefix_ + ':' if (UseCapturedNS_ and self.Col11_nsprefix_) else ''2776 showIndent(outfile, level, pretty_print)2777 outfile.write('<%sCol11>%s</%sCol11>%s' % (namespaceprefix_ , self.gds_format_double(self.Col11, input_name='Col11'), namespaceprefix_ , eol_))2778 if self.Col12 is not None:2779 namespaceprefix_ = self.Col12_nsprefix_ + ':' if (UseCapturedNS_ and self.Col12_nsprefix_) else ''2780 showIndent(outfile, level, pretty_print)2781 outfile.write('<%sCol12>%s</%sCol12>%s' % (namespaceprefix_ , self.gds_format_double(self.Col12, input_name='Col12'), namespaceprefix_ , eol_))2782 if self.Col13 is not None:2783 namespaceprefix_ = self.Col13_nsprefix_ + ':' if (UseCapturedNS_ and self.Col13_nsprefix_) else ''2784 showIndent(outfile, level, pretty_print)2785 outfile.write('<%sCol13>%s</%sCol13>%s' % (namespaceprefix_ , self.gds_format_double(self.Col13, input_name='Col13'), namespaceprefix_ , eol_))2786 if self.Col14 is not None:2787 namespaceprefix_ = self.Col14_nsprefix_ + ':' if (UseCapturedNS_ and self.Col14_nsprefix_) else ''2788 showIndent(outfile, level, pretty_print)2789 outfile.write('<%sCol14>%s</%sCol14>%s' % (namespaceprefix_ , self.gds_format_double(self.Col14, input_name='Col14'), namespaceprefix_ , eol_))2790 if self.Col15 is not None:2791 namespaceprefix_ = self.Col15_nsprefix_ + ':' if (UseCapturedNS_ and self.Col15_nsprefix_) else ''2792 showIndent(outfile, level, pretty_print)2793 outfile.write('<%sCol15>%s</%sCol15>%s' % (namespaceprefix_ , self.gds_format_double(self.Col15, input_name='Col15'), namespaceprefix_ , eol_))2794 if self.Col16 is not None:2795 namespaceprefix_ = self.Col16_nsprefix_ + ':' if (UseCapturedNS_ and self.Col16_nsprefix_) else ''2796 showIndent(outfile, level, pretty_print)2797 outfile.write('<%sCol16>%s</%sCol16>%s' % (namespaceprefix_ , self.gds_format_double(self.Col16, input_name='Col16'), namespaceprefix_ , eol_))2798 if self.Col17 is not None:2799 namespaceprefix_ = self.Col17_nsprefix_ + ':' if (UseCapturedNS_ and self.Col17_nsprefix_) else ''2800 showIndent(outfile, level, pretty_print)2801 outfile.write('<%sCol17>%s</%sCol17>%s' % (namespaceprefix_ , self.gds_format_double(self.Col17, input_name='Col17'), namespaceprefix_ , eol_))2802 if self.Col18 is not None:2803 namespaceprefix_ = self.Col18_nsprefix_ + ':' if (UseCapturedNS_ and self.Col18_nsprefix_) else ''2804 showIndent(outfile, level, pretty_print)2805 outfile.write('<%sCol18>%s</%sCol18>%s' % (namespaceprefix_ , self.gds_format_double(self.Col18, input_name='Col18'), namespaceprefix_ , eol_))2806 if self.Col19 is not None:2807 namespaceprefix_ = self.Col19_nsprefix_ + ':' if (UseCapturedNS_ and self.Col19_nsprefix_) else ''2808 showIndent(outfile, level, pretty_print)2809 outfile.write('<%sCol19>%s</%sCol19>%s' % (namespaceprefix_ , self.gds_format_double(self.Col19, input_name='Col19'), namespaceprefix_ , eol_))2810 if self.Col20 is not None:2811 namespaceprefix_ = self.Col20_nsprefix_ + ':' if (UseCapturedNS_ and self.Col20_nsprefix_) else ''2812 showIndent(outfile, level, pretty_print)2813 outfile.write('<%sCol20>%s</%sCol20>%s' % (namespaceprefix_ , self.gds_format_double(self.Col20, input_name='Col20'), namespaceprefix_ , eol_))2814 if self.Col21 is not None:2815 namespaceprefix_ = self.Col21_nsprefix_ + ':' if (UseCapturedNS_ and self.Col21_nsprefix_) else ''2816 showIndent(outfile, level, pretty_print)2817 outfile.write('<%sCol21>%s</%sCol21>%s' % (namespaceprefix_ , self.gds_format_double(self.Col21, input_name='Col21'), namespaceprefix_ , eol_))2818 if self.Col22 is not None:2819 namespaceprefix_ = self.Col22_nsprefix_ + ':' if (UseCapturedNS_ and self.Col22_nsprefix_) else ''2820 showIndent(outfile, level, pretty_print)2821 outfile.write('<%sCol22>%s</%sCol22>%s' % (namespaceprefix_ , self.gds_format_double(self.Col22, input_name='Col22'), namespaceprefix_ , eol_))2822 if self.Col23 is not None:2823 namespaceprefix_ = self.Col23_nsprefix_ + ':' if (UseCapturedNS_ and self.Col23_nsprefix_) else ''2824 showIndent(outfile, level, pretty_print)2825 outfile.write('<%sCol23>%s</%sCol23>%s' % (namespaceprefix_ , self.gds_format_double(self.Col23, input_name='Col23'), namespaceprefix_ , eol_))2826 if self.Col24 is not None:2827 namespaceprefix_ = self.Col24_nsprefix_ + ':' if (UseCapturedNS_ and self.Col24_nsprefix_) else ''2828 showIndent(outfile, level, pretty_print)2829 outfile.write('<%sCol24>%s</%sCol24>%s' % (namespaceprefix_ , self.gds_format_double(self.Col24, input_name='Col24'), namespaceprefix_ , eol_))2830 if self.Col25 is not None:2831 namespaceprefix_ = self.Col25_nsprefix_ + ':' if (UseCapturedNS_ and self.Col25_nsprefix_) else ''2832 showIndent(outfile, level, pretty_print)2833 outfile.write('<%sCol25>%s</%sCol25>%s' % (namespaceprefix_ , self.gds_format_double(self.Col25, input_name='Col25'), namespaceprefix_ , eol_))2834 if self.Col26 is not None:2835 namespaceprefix_ = self.Col26_nsprefix_ + ':' if (UseCapturedNS_ and self.Col26_nsprefix_) else ''2836 showIndent(outfile, level, pretty_print)2837 outfile.write('<%sCol26>%s</%sCol26>%s' % (namespaceprefix_ , self.gds_format_double(self.Col26, input_name='Col26'), namespaceprefix_ , eol_))2838 if self.Col27 is not None:2839 namespaceprefix_ = self.Col27_nsprefix_ + ':' if (UseCapturedNS_ and self.Col27_nsprefix_) else ''2840 showIndent(outfile, level, pretty_print)2841 outfile.write('<%sCol27>%s</%sCol27>%s' % (namespaceprefix_ , self.gds_format_double(self.Col27, input_name='Col27'), namespaceprefix_ , eol_))2842 if self.Col28 is not None:2843 namespaceprefix_ = self.Col28_nsprefix_ + ':' if (UseCapturedNS_ and self.Col28_nsprefix_) else ''2844 showIndent(outfile, level, pretty_print)2845 outfile.write('<%sCol28>%s</%sCol28>%s' % (namespaceprefix_ , self.gds_format_double(self.Col28, input_name='Col28'), namespaceprefix_ , eol_))2846 if self.Col29 is not None:2847 namespaceprefix_ = self.Col29_nsprefix_ + ':' if (UseCapturedNS_ and self.Col29_nsprefix_) else ''2848 showIndent(outfile, level, pretty_print)2849 outfile.write('<%sCol29>%s</%sCol29>%s' % (namespaceprefix_ , self.gds_format_double(self.Col29, input_name='Col29'), namespaceprefix_ , eol_))2850 if self.Col30 is not None:2851 namespaceprefix_ = self.Col30_nsprefix_ + ':' if (UseCapturedNS_ and self.Col30_nsprefix_) else ''2852 showIndent(outfile, level, pretty_print)2853 outfile.write('<%sCol30>%s</%sCol30>%s' % (namespaceprefix_ , self.gds_format_double(self.Col30, input_name='Col30'), namespaceprefix_ , eol_))2854 if self.Col31 is not None:2855 namespaceprefix_ = self.Col31_nsprefix_ + ':' if (UseCapturedNS_ and self.Col31_nsprefix_) else ''2856 showIndent(outfile, level, pretty_print)2857 outfile.write('<%sCol31>%s</%sCol31>%s' % (namespaceprefix_ , self.gds_format_double(self.Col31, input_name='Col31'), namespaceprefix_ , eol_))2858 if self.Col32 is not None:2859 namespaceprefix_ = self.Col32_nsprefix_ + ':' if (UseCapturedNS_ and self.Col32_nsprefix_) else ''2860 showIndent(outfile, level, pretty_print)2861 outfile.write('<%sCol32>%s</%sCol32>%s' % (namespaceprefix_ , self.gds_format_double(self.Col32, input_name='Col32'), namespaceprefix_ , eol_))2862 if self.Col33 is not None:2863 namespaceprefix_ = self.Col33_nsprefix_ + ':' if (UseCapturedNS_ and self.Col33_nsprefix_) else ''2864 showIndent(outfile, level, pretty_print)2865 outfile.write('<%sCol33>%s</%sCol33>%s' % (namespaceprefix_ , self.gds_format_double(self.Col33, input_name='Col33'), namespaceprefix_ , eol_))2866 if self.Col34 is not None:2867 namespaceprefix_ = self.Col34_nsprefix_ + ':' if (UseCapturedNS_ and self.Col34_nsprefix_) else ''2868 showIndent(outfile, level, pretty_print)2869 outfile.write('<%sCol34>%s</%sCol34>%s' % (namespaceprefix_ , self.gds_format_double(self.Col34, input_name='Col34'), namespaceprefix_ , eol_))2870 if self.Col35 is not None:2871 namespaceprefix_ = self.Col35_nsprefix_ + ':' if (UseCapturedNS_ and self.Col35_nsprefix_) else ''2872 showIndent(outfile, level, pretty_print)2873 outfile.write('<%sCol35>%s</%sCol35>%s' % (namespaceprefix_ , self.gds_format_double(self.Col35, input_name='Col35'), namespaceprefix_ , eol_))2874 if self.Col36 is not None:2875 namespaceprefix_ = self.Col36_nsprefix_ + ':' if (UseCapturedNS_ and self.Col36_nsprefix_) else ''2876 showIndent(outfile, level, pretty_print)2877 outfile.write('<%sCol36>%s</%sCol36>%s' % (namespaceprefix_ , self.gds_format_double(self.Col36, input_name='Col36'), namespaceprefix_ , eol_))2878 if self.Col37 is not None:2879 namespaceprefix_ = self.Col37_nsprefix_ + ':' if (UseCapturedNS_ and self.Col37_nsprefix_) else ''2880 showIndent(outfile, level, pretty_print)2881 outfile.write('<%sCol37>%s</%sCol37>%s' % (namespaceprefix_ , self.gds_format_double(self.Col37, input_name='Col37'), namespaceprefix_ , eol_))2882 if self.Col38 is not None:2883 namespaceprefix_ = self.Col38_nsprefix_ + ':' if (UseCapturedNS_ and self.Col38_nsprefix_) else ''2884 showIndent(outfile, level, pretty_print)2885 outfile.write('<%sCol38>%s</%sCol38>%s' % (namespaceprefix_ , self.gds_format_double(self.Col38, input_name='Col38'), namespaceprefix_ , eol_))2886 if self.Col39 is not None:2887 namespaceprefix_ = self.Col39_nsprefix_ + ':' if (UseCapturedNS_ and self.Col39_nsprefix_) else ''2888 showIndent(outfile, level, pretty_print)2889 outfile.write('<%sCol39>%s</%sCol39>%s' % (namespaceprefix_ , self.gds_format_double(self.Col39, input_name='Col39'), namespaceprefix_ , eol_))2890 if self.Col40 is not None:2891 namespaceprefix_ = self.Col40_nsprefix_ + ':' if (UseCapturedNS_ and self.Col40_nsprefix_) else ''2892 showIndent(outfile, level, pretty_print)2893 outfile.write('<%sCol40>%s</%sCol40>%s' % (namespaceprefix_ , self.gds_format_double(self.Col40, input_name='Col40'), namespaceprefix_ , eol_))2894 if self.Col41 is not None:2895 namespaceprefix_ = self.Col41_nsprefix_ + ':' if (UseCapturedNS_ and self.Col41_nsprefix_) else ''2896 showIndent(outfile, level, pretty_print)2897 outfile.write('<%sCol41>%s</%sCol41>%s' % (namespaceprefix_ , self.gds_format_double(self.Col41, input_name='Col41'), namespaceprefix_ , eol_))2898 if self.Col42 is not None:2899 namespaceprefix_ = self.Col42_nsprefix_ + ':' if (UseCapturedNS_ and self.Col42_nsprefix_) else ''2900 showIndent(outfile, level, pretty_print)2901 outfile.write('<%sCol42>%s</%sCol42>%s' % (namespaceprefix_ , self.gds_format_double(self.Col42, input_name='Col42'), namespaceprefix_ , eol_))2902 if self.Col43 is not None:2903 namespaceprefix_ = self.Col43_nsprefix_ + ':' if (UseCapturedNS_ and self.Col43_nsprefix_) else ''2904 showIndent(outfile, level, pretty_print)2905 outfile.write('<%sCol43>%s</%sCol43>%s' % (namespaceprefix_ , self.gds_format_double(self.Col43, input_name='Col43'), namespaceprefix_ , eol_))2906 if self.Col44 is not None:2907 namespaceprefix_ = self.Col44_nsprefix_ + ':' if (UseCapturedNS_ and self.Col44_nsprefix_) else ''2908 showIndent(outfile, level, pretty_print)2909 outfile.write('<%sCol44>%s</%sCol44>%s' % (namespaceprefix_ , self.gds_format_double(self.Col44, input_name='Col44'), namespaceprefix_ , eol_))2910 if self.Col45 is not None:2911 namespaceprefix_ = self.Col45_nsprefix_ + ':' if (UseCapturedNS_ and self.Col45_nsprefix_) else ''2912 showIndent(outfile, level, pretty_print)2913 outfile.write('<%sCol45>%s</%sCol45>%s' % (namespaceprefix_ , self.gds_format_double(self.Col45, input_name='Col45'), namespaceprefix_ , eol_))2914 if self.Col46 is not None:2915 namespaceprefix_ = self.Col46_nsprefix_ + ':' if (UseCapturedNS_ and self.Col46_nsprefix_) else ''2916 showIndent(outfile, level, pretty_print)2917 outfile.write('<%sCol46>%s</%sCol46>%s' % (namespaceprefix_ , self.gds_format_double(self.Col46, input_name='Col46'), namespaceprefix_ , eol_))2918 if self.Col47 is not None:2919 namespaceprefix_ = self.Col47_nsprefix_ + ':' if (UseCapturedNS_ and self.Col47_nsprefix_) else ''2920 showIndent(outfile, level, pretty_print)2921 outfile.write('<%sCol47>%s</%sCol47>%s' % (namespaceprefix_ , self.gds_format_double(self.Col47, input_name='Col47'), namespaceprefix_ , eol_))2922 if self.Col48 is not None:2923 namespaceprefix_ = self.Col48_nsprefix_ + ':' if (UseCapturedNS_ and self.Col48_nsprefix_) else ''2924 showIndent(outfile, level, pretty_print)2925 outfile.write('<%sCol48>%s</%sCol48>%s' % (namespaceprefix_ , self.gds_format_double(self.Col48, input_name='Col48'), namespaceprefix_ , eol_))2926 if self.Col49 is not None:2927 namespaceprefix_ = self.Col49_nsprefix_ + ':' if (UseCapturedNS_ and self.Col49_nsprefix_) else ''2928 showIndent(outfile, level, pretty_print)2929 outfile.write('<%sCol49>%s</%sCol49>%s' % (namespaceprefix_ , self.gds_format_double(self.Col49, input_name='Col49'), namespaceprefix_ , eol_))2930 if self.Col50 is not None:2931 namespaceprefix_ = self.Col50_nsprefix_ + ':' if (UseCapturedNS_ and self.Col50_nsprefix_) else ''2932 showIndent(outfile, level, pretty_print)2933 outfile.write('<%sCol50>%s</%sCol50>%s' % (namespaceprefix_ , self.gds_format_double(self.Col50, input_name='Col50'), namespaceprefix_ , eol_))2934 if self.Col51 is not None:2935 namespaceprefix_ = self.Col51_nsprefix_ + ':' if (UseCapturedNS_ and self.Col51_nsprefix_) else ''2936 showIndent(outfile, level, pretty_print)2937 outfile.write('<%sCol51>%s</%sCol51>%s' % (namespaceprefix_ , self.gds_format_double(self.Col51, input_name='Col51'), namespaceprefix_ , eol_))2938 if self.Col52 is not None:2939 namespaceprefix_ = self.Col52_nsprefix_ + ':' if (UseCapturedNS_ and self.Col52_nsprefix_) else ''2940 showIndent(outfile, level, pretty_print)2941 outfile.write('<%sCol52>%s</%sCol52>%s' % (namespaceprefix_ , self.gds_format_double(self.Col52, input_name='Col52'), namespaceprefix_ , eol_))2942 if self.Col53 is not None:2943 namespaceprefix_ = self.Col53_nsprefix_ + ':' if (UseCapturedNS_ and self.Col53_nsprefix_) else ''2944 showIndent(outfile, level, pretty_print)2945 outfile.write('<%sCol53>%s</%sCol53>%s' % (namespaceprefix_ , self.gds_format_double(self.Col53, input_name='Col53'), namespaceprefix_ , eol_))2946 if self.Col54 is not None:2947 namespaceprefix_ = self.Col54_nsprefix_ + ':' if (UseCapturedNS_ and self.Col54_nsprefix_) else ''2948 showIndent(outfile, level, pretty_print)2949 outfile.write('<%sCol54>%s</%sCol54>%s' % (namespaceprefix_ , self.gds_format_double(self.Col54, input_name='Col54'), namespaceprefix_ , eol_))2950 if self.Col55 is not None:2951 namespaceprefix_ = self.Col55_nsprefix_ + ':' if (UseCapturedNS_ and self.Col55_nsprefix_) else ''2952 showIndent(outfile, level, pretty_print)2953 outfile.write('<%sCol55>%s</%sCol55>%s' % (namespaceprefix_ , self.gds_format_double(self.Col55, input_name='Col55'), namespaceprefix_ , eol_))2954 if self.Col56 is not None:2955 namespaceprefix_ = self.Col56_nsprefix_ + ':' if (UseCapturedNS_ and self.Col56_nsprefix_) else ''2956 showIndent(outfile, level, pretty_print)2957 outfile.write('<%sCol56>%s</%sCol56>%s' % (namespaceprefix_ , self.gds_format_double(self.Col56, input_name='Col56'), namespaceprefix_ , eol_))2958 if self.Col57 is not None:2959 namespaceprefix_ = self.Col57_nsprefix_ + ':' if (UseCapturedNS_ and self.Col57_nsprefix_) else ''2960 showIndent(outfile, level, pretty_print)2961 outfile.write('<%sCol57>%s</%sCol57>%s' % (namespaceprefix_ , self.gds_format_double(self.Col57, input_name='Col57'), namespaceprefix_ , eol_))2962 if self.Col58 is not None:2963 namespaceprefix_ = self.Col58_nsprefix_ + ':' if (UseCapturedNS_ and self.Col58_nsprefix_) else ''2964 showIndent(outfile, level, pretty_print)2965 outfile.write('<%sCol58>%s</%sCol58>%s' % (namespaceprefix_ , self.gds_format_double(self.Col58, input_name='Col58'), namespaceprefix_ , eol_))2966 if self.Col59 is not None:2967 namespaceprefix_ = self.Col59_nsprefix_ + ':' if (UseCapturedNS_ and self.Col59_nsprefix_) else ''2968 showIndent(outfile, level, pretty_print)2969 outfile.write('<%sCol59>%s</%sCol59>%s' % (namespaceprefix_ , self.gds_format_double(self.Col59, input_name='Col59'), namespaceprefix_ , eol_))2970 if self.Col60 is not None:2971 namespaceprefix_ = self.Col60_nsprefix_ + ':' if (UseCapturedNS_ and self.Col60_nsprefix_) else ''2972 showIndent(outfile, level, pretty_print)2973 outfile.write('<%sCol60>%s</%sCol60>%s' % (namespaceprefix_ , self.gds_format_double(self.Col60, input_name='Col60'), namespaceprefix_ , eol_))2974 if self.Col61 is not None:2975 namespaceprefix_ = self.Col61_nsprefix_ + ':' if (UseCapturedNS_ and self.Col61_nsprefix_) else ''2976 showIndent(outfile, level, pretty_print)2977 outfile.write('<%sCol61>%s</%sCol61>%s' % (namespaceprefix_ , self.gds_format_double(self.Col61, input_name='Col61'), namespaceprefix_ , eol_))2978 if self.Col62 is not None:2979 namespaceprefix_ = self.Col62_nsprefix_ + ':' if (UseCapturedNS_ and self.Col62_nsprefix_) else ''2980 showIndent(outfile, level, pretty_print)2981 outfile.write('<%sCol62>%s</%sCol62>%s' % (namespaceprefix_ , self.gds_format_double(self.Col62, input_name='Col62'), namespaceprefix_ , eol_))2982 if self.Col63 is not None:2983 namespaceprefix_ = self.Col63_nsprefix_ + ':' if (UseCapturedNS_ and self.Col63_nsprefix_) else ''2984 showIndent(outfile, level, pretty_print)2985 outfile.write('<%sCol63>%s</%sCol63>%s' % (namespaceprefix_ , self.gds_format_double(self.Col63, input_name='Col63'), namespaceprefix_ , eol_))2986 if self.Col64 is not None:2987 namespaceprefix_ = self.Col64_nsprefix_ + ':' if (UseCapturedNS_ and self.Col64_nsprefix_) else ''2988 showIndent(outfile, level, pretty_print)2989 outfile.write('<%sCol64>%s</%sCol64>%s' % (namespaceprefix_ , self.gds_format_double(self.Col64, input_name='Col64'), namespaceprefix_ , eol_))2990 def to_etree(self, parent_element=None, name_='MDataType', mapping_=None, reverse_mapping_=None, nsmap_=None):2991 if parent_element is None:2992 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)2993 else:2994 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)2995 if self.Row is not None:2996 element.set('Row', self.gds_format_integer(self.Row))2997 if self.Axis1 is not None:2998 element.set('Axis1', self.gds_format_integer(self.Axis1))2999 if self.Axis2 is not None:3000 element.set('Axis2', self.gds_format_integer(self.Axis2))3001 if self.Axis3 is not None:3002 element.set('Axis3', self.gds_format_integer(self.Axis3))3003 if self.Axis4 is not None:3004 element.set('Axis4', self.gds_format_integer(self.Axis4))3005 if self.Col1 is not None:3006 Col1_ = self.Col13007 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col1').text = self.gds_format_double(Col1_)3008 if self.Col2 is not None:3009 Col2_ = self.Col23010 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col2').text = self.gds_format_double(Col2_)3011 if self.Col3 is not None:3012 Col3_ = self.Col33013 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col3').text = self.gds_format_double(Col3_)3014 if self.Col4 is not None:3015 Col4_ = self.Col43016 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col4').text = self.gds_format_double(Col4_)3017 if self.Col5 is not None:3018 Col5_ = self.Col53019 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col5').text = self.gds_format_double(Col5_)3020 if self.Col6 is not None:3021 Col6_ = self.Col63022 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col6').text = self.gds_format_double(Col6_)3023 if self.Col7 is not None:3024 Col7_ = self.Col73025 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col7').text = self.gds_format_double(Col7_)3026 if self.Col8 is not None:3027 Col8_ = self.Col83028 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col8').text = self.gds_format_double(Col8_)3029 if self.Col9 is not None:3030 Col9_ = self.Col93031 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col9').text = self.gds_format_double(Col9_)3032 if self.Col10 is not None:3033 Col10_ = self.Col103034 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col10').text = self.gds_format_double(Col10_)3035 if self.Col11 is not None:3036 Col11_ = self.Col113037 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col11').text = self.gds_format_double(Col11_)3038 if self.Col12 is not None:3039 Col12_ = self.Col123040 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col12').text = self.gds_format_double(Col12_)3041 if self.Col13 is not None:3042 Col13_ = self.Col133043 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col13').text = self.gds_format_double(Col13_)3044 if self.Col14 is not None:3045 Col14_ = self.Col143046 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col14').text = self.gds_format_double(Col14_)3047 if self.Col15 is not None:3048 Col15_ = self.Col153049 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col15').text = self.gds_format_double(Col15_)3050 if self.Col16 is not None:3051 Col16_ = self.Col163052 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col16').text = self.gds_format_double(Col16_)3053 if self.Col17 is not None:3054 Col17_ = self.Col173055 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col17').text = self.gds_format_double(Col17_)3056 if self.Col18 is not None:3057 Col18_ = self.Col183058 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col18').text = self.gds_format_double(Col18_)3059 if self.Col19 is not None:3060 Col19_ = self.Col193061 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col19').text = self.gds_format_double(Col19_)3062 if self.Col20 is not None:3063 Col20_ = self.Col203064 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col20').text = self.gds_format_double(Col20_)3065 if self.Col21 is not None:3066 Col21_ = self.Col213067 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col21').text = self.gds_format_double(Col21_)3068 if self.Col22 is not None:3069 Col22_ = self.Col223070 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col22').text = self.gds_format_double(Col22_)3071 if self.Col23 is not None:3072 Col23_ = self.Col233073 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col23').text = self.gds_format_double(Col23_)3074 if self.Col24 is not None:3075 Col24_ = self.Col243076 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col24').text = self.gds_format_double(Col24_)3077 if self.Col25 is not None:3078 Col25_ = self.Col253079 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col25').text = self.gds_format_double(Col25_)3080 if self.Col26 is not None:3081 Col26_ = self.Col263082 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col26').text = self.gds_format_double(Col26_)3083 if self.Col27 is not None:3084 Col27_ = self.Col273085 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col27').text = self.gds_format_double(Col27_)3086 if self.Col28 is not None:3087 Col28_ = self.Col283088 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col28').text = self.gds_format_double(Col28_)3089 if self.Col29 is not None:3090 Col29_ = self.Col293091 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col29').text = self.gds_format_double(Col29_)3092 if self.Col30 is not None:3093 Col30_ = self.Col303094 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col30').text = self.gds_format_double(Col30_)3095 if self.Col31 is not None:3096 Col31_ = self.Col313097 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col31').text = self.gds_format_double(Col31_)3098 if self.Col32 is not None:3099 Col32_ = self.Col323100 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col32').text = self.gds_format_double(Col32_)3101 if self.Col33 is not None:3102 Col33_ = self.Col333103 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col33').text = self.gds_format_double(Col33_)3104 if self.Col34 is not None:3105 Col34_ = self.Col343106 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col34').text = self.gds_format_double(Col34_)3107 if self.Col35 is not None:3108 Col35_ = self.Col353109 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col35').text = self.gds_format_double(Col35_)3110 if self.Col36 is not None:3111 Col36_ = self.Col363112 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col36').text = self.gds_format_double(Col36_)3113 if self.Col37 is not None:3114 Col37_ = self.Col373115 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col37').text = self.gds_format_double(Col37_)3116 if self.Col38 is not None:3117 Col38_ = self.Col383118 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col38').text = self.gds_format_double(Col38_)3119 if self.Col39 is not None:3120 Col39_ = self.Col393121 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col39').text = self.gds_format_double(Col39_)3122 if self.Col40 is not None:3123 Col40_ = self.Col403124 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col40').text = self.gds_format_double(Col40_)3125 if self.Col41 is not None:3126 Col41_ = self.Col413127 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col41').text = self.gds_format_double(Col41_)3128 if self.Col42 is not None:3129 Col42_ = self.Col423130 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col42').text = self.gds_format_double(Col42_)3131 if self.Col43 is not None:3132 Col43_ = self.Col433133 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col43').text = self.gds_format_double(Col43_)3134 if self.Col44 is not None:3135 Col44_ = self.Col443136 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col44').text = self.gds_format_double(Col44_)3137 if self.Col45 is not None:3138 Col45_ = self.Col453139 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col45').text = self.gds_format_double(Col45_)3140 if self.Col46 is not None:3141 Col46_ = self.Col463142 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col46').text = self.gds_format_double(Col46_)3143 if self.Col47 is not None:3144 Col47_ = self.Col473145 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col47').text = self.gds_format_double(Col47_)3146 if self.Col48 is not None:3147 Col48_ = self.Col483148 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col48').text = self.gds_format_double(Col48_)3149 if self.Col49 is not None:3150 Col49_ = self.Col493151 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col49').text = self.gds_format_double(Col49_)3152 if self.Col50 is not None:3153 Col50_ = self.Col503154 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col50').text = self.gds_format_double(Col50_)3155 if self.Col51 is not None:3156 Col51_ = self.Col513157 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col51').text = self.gds_format_double(Col51_)3158 if self.Col52 is not None:3159 Col52_ = self.Col523160 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col52').text = self.gds_format_double(Col52_)3161 if self.Col53 is not None:3162 Col53_ = self.Col533163 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col53').text = self.gds_format_double(Col53_)3164 if self.Col54 is not None:3165 Col54_ = self.Col543166 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col54').text = self.gds_format_double(Col54_)3167 if self.Col55 is not None:3168 Col55_ = self.Col553169 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col55').text = self.gds_format_double(Col55_)3170 if self.Col56 is not None:3171 Col56_ = self.Col563172 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col56').text = self.gds_format_double(Col56_)3173 if self.Col57 is not None:3174 Col57_ = self.Col573175 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col57').text = self.gds_format_double(Col57_)3176 if self.Col58 is not None:3177 Col58_ = self.Col583178 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col58').text = self.gds_format_double(Col58_)3179 if self.Col59 is not None:3180 Col59_ = self.Col593181 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col59').text = self.gds_format_double(Col59_)3182 if self.Col60 is not None:3183 Col60_ = self.Col603184 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col60').text = self.gds_format_double(Col60_)3185 if self.Col61 is not None:3186 Col61_ = self.Col613187 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col61').text = self.gds_format_double(Col61_)3188 if self.Col62 is not None:3189 Col62_ = self.Col623190 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col62').text = self.gds_format_double(Col62_)3191 if self.Col63 is not None:3192 Col63_ = self.Col633193 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col63').text = self.gds_format_double(Col63_)3194 if self.Col64 is not None:3195 Col64_ = self.Col643196 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Col64').text = self.gds_format_double(Col64_)3197 if mapping_ is not None:3198 mapping_[id(self)] = element3199 if reverse_mapping_ is not None:3200 reverse_mapping_[element] = self3201 return element3202 def build(self, node, gds_collector_=None):3203 self.gds_collector_ = gds_collector_3204 if SaveElementTreeNode:3205 self.gds_elementtree_node_ = node3206 already_processed = set()3207 self.ns_prefix_ = node.prefix3208 self._buildAttributes(node, node.attrib, already_processed)3209 for child in node:3210 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3211 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)3212 return self3213 def _buildAttributes(self, node, attrs, already_processed):3214 value = find_attr_value_('Row', node)3215 if value is not None and 'Row' not in already_processed:3216 already_processed.add('Row')3217 self.Row = self.gds_parse_integer(value, node, 'Row')3218 value = find_attr_value_('Axis1', node)3219 if value is not None and 'Axis1' not in already_processed:3220 already_processed.add('Axis1')3221 self.Axis1 = self.gds_parse_integer(value, node, 'Axis1')3222 value = find_attr_value_('Axis2', node)3223 if value is not None and 'Axis2' not in already_processed:3224 already_processed.add('Axis2')3225 self.Axis2 = self.gds_parse_integer(value, node, 'Axis2')3226 value = find_attr_value_('Axis3', node)3227 if value is not None and 'Axis3' not in already_processed:3228 already_processed.add('Axis3')3229 self.Axis3 = self.gds_parse_integer(value, node, 'Axis3')3230 value = find_attr_value_('Axis4', node)3231 if value is not None and 'Axis4' not in already_processed:3232 already_processed.add('Axis4')3233 self.Axis4 = self.gds_parse_integer(value, node, 'Axis4')3234 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):3235 if nodeName_ == 'Col1' and child_.text:3236 sval_ = child_.text3237 fval_ = self.gds_parse_double(sval_, node, 'Col1')3238 fval_ = self.gds_validate_double(fval_, node, 'Col1')3239 self.Col1 = fval_3240 self.Col1_nsprefix_ = child_.prefix3241 elif nodeName_ == 'Col2' and child_.text:3242 sval_ = child_.text3243 fval_ = self.gds_parse_double(sval_, node, 'Col2')3244 fval_ = self.gds_validate_double(fval_, node, 'Col2')3245 self.Col2 = fval_3246 self.Col2_nsprefix_ = child_.prefix3247 elif nodeName_ == 'Col3' and child_.text:3248 sval_ = child_.text3249 fval_ = self.gds_parse_double(sval_, node, 'Col3')3250 fval_ = self.gds_validate_double(fval_, node, 'Col3')3251 self.Col3 = fval_3252 self.Col3_nsprefix_ = child_.prefix3253 elif nodeName_ == 'Col4' and child_.text:3254 sval_ = child_.text3255 fval_ = self.gds_parse_double(sval_, node, 'Col4')3256 fval_ = self.gds_validate_double(fval_, node, 'Col4')3257 self.Col4 = fval_3258 self.Col4_nsprefix_ = child_.prefix3259 elif nodeName_ == 'Col5' and child_.text:3260 sval_ = child_.text3261 fval_ = self.gds_parse_double(sval_, node, 'Col5')3262 fval_ = self.gds_validate_double(fval_, node, 'Col5')3263 self.Col5 = fval_3264 self.Col5_nsprefix_ = child_.prefix3265 elif nodeName_ == 'Col6' and child_.text:3266 sval_ = child_.text3267 fval_ = self.gds_parse_double(sval_, node, 'Col6')3268 fval_ = self.gds_validate_double(fval_, node, 'Col6')3269 self.Col6 = fval_3270 self.Col6_nsprefix_ = child_.prefix3271 elif nodeName_ == 'Col7' and child_.text:3272 sval_ = child_.text3273 fval_ = self.gds_parse_double(sval_, node, 'Col7')3274 fval_ = self.gds_validate_double(fval_, node, 'Col7')3275 self.Col7 = fval_3276 self.Col7_nsprefix_ = child_.prefix3277 elif nodeName_ == 'Col8' and child_.text:3278 sval_ = child_.text3279 fval_ = self.gds_parse_double(sval_, node, 'Col8')3280 fval_ = self.gds_validate_double(fval_, node, 'Col8')3281 self.Col8 = fval_3282 self.Col8_nsprefix_ = child_.prefix3283 elif nodeName_ == 'Col9' and child_.text:3284 sval_ = child_.text3285 fval_ = self.gds_parse_double(sval_, node, 'Col9')3286 fval_ = self.gds_validate_double(fval_, node, 'Col9')3287 self.Col9 = fval_3288 self.Col9_nsprefix_ = child_.prefix3289 elif nodeName_ == 'Col10' and child_.text:3290 sval_ = child_.text3291 fval_ = self.gds_parse_double(sval_, node, 'Col10')3292 fval_ = self.gds_validate_double(fval_, node, 'Col10')3293 self.Col10 = fval_3294 self.Col10_nsprefix_ = child_.prefix3295 elif nodeName_ == 'Col11' and child_.text:3296 sval_ = child_.text3297 fval_ = self.gds_parse_double(sval_, node, 'Col11')3298 fval_ = self.gds_validate_double(fval_, node, 'Col11')3299 self.Col11 = fval_3300 self.Col11_nsprefix_ = child_.prefix3301 elif nodeName_ == 'Col12' and child_.text:3302 sval_ = child_.text3303 fval_ = self.gds_parse_double(sval_, node, 'Col12')3304 fval_ = self.gds_validate_double(fval_, node, 'Col12')3305 self.Col12 = fval_3306 self.Col12_nsprefix_ = child_.prefix3307 elif nodeName_ == 'Col13' and child_.text:3308 sval_ = child_.text3309 fval_ = self.gds_parse_double(sval_, node, 'Col13')3310 fval_ = self.gds_validate_double(fval_, node, 'Col13')3311 self.Col13 = fval_3312 self.Col13_nsprefix_ = child_.prefix3313 elif nodeName_ == 'Col14' and child_.text:3314 sval_ = child_.text3315 fval_ = self.gds_parse_double(sval_, node, 'Col14')3316 fval_ = self.gds_validate_double(fval_, node, 'Col14')3317 self.Col14 = fval_3318 self.Col14_nsprefix_ = child_.prefix3319 elif nodeName_ == 'Col15' and child_.text:3320 sval_ = child_.text3321 fval_ = self.gds_parse_double(sval_, node, 'Col15')3322 fval_ = self.gds_validate_double(fval_, node, 'Col15')3323 self.Col15 = fval_3324 self.Col15_nsprefix_ = child_.prefix3325 elif nodeName_ == 'Col16' and child_.text:3326 sval_ = child_.text3327 fval_ = self.gds_parse_double(sval_, node, 'Col16')3328 fval_ = self.gds_validate_double(fval_, node, 'Col16')3329 self.Col16 = fval_3330 self.Col16_nsprefix_ = child_.prefix3331 elif nodeName_ == 'Col17' and child_.text:3332 sval_ = child_.text3333 fval_ = self.gds_parse_double(sval_, node, 'Col17')3334 fval_ = self.gds_validate_double(fval_, node, 'Col17')3335 self.Col17 = fval_3336 self.Col17_nsprefix_ = child_.prefix3337 elif nodeName_ == 'Col18' and child_.text:3338 sval_ = child_.text3339 fval_ = self.gds_parse_double(sval_, node, 'Col18')3340 fval_ = self.gds_validate_double(fval_, node, 'Col18')3341 self.Col18 = fval_3342 self.Col18_nsprefix_ = child_.prefix3343 elif nodeName_ == 'Col19' and child_.text:3344 sval_ = child_.text3345 fval_ = self.gds_parse_double(sval_, node, 'Col19')3346 fval_ = self.gds_validate_double(fval_, node, 'Col19')3347 self.Col19 = fval_3348 self.Col19_nsprefix_ = child_.prefix3349 elif nodeName_ == 'Col20' and child_.text:3350 sval_ = child_.text3351 fval_ = self.gds_parse_double(sval_, node, 'Col20')3352 fval_ = self.gds_validate_double(fval_, node, 'Col20')3353 self.Col20 = fval_3354 self.Col20_nsprefix_ = child_.prefix3355 elif nodeName_ == 'Col21' and child_.text:3356 sval_ = child_.text3357 fval_ = self.gds_parse_double(sval_, node, 'Col21')3358 fval_ = self.gds_validate_double(fval_, node, 'Col21')3359 self.Col21 = fval_3360 self.Col21_nsprefix_ = child_.prefix3361 elif nodeName_ == 'Col22' and child_.text:3362 sval_ = child_.text3363 fval_ = self.gds_parse_double(sval_, node, 'Col22')3364 fval_ = self.gds_validate_double(fval_, node, 'Col22')3365 self.Col22 = fval_3366 self.Col22_nsprefix_ = child_.prefix3367 elif nodeName_ == 'Col23' and child_.text:3368 sval_ = child_.text3369 fval_ = self.gds_parse_double(sval_, node, 'Col23')3370 fval_ = self.gds_validate_double(fval_, node, 'Col23')3371 self.Col23 = fval_3372 self.Col23_nsprefix_ = child_.prefix3373 elif nodeName_ == 'Col24' and child_.text:3374 sval_ = child_.text3375 fval_ = self.gds_parse_double(sval_, node, 'Col24')3376 fval_ = self.gds_validate_double(fval_, node, 'Col24')3377 self.Col24 = fval_3378 self.Col24_nsprefix_ = child_.prefix3379 elif nodeName_ == 'Col25' and child_.text:3380 sval_ = child_.text3381 fval_ = self.gds_parse_double(sval_, node, 'Col25')3382 fval_ = self.gds_validate_double(fval_, node, 'Col25')3383 self.Col25 = fval_3384 self.Col25_nsprefix_ = child_.prefix3385 elif nodeName_ == 'Col26' and child_.text:3386 sval_ = child_.text3387 fval_ = self.gds_parse_double(sval_, node, 'Col26')3388 fval_ = self.gds_validate_double(fval_, node, 'Col26')3389 self.Col26 = fval_3390 self.Col26_nsprefix_ = child_.prefix3391 elif nodeName_ == 'Col27' and child_.text:3392 sval_ = child_.text3393 fval_ = self.gds_parse_double(sval_, node, 'Col27')3394 fval_ = self.gds_validate_double(fval_, node, 'Col27')3395 self.Col27 = fval_3396 self.Col27_nsprefix_ = child_.prefix3397 elif nodeName_ == 'Col28' and child_.text:3398 sval_ = child_.text3399 fval_ = self.gds_parse_double(sval_, node, 'Col28')3400 fval_ = self.gds_validate_double(fval_, node, 'Col28')3401 self.Col28 = fval_3402 self.Col28_nsprefix_ = child_.prefix3403 elif nodeName_ == 'Col29' and child_.text:3404 sval_ = child_.text3405 fval_ = self.gds_parse_double(sval_, node, 'Col29')3406 fval_ = self.gds_validate_double(fval_, node, 'Col29')3407 self.Col29 = fval_3408 self.Col29_nsprefix_ = child_.prefix3409 elif nodeName_ == 'Col30' and child_.text:3410 sval_ = child_.text3411 fval_ = self.gds_parse_double(sval_, node, 'Col30')3412 fval_ = self.gds_validate_double(fval_, node, 'Col30')3413 self.Col30 = fval_3414 self.Col30_nsprefix_ = child_.prefix3415 elif nodeName_ == 'Col31' and child_.text:3416 sval_ = child_.text3417 fval_ = self.gds_parse_double(sval_, node, 'Col31')3418 fval_ = self.gds_validate_double(fval_, node, 'Col31')3419 self.Col31 = fval_3420 self.Col31_nsprefix_ = child_.prefix3421 elif nodeName_ == 'Col32' and child_.text:3422 sval_ = child_.text3423 fval_ = self.gds_parse_double(sval_, node, 'Col32')3424 fval_ = self.gds_validate_double(fval_, node, 'Col32')3425 self.Col32 = fval_3426 self.Col32_nsprefix_ = child_.prefix3427 elif nodeName_ == 'Col33' and child_.text:3428 sval_ = child_.text3429 fval_ = self.gds_parse_double(sval_, node, 'Col33')3430 fval_ = self.gds_validate_double(fval_, node, 'Col33')3431 self.Col33 = fval_3432 self.Col33_nsprefix_ = child_.prefix3433 elif nodeName_ == 'Col34' and child_.text:3434 sval_ = child_.text3435 fval_ = self.gds_parse_double(sval_, node, 'Col34')3436 fval_ = self.gds_validate_double(fval_, node, 'Col34')3437 self.Col34 = fval_3438 self.Col34_nsprefix_ = child_.prefix3439 elif nodeName_ == 'Col35' and child_.text:3440 sval_ = child_.text3441 fval_ = self.gds_parse_double(sval_, node, 'Col35')3442 fval_ = self.gds_validate_double(fval_, node, 'Col35')3443 self.Col35 = fval_3444 self.Col35_nsprefix_ = child_.prefix3445 elif nodeName_ == 'Col36' and child_.text:3446 sval_ = child_.text3447 fval_ = self.gds_parse_double(sval_, node, 'Col36')3448 fval_ = self.gds_validate_double(fval_, node, 'Col36')3449 self.Col36 = fval_3450 self.Col36_nsprefix_ = child_.prefix3451 elif nodeName_ == 'Col37' and child_.text:3452 sval_ = child_.text3453 fval_ = self.gds_parse_double(sval_, node, 'Col37')3454 fval_ = self.gds_validate_double(fval_, node, 'Col37')3455 self.Col37 = fval_3456 self.Col37_nsprefix_ = child_.prefix3457 elif nodeName_ == 'Col38' and child_.text:3458 sval_ = child_.text3459 fval_ = self.gds_parse_double(sval_, node, 'Col38')3460 fval_ = self.gds_validate_double(fval_, node, 'Col38')3461 self.Col38 = fval_3462 self.Col38_nsprefix_ = child_.prefix3463 elif nodeName_ == 'Col39' and child_.text:3464 sval_ = child_.text3465 fval_ = self.gds_parse_double(sval_, node, 'Col39')3466 fval_ = self.gds_validate_double(fval_, node, 'Col39')3467 self.Col39 = fval_3468 self.Col39_nsprefix_ = child_.prefix3469 elif nodeName_ == 'Col40' and child_.text:3470 sval_ = child_.text3471 fval_ = self.gds_parse_double(sval_, node, 'Col40')3472 fval_ = self.gds_validate_double(fval_, node, 'Col40')3473 self.Col40 = fval_3474 self.Col40_nsprefix_ = child_.prefix3475 elif nodeName_ == 'Col41' and child_.text:3476 sval_ = child_.text3477 fval_ = self.gds_parse_double(sval_, node, 'Col41')3478 fval_ = self.gds_validate_double(fval_, node, 'Col41')3479 self.Col41 = fval_3480 self.Col41_nsprefix_ = child_.prefix3481 elif nodeName_ == 'Col42' and child_.text:3482 sval_ = child_.text3483 fval_ = self.gds_parse_double(sval_, node, 'Col42')3484 fval_ = self.gds_validate_double(fval_, node, 'Col42')3485 self.Col42 = fval_3486 self.Col42_nsprefix_ = child_.prefix3487 elif nodeName_ == 'Col43' and child_.text:3488 sval_ = child_.text3489 fval_ = self.gds_parse_double(sval_, node, 'Col43')3490 fval_ = self.gds_validate_double(fval_, node, 'Col43')3491 self.Col43 = fval_3492 self.Col43_nsprefix_ = child_.prefix3493 elif nodeName_ == 'Col44' and child_.text:3494 sval_ = child_.text3495 fval_ = self.gds_parse_double(sval_, node, 'Col44')3496 fval_ = self.gds_validate_double(fval_, node, 'Col44')3497 self.Col44 = fval_3498 self.Col44_nsprefix_ = child_.prefix3499 elif nodeName_ == 'Col45' and child_.text:3500 sval_ = child_.text3501 fval_ = self.gds_parse_double(sval_, node, 'Col45')3502 fval_ = self.gds_validate_double(fval_, node, 'Col45')3503 self.Col45 = fval_3504 self.Col45_nsprefix_ = child_.prefix3505 elif nodeName_ == 'Col46' and child_.text:3506 sval_ = child_.text3507 fval_ = self.gds_parse_double(sval_, node, 'Col46')3508 fval_ = self.gds_validate_double(fval_, node, 'Col46')3509 self.Col46 = fval_3510 self.Col46_nsprefix_ = child_.prefix3511 elif nodeName_ == 'Col47' and child_.text:3512 sval_ = child_.text3513 fval_ = self.gds_parse_double(sval_, node, 'Col47')3514 fval_ = self.gds_validate_double(fval_, node, 'Col47')3515 self.Col47 = fval_3516 self.Col47_nsprefix_ = child_.prefix3517 elif nodeName_ == 'Col48' and child_.text:3518 sval_ = child_.text3519 fval_ = self.gds_parse_double(sval_, node, 'Col48')3520 fval_ = self.gds_validate_double(fval_, node, 'Col48')3521 self.Col48 = fval_3522 self.Col48_nsprefix_ = child_.prefix3523 elif nodeName_ == 'Col49' and child_.text:3524 sval_ = child_.text3525 fval_ = self.gds_parse_double(sval_, node, 'Col49')3526 fval_ = self.gds_validate_double(fval_, node, 'Col49')3527 self.Col49 = fval_3528 self.Col49_nsprefix_ = child_.prefix3529 elif nodeName_ == 'Col50' and child_.text:3530 sval_ = child_.text3531 fval_ = self.gds_parse_double(sval_, node, 'Col50')3532 fval_ = self.gds_validate_double(fval_, node, 'Col50')3533 self.Col50 = fval_3534 self.Col50_nsprefix_ = child_.prefix3535 elif nodeName_ == 'Col51' and child_.text:3536 sval_ = child_.text3537 fval_ = self.gds_parse_double(sval_, node, 'Col51')3538 fval_ = self.gds_validate_double(fval_, node, 'Col51')3539 self.Col51 = fval_3540 self.Col51_nsprefix_ = child_.prefix3541 elif nodeName_ == 'Col52' and child_.text:3542 sval_ = child_.text3543 fval_ = self.gds_parse_double(sval_, node, 'Col52')3544 fval_ = self.gds_validate_double(fval_, node, 'Col52')3545 self.Col52 = fval_3546 self.Col52_nsprefix_ = child_.prefix3547 elif nodeName_ == 'Col53' and child_.text:3548 sval_ = child_.text3549 fval_ = self.gds_parse_double(sval_, node, 'Col53')3550 fval_ = self.gds_validate_double(fval_, node, 'Col53')3551 self.Col53 = fval_3552 self.Col53_nsprefix_ = child_.prefix3553 elif nodeName_ == 'Col54' and child_.text:3554 sval_ = child_.text3555 fval_ = self.gds_parse_double(sval_, node, 'Col54')3556 fval_ = self.gds_validate_double(fval_, node, 'Col54')3557 self.Col54 = fval_3558 self.Col54_nsprefix_ = child_.prefix3559 elif nodeName_ == 'Col55' and child_.text:3560 sval_ = child_.text3561 fval_ = self.gds_parse_double(sval_, node, 'Col55')3562 fval_ = self.gds_validate_double(fval_, node, 'Col55')3563 self.Col55 = fval_3564 self.Col55_nsprefix_ = child_.prefix3565 elif nodeName_ == 'Col56' and child_.text:3566 sval_ = child_.text3567 fval_ = self.gds_parse_double(sval_, node, 'Col56')3568 fval_ = self.gds_validate_double(fval_, node, 'Col56')3569 self.Col56 = fval_3570 self.Col56_nsprefix_ = child_.prefix3571 elif nodeName_ == 'Col57' and child_.text:3572 sval_ = child_.text3573 fval_ = self.gds_parse_double(sval_, node, 'Col57')3574 fval_ = self.gds_validate_double(fval_, node, 'Col57')3575 self.Col57 = fval_3576 self.Col57_nsprefix_ = child_.prefix3577 elif nodeName_ == 'Col58' and child_.text:3578 sval_ = child_.text3579 fval_ = self.gds_parse_double(sval_, node, 'Col58')3580 fval_ = self.gds_validate_double(fval_, node, 'Col58')3581 self.Col58 = fval_3582 self.Col58_nsprefix_ = child_.prefix3583 elif nodeName_ == 'Col59' and child_.text:3584 sval_ = child_.text3585 fval_ = self.gds_parse_double(sval_, node, 'Col59')3586 fval_ = self.gds_validate_double(fval_, node, 'Col59')3587 self.Col59 = fval_3588 self.Col59_nsprefix_ = child_.prefix3589 elif nodeName_ == 'Col60' and child_.text:3590 sval_ = child_.text3591 fval_ = self.gds_parse_double(sval_, node, 'Col60')3592 fval_ = self.gds_validate_double(fval_, node, 'Col60')3593 self.Col60 = fval_3594 self.Col60_nsprefix_ = child_.prefix3595 elif nodeName_ == 'Col61' and child_.text:3596 sval_ = child_.text3597 fval_ = self.gds_parse_double(sval_, node, 'Col61')3598 fval_ = self.gds_validate_double(fval_, node, 'Col61')3599 self.Col61 = fval_3600 self.Col61_nsprefix_ = child_.prefix3601 elif nodeName_ == 'Col62' and child_.text:3602 sval_ = child_.text3603 fval_ = self.gds_parse_double(sval_, node, 'Col62')3604 fval_ = self.gds_validate_double(fval_, node, 'Col62')3605 self.Col62 = fval_3606 self.Col62_nsprefix_ = child_.prefix3607 elif nodeName_ == 'Col63' and child_.text:3608 sval_ = child_.text3609 fval_ = self.gds_parse_double(sval_, node, 'Col63')3610 fval_ = self.gds_validate_double(fval_, node, 'Col63')3611 self.Col63 = fval_3612 self.Col63_nsprefix_ = child_.prefix3613 elif nodeName_ == 'Col64' and child_.text:3614 sval_ = child_.text3615 fval_ = self.gds_parse_double(sval_, node, 'Col64')3616 fval_ = self.gds_validate_double(fval_, node, 'Col64')3617 self.Col64 = fval_3618 self.Col64_nsprefix_ = child_.prefix3619# end class MDataType3620class BetasType(GeneratedsSuper):3621 __hash__ = GeneratedsSuper.__hash__3622 subclass = None3623 superclass = None3624 def __init__(self, Number=None, Beta=None, gds_collector_=None, **kwargs_):3625 self.gds_collector_ = gds_collector_3626 self.gds_elementtree_node_ = None3627 self.original_tagname_ = None3628 self.parent_object_ = kwargs_.get('parent_object_')3629 self.ns_prefix_ = None3630 self.Number = Number3631 self.Number_nsprefix_ = None3632 if Beta is None:3633 self.Beta = []3634 else:3635 self.Beta = Beta3636 self.Beta_nsprefix_ = None3637 def factory(*args_, **kwargs_):3638 if CurrentSubclassModule_ is not None:3639 subclass = getSubclassFromModule_(3640 CurrentSubclassModule_, BetasType)3641 if subclass is not None:3642 return subclass(*args_, **kwargs_)3643 if BetasType.subclass:3644 return BetasType.subclass(*args_, **kwargs_)3645 else:3646 return BetasType(*args_, **kwargs_)3647 factory = staticmethod(factory)3648 def get_ns_prefix_(self):3649 return self.ns_prefix_3650 def set_ns_prefix_(self, ns_prefix):3651 self.ns_prefix_ = ns_prefix3652 def get_Number(self):3653 return self.Number3654 def set_Number(self, Number):3655 self.Number = Number3656 def get_Beta(self):3657 return self.Beta3658 def set_Beta(self, Beta):3659 self.Beta = Beta3660 def add_Beta(self, value):3661 self.Beta.append(value)3662 def insert_Beta_at(self, index, value):3663 self.Beta.insert(index, value)3664 def replace_Beta_at(self, index, value):3665 self.Beta[index] = value3666 def _hasContent(self):3667 if (3668 self.Number is not None or3669 self.Beta3670 ):3671 return True3672 else:3673 return False3674 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetasType', pretty_print=True):3675 imported_ns_def_ = GenerateDSNamespaceDefs_.get('BetasType')3676 if imported_ns_def_ is not None:3677 namespacedef_ = imported_ns_def_3678 if pretty_print:3679 eol_ = '\n'3680 else:3681 eol_ = ''3682 if self.original_tagname_ is not None and name_ == 'BetasType':3683 name_ = self.original_tagname_3684 if UseCapturedNS_ and self.ns_prefix_:3685 namespaceprefix_ = self.ns_prefix_ + ':'3686 showIndent(outfile, level, pretty_print)3687 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3688 already_processed = set()3689 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BetasType')3690 if self._hasContent():3691 outfile.write('>%s' % (eol_, ))3692 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BetasType', pretty_print=pretty_print)3693 showIndent(outfile, level, pretty_print)3694 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))3695 else:3696 outfile.write('/>%s' % (eol_, ))3697 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BetasType'):3698 pass3699 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetasType', fromsubclass_=False, pretty_print=True):3700 if pretty_print:3701 eol_ = '\n'3702 else:3703 eol_ = ''3704 if self.Number is not None:3705 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''3706 showIndent(outfile, level, pretty_print)3707 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))3708 for Beta_ in self.Beta:3709 namespaceprefix_ = self.Beta_nsprefix_ + ':' if (UseCapturedNS_ and self.Beta_nsprefix_) else ''3710 Beta_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Beta', pretty_print=pretty_print)3711 def to_etree(self, parent_element=None, name_='BetasType', mapping_=None, reverse_mapping_=None, nsmap_=None):3712 if parent_element is None:3713 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)3714 else:3715 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)3716 if self.Number is not None:3717 Number_ = self.Number3718 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Number').text = self.gds_format_integer(Number_)3719 for Beta_ in self.Beta:3720 Beta_.to_etree(element, name_='Beta', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)3721 if mapping_ is not None:3722 mapping_[id(self)] = element3723 if reverse_mapping_ is not None:3724 reverse_mapping_[element] = self3725 return element3726 def build(self, node, gds_collector_=None):3727 self.gds_collector_ = gds_collector_3728 if SaveElementTreeNode:3729 self.gds_elementtree_node_ = node3730 already_processed = set()3731 self.ns_prefix_ = node.prefix3732 self._buildAttributes(node, node.attrib, already_processed)3733 for child in node:3734 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3735 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)3736 return self3737 def _buildAttributes(self, node, attrs, already_processed):3738 pass3739 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):3740 if nodeName_ == 'Number' and child_.text:3741 sval_ = child_.text3742 ival_ = self.gds_parse_integer(sval_, node, 'Number')3743 ival_ = self.gds_validate_integer(ival_, node, 'Number')3744 self.Number = ival_3745 self.Number_nsprefix_ = child_.prefix3746 elif nodeName_ == 'Beta':3747 obj_ = BetaType.factory(parent_object_=self)3748 obj_.build(child_, gds_collector_=gds_collector_)3749 self.Beta.append(obj_)3750 obj_.original_tagname_ = 'Beta'3751# end class BetasType3752class BetaType(GeneratedsSuper):3753 __hash__ = GeneratedsSuper.__hash__3754 subclass = None3755 superclass = None3756 def __init__(self, Position=None, Label=None, I=None, J=None, Value=None, FlowRef=None, OpZeroOrOne=None, gds_collector_=None, **kwargs_):3757 self.gds_collector_ = gds_collector_3758 self.gds_elementtree_node_ = None3759 self.original_tagname_ = None3760 self.parent_object_ = kwargs_.get('parent_object_')3761 self.ns_prefix_ = None3762 self.Position = _cast(int, Position)3763 self.Position_nsprefix_ = None3764 self.Label = Label3765 self.Label_nsprefix_ = None3766 self.I = I3767 self.I_nsprefix_ = None3768 self.J = J3769 self.J_nsprefix_ = None3770 self.Value = Value3771 self.Value_nsprefix_ = None3772 self.FlowRef = FlowRef3773 self.FlowRef_nsprefix_ = None3774 self.OpZeroOrOne = OpZeroOrOne3775 self.OpZeroOrOne_nsprefix_ = None3776 def factory(*args_, **kwargs_):3777 if CurrentSubclassModule_ is not None:3778 subclass = getSubclassFromModule_(3779 CurrentSubclassModule_, BetaType)3780 if subclass is not None:3781 return subclass(*args_, **kwargs_)3782 if BetaType.subclass:3783 return BetaType.subclass(*args_, **kwargs_)3784 else:3785 return BetaType(*args_, **kwargs_)3786 factory = staticmethod(factory)3787 def get_ns_prefix_(self):3788 return self.ns_prefix_3789 def set_ns_prefix_(self, ns_prefix):3790 self.ns_prefix_ = ns_prefix3791 def get_Label(self):3792 return self.Label3793 def set_Label(self, Label):3794 self.Label = Label3795 def get_I(self):3796 return self.I3797 def set_I(self, I):3798 self.I = I3799 def get_J(self):3800 return self.J3801 def set_J(self, J):3802 self.J = J3803 def get_Value(self):3804 return self.Value3805 def set_Value(self, Value):3806 self.Value = Value3807 def get_FlowRef(self):3808 return self.FlowRef3809 def set_FlowRef(self, FlowRef):3810 self.FlowRef = FlowRef3811 def get_OpZeroOrOne(self):3812 return self.OpZeroOrOne3813 def set_OpZeroOrOne(self, OpZeroOrOne):3814 self.OpZeroOrOne = OpZeroOrOne3815 def get_Position(self):3816 return self.Position3817 def set_Position(self, Position):3818 self.Position = Position3819 def _hasContent(self):3820 if (3821 self.Label is not None or3822 self.I is not None or3823 self.J is not None or3824 self.Value is not None or3825 self.FlowRef is not None or3826 self.OpZeroOrOne is not None3827 ):3828 return True3829 else:3830 return False3831 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetaType', pretty_print=True):3832 imported_ns_def_ = GenerateDSNamespaceDefs_.get('BetaType')3833 if imported_ns_def_ is not None:3834 namespacedef_ = imported_ns_def_3835 if pretty_print:3836 eol_ = '\n'3837 else:3838 eol_ = ''3839 if self.original_tagname_ is not None and name_ == 'BetaType':3840 name_ = self.original_tagname_3841 if UseCapturedNS_ and self.ns_prefix_:3842 namespaceprefix_ = self.ns_prefix_ + ':'3843 showIndent(outfile, level, pretty_print)3844 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3845 already_processed = set()3846 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BetaType')3847 if self._hasContent():3848 outfile.write('>%s' % (eol_, ))3849 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BetaType', pretty_print=pretty_print)3850 showIndent(outfile, level, pretty_print)3851 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))3852 else:3853 outfile.write('/>%s' % (eol_, ))3854 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BetaType'):3855 if self.Position is not None and 'Position' not in already_processed:3856 already_processed.add('Position')3857 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))3858 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetaType', fromsubclass_=False, pretty_print=True):3859 if pretty_print:3860 eol_ = '\n'3861 else:3862 eol_ = ''3863 if self.Label is not None:3864 namespaceprefix_ = self.Label_nsprefix_ + ':' if (UseCapturedNS_ and self.Label_nsprefix_) else ''3865 showIndent(outfile, level, pretty_print)3866 outfile.write('<%sLabel>%s</%sLabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Label), input_name='Label')), namespaceprefix_ , eol_))3867 if self.I is not None:3868 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''3869 showIndent(outfile, level, pretty_print)3870 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))3871 if self.J is not None:3872 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''3873 showIndent(outfile, level, pretty_print)3874 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))3875 if self.Value is not None:3876 namespaceprefix_ = self.Value_nsprefix_ + ':' if (UseCapturedNS_ and self.Value_nsprefix_) else ''3877 showIndent(outfile, level, pretty_print)3878 outfile.write('<%sValue>%s</%sValue>%s' % (namespaceprefix_ , self.gds_format_double(self.Value, input_name='Value'), namespaceprefix_ , eol_))3879 if self.FlowRef is not None:3880 namespaceprefix_ = self.FlowRef_nsprefix_ + ':' if (UseCapturedNS_ and self.FlowRef_nsprefix_) else ''3881 showIndent(outfile, level, pretty_print)3882 outfile.write('<%sFlowRef>%s</%sFlowRef>%s' % (namespaceprefix_ , self.gds_format_integer(self.FlowRef, input_name='FlowRef'), namespaceprefix_ , eol_))3883 if self.OpZeroOrOne is not None:3884 namespaceprefix_ = self.OpZeroOrOne_nsprefix_ + ':' if (UseCapturedNS_ and self.OpZeroOrOne_nsprefix_) else ''3885 showIndent(outfile, level, pretty_print)3886 outfile.write('<%sOpZeroOrOne>%s</%sOpZeroOrOne>%s' % (namespaceprefix_ , self.gds_format_integer(self.OpZeroOrOne, input_name='OpZeroOrOne'), namespaceprefix_ , eol_))3887 def to_etree(self, parent_element=None, name_='BetaType', mapping_=None, reverse_mapping_=None, nsmap_=None):3888 if parent_element is None:3889 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)3890 else:3891 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)3892 if self.Position is not None:3893 element.set('Position', self.gds_format_integer(self.Position))3894 if self.Label is not None:3895 Label_ = self.Label3896 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Label').text = self.gds_format_string(Label_)3897 if self.I is not None:3898 I_ = self.I3899 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}I').text = self.gds_format_integer(I_)3900 if self.J is not None:3901 J_ = self.J3902 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}J').text = self.gds_format_integer(J_)3903 if self.Value is not None:3904 Value_ = self.Value3905 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Value').text = self.gds_format_double(Value_)3906 if self.FlowRef is not None:3907 FlowRef_ = self.FlowRef3908 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}FlowRef').text = self.gds_format_integer(FlowRef_)3909 if self.OpZeroOrOne is not None:3910 OpZeroOrOne_ = self.OpZeroOrOne3911 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}OpZeroOrOne').text = self.gds_format_integer(OpZeroOrOne_)3912 if mapping_ is not None:3913 mapping_[id(self)] = element3914 if reverse_mapping_ is not None:3915 reverse_mapping_[element] = self3916 return element3917 def build(self, node, gds_collector_=None):3918 self.gds_collector_ = gds_collector_3919 if SaveElementTreeNode:3920 self.gds_elementtree_node_ = node3921 already_processed = set()3922 self.ns_prefix_ = node.prefix3923 self._buildAttributes(node, node.attrib, already_processed)3924 for child in node:3925 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3926 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)3927 return self3928 def _buildAttributes(self, node, attrs, already_processed):3929 value = find_attr_value_('Position', node)3930 if value is not None and 'Position' not in already_processed:3931 already_processed.add('Position')3932 self.Position = self.gds_parse_integer(value, node, 'Position')3933 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):3934 if nodeName_ == 'Label':3935 value_ = child_.text3936 value_ = self.gds_parse_string(value_, node, 'Label')3937 value_ = self.gds_validate_string(value_, node, 'Label')3938 self.Label = value_3939 self.Label_nsprefix_ = child_.prefix3940 elif nodeName_ == 'I' and child_.text:3941 sval_ = child_.text3942 ival_ = self.gds_parse_integer(sval_, node, 'I')3943 ival_ = self.gds_validate_integer(ival_, node, 'I')3944 self.I = ival_3945 self.I_nsprefix_ = child_.prefix3946 elif nodeName_ == 'J' and child_.text:3947 sval_ = child_.text3948 ival_ = self.gds_parse_integer(sval_, node, 'J')3949 ival_ = self.gds_validate_integer(ival_, node, 'J')3950 self.J = ival_3951 self.J_nsprefix_ = child_.prefix3952 elif nodeName_ == 'Value' and child_.text:3953 sval_ = child_.text3954 fval_ = self.gds_parse_double(sval_, node, 'Value')3955 fval_ = self.gds_validate_double(fval_, node, 'Value')3956 self.Value = fval_3957 self.Value_nsprefix_ = child_.prefix3958 elif nodeName_ == 'FlowRef' and child_.text:3959 sval_ = child_.text3960 ival_ = self.gds_parse_integer(sval_, node, 'FlowRef')3961 ival_ = self.gds_validate_integer(ival_, node, 'FlowRef')3962 self.FlowRef = ival_3963 self.FlowRef_nsprefix_ = child_.prefix3964 elif nodeName_ == 'OpZeroOrOne' and child_.text:3965 sval_ = child_.text3966 ival_ = self.gds_parse_integer(sval_, node, 'OpZeroOrOne')3967 ival_ = self.gds_validate_integer(ival_, node, 'OpZeroOrOne')3968 self.OpZeroOrOne = ival_3969 self.OpZeroOrOne_nsprefix_ = child_.prefix3970# end class BetaType3971class FunctionalInputsType(GeneratedsSuper):3972 __hash__ = GeneratedsSuper.__hash__3973 subclass = None3974 superclass = None3975 def __init__(self, Number=None, FunctionInput=None, gds_collector_=None, **kwargs_):3976 self.gds_collector_ = gds_collector_3977 self.gds_elementtree_node_ = None3978 self.original_tagname_ = None3979 self.parent_object_ = kwargs_.get('parent_object_')3980 self.ns_prefix_ = None3981 self.Number = Number3982 self.Number_nsprefix_ = None3983 if FunctionInput is None:3984 self.FunctionInput = []3985 else:3986 self.FunctionInput = FunctionInput3987 self.FunctionInput_nsprefix_ = None3988 def factory(*args_, **kwargs_):3989 if CurrentSubclassModule_ is not None:3990 subclass = getSubclassFromModule_(3991 CurrentSubclassModule_, FunctionalInputsType)3992 if subclass is not None:3993 return subclass(*args_, **kwargs_)3994 if FunctionalInputsType.subclass:3995 return FunctionalInputsType.subclass(*args_, **kwargs_)3996 else:3997 return FunctionalInputsType(*args_, **kwargs_)3998 factory = staticmethod(factory)3999 def get_ns_prefix_(self):4000 return self.ns_prefix_4001 def set_ns_prefix_(self, ns_prefix):4002 self.ns_prefix_ = ns_prefix4003 def get_Number(self):4004 return self.Number4005 def set_Number(self, Number):4006 self.Number = Number4007 def get_FunctionInput(self):4008 return self.FunctionInput4009 def set_FunctionInput(self, FunctionInput):4010 self.FunctionInput = FunctionInput4011 def add_FunctionInput(self, value):4012 self.FunctionInput.append(value)4013 def insert_FunctionInput_at(self, index, value):4014 self.FunctionInput.insert(index, value)4015 def replace_FunctionInput_at(self, index, value):4016 self.FunctionInput[index] = value4017 def _hasContent(self):4018 if (4019 self.Number is not None or4020 self.FunctionInput4021 ):4022 return True4023 else:4024 return False4025 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionalInputsType', pretty_print=True):4026 imported_ns_def_ = GenerateDSNamespaceDefs_.get('FunctionalInputsType')4027 if imported_ns_def_ is not None:4028 namespacedef_ = imported_ns_def_4029 if pretty_print:4030 eol_ = '\n'4031 else:4032 eol_ = ''4033 if self.original_tagname_ is not None and name_ == 'FunctionalInputsType':4034 name_ = self.original_tagname_4035 if UseCapturedNS_ and self.ns_prefix_:4036 namespaceprefix_ = self.ns_prefix_ + ':'4037 showIndent(outfile, level, pretty_print)4038 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4039 already_processed = set()4040 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FunctionalInputsType')4041 if self._hasContent():4042 outfile.write('>%s' % (eol_, ))4043 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='FunctionalInputsType', pretty_print=pretty_print)4044 showIndent(outfile, level, pretty_print)4045 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4046 else:4047 outfile.write('/>%s' % (eol_, ))4048 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='FunctionalInputsType'):4049 pass4050 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionalInputsType', fromsubclass_=False, pretty_print=True):4051 if pretty_print:4052 eol_ = '\n'4053 else:4054 eol_ = ''4055 if self.Number is not None:4056 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''4057 showIndent(outfile, level, pretty_print)4058 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))4059 for FunctionInput_ in self.FunctionInput:4060 namespaceprefix_ = self.FunctionInput_nsprefix_ + ':' if (UseCapturedNS_ and self.FunctionInput_nsprefix_) else ''4061 FunctionInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='FunctionInput', pretty_print=pretty_print)4062 def to_etree(self, parent_element=None, name_='FunctionalInputsType', mapping_=None, reverse_mapping_=None, nsmap_=None):4063 if parent_element is None:4064 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4065 else:4066 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4067 if self.Number is not None:4068 Number_ = self.Number4069 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Number').text = self.gds_format_integer(Number_)4070 for FunctionInput_ in self.FunctionInput:4071 FunctionInput_.to_etree(element, name_='FunctionInput', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)4072 if mapping_ is not None:4073 mapping_[id(self)] = element4074 if reverse_mapping_ is not None:4075 reverse_mapping_[element] = self4076 return element4077 def build(self, node, gds_collector_=None):4078 self.gds_collector_ = gds_collector_4079 if SaveElementTreeNode:4080 self.gds_elementtree_node_ = node4081 already_processed = set()4082 self.ns_prefix_ = node.prefix4083 self._buildAttributes(node, node.attrib, already_processed)4084 for child in node:4085 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4086 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)4087 return self4088 def _buildAttributes(self, node, attrs, already_processed):4089 pass4090 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4091 if nodeName_ == 'Number' and child_.text:4092 sval_ = child_.text4093 ival_ = self.gds_parse_integer(sval_, node, 'Number')4094 ival_ = self.gds_validate_integer(ival_, node, 'Number')4095 self.Number = ival_4096 self.Number_nsprefix_ = child_.prefix4097 elif nodeName_ == 'FunctionInput':4098 obj_ = FunctionInputType.factory(parent_object_=self)4099 obj_.build(child_, gds_collector_=gds_collector_)4100 self.FunctionInput.append(obj_)4101 obj_.original_tagname_ = 'FunctionInput'4102# end class FunctionalInputsType4103class FunctionInputType(GeneratedsSuper):4104 __hash__ = GeneratedsSuper.__hash__4105 subclass = None4106 superclass = None4107 def __init__(self, Position=None, Label=None, I=None, J=None, Value=None, FlowRef=None, OpZeroOrOne=None, BaseSetInd=None, Script=None, InputReference=None, gds_collector_=None, **kwargs_):4108 self.gds_collector_ = gds_collector_4109 self.gds_elementtree_node_ = None4110 self.original_tagname_ = None4111 self.parent_object_ = kwargs_.get('parent_object_')4112 self.ns_prefix_ = None4113 self.Position = _cast(int, Position)4114 self.Position_nsprefix_ = None4115 self.Label = Label4116 self.Label_nsprefix_ = None4117 self.I = I4118 self.I_nsprefix_ = None4119 self.J = J4120 self.J_nsprefix_ = None4121 self.Value = Value4122 self.Value_nsprefix_ = None4123 self.FlowRef = FlowRef4124 self.FlowRef_nsprefix_ = None4125 self.OpZeroOrOne = OpZeroOrOne4126 self.OpZeroOrOne_nsprefix_ = None4127 self.BaseSetInd = BaseSetInd4128 self.BaseSetInd_nsprefix_ = None4129 self.Script = Script4130 self.Script_nsprefix_ = None4131 self.InputReference = InputReference4132 self.InputReference_nsprefix_ = None4133 def factory(*args_, **kwargs_):4134 if CurrentSubclassModule_ is not None:4135 subclass = getSubclassFromModule_(4136 CurrentSubclassModule_, FunctionInputType)4137 if subclass is not None:4138 return subclass(*args_, **kwargs_)4139 if FunctionInputType.subclass:4140 return FunctionInputType.subclass(*args_, **kwargs_)4141 else:4142 return FunctionInputType(*args_, **kwargs_)4143 factory = staticmethod(factory)4144 def get_ns_prefix_(self):4145 return self.ns_prefix_4146 def set_ns_prefix_(self, ns_prefix):4147 self.ns_prefix_ = ns_prefix4148 def get_Label(self):4149 return self.Label4150 def set_Label(self, Label):4151 self.Label = Label4152 def get_I(self):4153 return self.I4154 def set_I(self, I):4155 self.I = I4156 def get_J(self):4157 return self.J4158 def set_J(self, J):4159 self.J = J4160 def get_Value(self):4161 return self.Value4162 def set_Value(self, Value):4163 self.Value = Value4164 def get_FlowRef(self):4165 return self.FlowRef4166 def set_FlowRef(self, FlowRef):4167 self.FlowRef = FlowRef4168 def get_OpZeroOrOne(self):4169 return self.OpZeroOrOne4170 def set_OpZeroOrOne(self, OpZeroOrOne):4171 self.OpZeroOrOne = OpZeroOrOne4172 def get_BaseSetInd(self):4173 return self.BaseSetInd4174 def set_BaseSetInd(self, BaseSetInd):4175 self.BaseSetInd = BaseSetInd4176 def get_Script(self):4177 return self.Script4178 def set_Script(self, Script):4179 self.Script = Script4180 def get_InputReference(self):4181 return self.InputReference4182 def set_InputReference(self, InputReference):4183 self.InputReference = InputReference4184 def get_Position(self):4185 return self.Position4186 def set_Position(self, Position):4187 self.Position = Position4188 def _hasContent(self):4189 if (4190 self.Label is not None or4191 self.I is not None or4192 self.J is not None or4193 self.Value is not None or4194 self.FlowRef is not None or4195 self.OpZeroOrOne is not None or4196 self.BaseSetInd is not None or4197 self.Script is not None or4198 self.InputReference is not None4199 ):4200 return True4201 else:4202 return False4203 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType', pretty_print=True):4204 imported_ns_def_ = GenerateDSNamespaceDefs_.get('FunctionInputType')4205 if imported_ns_def_ is not None:4206 namespacedef_ = imported_ns_def_4207 if pretty_print:4208 eol_ = '\n'4209 else:4210 eol_ = ''4211 if self.original_tagname_ is not None and name_ == 'FunctionInputType':4212 name_ = self.original_tagname_4213 if UseCapturedNS_ and self.ns_prefix_:4214 namespaceprefix_ = self.ns_prefix_ + ':'4215 showIndent(outfile, level, pretty_print)4216 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4217 already_processed = set()4218 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FunctionInputType')4219 if self._hasContent():4220 outfile.write('>%s' % (eol_, ))4221 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='FunctionInputType', pretty_print=pretty_print)4222 showIndent(outfile, level, pretty_print)4223 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4224 else:4225 outfile.write('/>%s' % (eol_, ))4226 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='FunctionInputType'):4227 if self.Position is not None and 'Position' not in already_processed:4228 already_processed.add('Position')4229 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))4230 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType', fromsubclass_=False, pretty_print=True):4231 if pretty_print:4232 eol_ = '\n'4233 else:4234 eol_ = ''4235 if self.Label is not None:4236 namespaceprefix_ = self.Label_nsprefix_ + ':' if (UseCapturedNS_ and self.Label_nsprefix_) else ''4237 showIndent(outfile, level, pretty_print)4238 outfile.write('<%sLabel>%s</%sLabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Label), input_name='Label')), namespaceprefix_ , eol_))4239 if self.I is not None:4240 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''4241 showIndent(outfile, level, pretty_print)4242 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))4243 if self.J is not None:4244 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''4245 showIndent(outfile, level, pretty_print)4246 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))4247 if self.Value is not None:4248 namespaceprefix_ = self.Value_nsprefix_ + ':' if (UseCapturedNS_ and self.Value_nsprefix_) else ''4249 showIndent(outfile, level, pretty_print)4250 outfile.write('<%sValue>%s</%sValue>%s' % (namespaceprefix_ , self.gds_format_double(self.Value, input_name='Value'), namespaceprefix_ , eol_))4251 if self.FlowRef is not None:4252 namespaceprefix_ = self.FlowRef_nsprefix_ + ':' if (UseCapturedNS_ and self.FlowRef_nsprefix_) else ''4253 showIndent(outfile, level, pretty_print)4254 outfile.write('<%sFlowRef>%s</%sFlowRef>%s' % (namespaceprefix_ , self.gds_format_integer(self.FlowRef, input_name='FlowRef'), namespaceprefix_ , eol_))4255 if self.OpZeroOrOne is not None:4256 namespaceprefix_ = self.OpZeroOrOne_nsprefix_ + ':' if (UseCapturedNS_ and self.OpZeroOrOne_nsprefix_) else ''4257 showIndent(outfile, level, pretty_print)4258 outfile.write('<%sOpZeroOrOne>%s</%sOpZeroOrOne>%s' % (namespaceprefix_ , self.gds_format_integer(self.OpZeroOrOne, input_name='OpZeroOrOne'), namespaceprefix_ , eol_))4259 if self.BaseSetInd is not None:4260 namespaceprefix_ = self.BaseSetInd_nsprefix_ + ':' if (UseCapturedNS_ and self.BaseSetInd_nsprefix_) else ''4261 showIndent(outfile, level, pretty_print)4262 outfile.write('<%sBaseSetInd>%s</%sBaseSetInd>%s' % (namespaceprefix_ , self.gds_format_integer(self.BaseSetInd, input_name='BaseSetInd'), namespaceprefix_ , eol_))4263 if self.Script is not None:4264 namespaceprefix_ = self.Script_nsprefix_ + ':' if (UseCapturedNS_ and self.Script_nsprefix_) else ''4265 showIndent(outfile, level, pretty_print)4266 outfile.write('<%sScript>%s</%sScript>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Script), input_name='Script')), namespaceprefix_ , eol_))4267 if self.InputReference is not None:4268 namespaceprefix_ = self.InputReference_nsprefix_ + ':' if (UseCapturedNS_ and self.InputReference_nsprefix_) else ''4269 showIndent(outfile, level, pretty_print)4270 outfile.write('<%sInputReference>%s</%sInputReference>%s' % (namespaceprefix_ , self.gds_format_integer(self.InputReference, input_name='InputReference'), namespaceprefix_ , eol_))4271 def to_etree(self, parent_element=None, name_='FunctionInputType', mapping_=None, reverse_mapping_=None, nsmap_=None):4272 if parent_element is None:4273 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4274 else:4275 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4276 if self.Position is not None:4277 element.set('Position', self.gds_format_integer(self.Position))4278 if self.Label is not None:4279 Label_ = self.Label4280 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Label').text = self.gds_format_string(Label_)4281 if self.I is not None:4282 I_ = self.I4283 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}I').text = self.gds_format_integer(I_)4284 if self.J is not None:4285 J_ = self.J4286 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}J').text = self.gds_format_integer(J_)4287 if self.Value is not None:4288 Value_ = self.Value4289 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Value').text = self.gds_format_double(Value_)4290 if self.FlowRef is not None:4291 FlowRef_ = self.FlowRef4292 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}FlowRef').text = self.gds_format_integer(FlowRef_)4293 if self.OpZeroOrOne is not None:4294 OpZeroOrOne_ = self.OpZeroOrOne4295 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}OpZeroOrOne').text = self.gds_format_integer(OpZeroOrOne_)4296 if self.BaseSetInd is not None:4297 BaseSetInd_ = self.BaseSetInd4298 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}BaseSetInd').text = self.gds_format_integer(BaseSetInd_)4299 if self.Script is not None:4300 Script_ = self.Script4301 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Script').text = self.gds_format_string(Script_)4302 if self.InputReference is not None:4303 InputReference_ = self.InputReference4304 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}InputReference').text = self.gds_format_integer(InputReference_)4305 if mapping_ is not None:4306 mapping_[id(self)] = element4307 if reverse_mapping_ is not None:4308 reverse_mapping_[element] = self4309 return element4310 def build(self, node, gds_collector_=None):4311 self.gds_collector_ = gds_collector_4312 if SaveElementTreeNode:4313 self.gds_elementtree_node_ = node4314 already_processed = set()4315 self.ns_prefix_ = node.prefix4316 self._buildAttributes(node, node.attrib, already_processed)4317 for child in node:4318 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4319 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)4320 return self4321 def _buildAttributes(self, node, attrs, already_processed):4322 value = find_attr_value_('Position', node)4323 if value is not None and 'Position' not in already_processed:4324 already_processed.add('Position')4325 self.Position = self.gds_parse_integer(value, node, 'Position')4326 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4327 if nodeName_ == 'Label':4328 value_ = child_.text4329 value_ = self.gds_parse_string(value_, node, 'Label')4330 value_ = self.gds_validate_string(value_, node, 'Label')4331 self.Label = value_4332 self.Label_nsprefix_ = child_.prefix4333 elif nodeName_ == 'I' and child_.text:4334 sval_ = child_.text4335 ival_ = self.gds_parse_integer(sval_, node, 'I')4336 ival_ = self.gds_validate_integer(ival_, node, 'I')4337 self.I = ival_4338 self.I_nsprefix_ = child_.prefix4339 elif nodeName_ == 'J' and child_.text:4340 sval_ = child_.text4341 ival_ = self.gds_parse_integer(sval_, node, 'J')4342 ival_ = self.gds_validate_integer(ival_, node, 'J')4343 self.J = ival_4344 self.J_nsprefix_ = child_.prefix4345 elif nodeName_ == 'Value' and child_.text:4346 sval_ = child_.text4347 fval_ = self.gds_parse_double(sval_, node, 'Value')4348 fval_ = self.gds_validate_double(fval_, node, 'Value')4349 self.Value = fval_4350 self.Value_nsprefix_ = child_.prefix4351 elif nodeName_ == 'FlowRef' and child_.text:4352 sval_ = child_.text4353 ival_ = self.gds_parse_integer(sval_, node, 'FlowRef')4354 ival_ = self.gds_validate_integer(ival_, node, 'FlowRef')4355 self.FlowRef = ival_4356 self.FlowRef_nsprefix_ = child_.prefix4357 elif nodeName_ == 'OpZeroOrOne' and child_.text:4358 sval_ = child_.text4359 ival_ = self.gds_parse_integer(sval_, node, 'OpZeroOrOne')4360 ival_ = self.gds_validate_integer(ival_, node, 'OpZeroOrOne')4361 self.OpZeroOrOne = ival_4362 self.OpZeroOrOne_nsprefix_ = child_.prefix4363 elif nodeName_ == 'BaseSetInd' and child_.text:4364 sval_ = child_.text4365 ival_ = self.gds_parse_integer(sval_, node, 'BaseSetInd')4366 ival_ = self.gds_validate_integer(ival_, node, 'BaseSetInd')4367 self.BaseSetInd = ival_4368 self.BaseSetInd_nsprefix_ = child_.prefix4369 elif nodeName_ == 'Script':4370 value_ = child_.text4371 value_ = self.gds_parse_string(value_, node, 'Script')4372 value_ = self.gds_validate_string(value_, node, 'Script')4373 self.Script = value_4374 self.Script_nsprefix_ = child_.prefix4375 elif nodeName_ == 'InputReference' and child_.text:4376 sval_ = child_.text4377 ival_ = self.gds_parse_integer(sval_, node, 'InputReference')4378 ival_ = self.gds_validate_integer(ival_, node, 'InputReference')4379 self.InputReference = ival_4380 self.InputReference_nsprefix_ = child_.prefix4381# end class FunctionInputType4382class RedundantFunctionalInputsType(GeneratedsSuper):4383 __hash__ = GeneratedsSuper.__hash__4384 subclass = None4385 superclass = None4386 def __init__(self, Number=None, FunctionInput=None, gds_collector_=None, **kwargs_):4387 self.gds_collector_ = gds_collector_4388 self.gds_elementtree_node_ = None4389 self.original_tagname_ = None4390 self.parent_object_ = kwargs_.get('parent_object_')4391 self.ns_prefix_ = None4392 self.Number = Number4393 self.Number_nsprefix_ = None4394 if FunctionInput is None:4395 self.FunctionInput = []4396 else:4397 self.FunctionInput = FunctionInput4398 self.FunctionInput_nsprefix_ = None4399 def factory(*args_, **kwargs_):4400 if CurrentSubclassModule_ is not None:4401 subclass = getSubclassFromModule_(4402 CurrentSubclassModule_, RedundantFunctionalInputsType)4403 if subclass is not None:4404 return subclass(*args_, **kwargs_)4405 if RedundantFunctionalInputsType.subclass:4406 return RedundantFunctionalInputsType.subclass(*args_, **kwargs_)4407 else:4408 return RedundantFunctionalInputsType(*args_, **kwargs_)4409 factory = staticmethod(factory)4410 def get_ns_prefix_(self):4411 return self.ns_prefix_4412 def set_ns_prefix_(self, ns_prefix):4413 self.ns_prefix_ = ns_prefix4414 def get_Number(self):4415 return self.Number4416 def set_Number(self, Number):4417 self.Number = Number4418 def get_FunctionInput(self):4419 return self.FunctionInput4420 def set_FunctionInput(self, FunctionInput):4421 self.FunctionInput = FunctionInput4422 def add_FunctionInput(self, value):4423 self.FunctionInput.append(value)4424 def insert_FunctionInput_at(self, index, value):4425 self.FunctionInput.insert(index, value)4426 def replace_FunctionInput_at(self, index, value):4427 self.FunctionInput[index] = value4428 def _hasContent(self):4429 if (4430 self.Number is not None or4431 self.FunctionInput4432 ):4433 return True4434 else:4435 return False4436 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='RedundantFunctionalInputsType', pretty_print=True):4437 imported_ns_def_ = GenerateDSNamespaceDefs_.get('RedundantFunctionalInputsType')4438 if imported_ns_def_ is not None:4439 namespacedef_ = imported_ns_def_4440 if pretty_print:4441 eol_ = '\n'4442 else:4443 eol_ = ''4444 if self.original_tagname_ is not None and name_ == 'RedundantFunctionalInputsType':4445 name_ = self.original_tagname_4446 if UseCapturedNS_ and self.ns_prefix_:4447 namespaceprefix_ = self.ns_prefix_ + ':'4448 showIndent(outfile, level, pretty_print)4449 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4450 already_processed = set()4451 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='RedundantFunctionalInputsType')4452 if self._hasContent():4453 outfile.write('>%s' % (eol_, ))4454 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='RedundantFunctionalInputsType', pretty_print=pretty_print)4455 showIndent(outfile, level, pretty_print)4456 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4457 else:4458 outfile.write('/>%s' % (eol_, ))4459 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='RedundantFunctionalInputsType'):4460 pass4461 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='RedundantFunctionalInputsType', fromsubclass_=False, pretty_print=True):4462 if pretty_print:4463 eol_ = '\n'4464 else:4465 eol_ = ''4466 if self.Number is not None:4467 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''4468 showIndent(outfile, level, pretty_print)4469 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))4470 for FunctionInput_ in self.FunctionInput:4471 namespaceprefix_ = self.FunctionInput_nsprefix_ + ':' if (UseCapturedNS_ and self.FunctionInput_nsprefix_) else ''4472 FunctionInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='FunctionInput', pretty_print=pretty_print)4473 def to_etree(self, parent_element=None, name_='RedundantFunctionalInputsType', mapping_=None, reverse_mapping_=None, nsmap_=None):4474 if parent_element is None:4475 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4476 else:4477 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4478 if self.Number is not None:4479 Number_ = self.Number4480 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Number').text = self.gds_format_integer(Number_)4481 for FunctionInput_ in self.FunctionInput:4482 FunctionInput_.to_etree(element, name_='FunctionInput', mapping_=mapping_, reverse_mapping_=reverse_mapping_, nsmap_=nsmap_)4483 if mapping_ is not None:4484 mapping_[id(self)] = element4485 if reverse_mapping_ is not None:4486 reverse_mapping_[element] = self4487 return element4488 def build(self, node, gds_collector_=None):4489 self.gds_collector_ = gds_collector_4490 if SaveElementTreeNode:4491 self.gds_elementtree_node_ = node4492 already_processed = set()4493 self.ns_prefix_ = node.prefix4494 self._buildAttributes(node, node.attrib, already_processed)4495 for child in node:4496 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4497 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)4498 return self4499 def _buildAttributes(self, node, attrs, already_processed):4500 pass4501 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4502 if nodeName_ == 'Number' and child_.text:4503 sval_ = child_.text4504 ival_ = self.gds_parse_integer(sval_, node, 'Number')4505 ival_ = self.gds_validate_integer(ival_, node, 'Number')4506 self.Number = ival_4507 self.Number_nsprefix_ = child_.prefix4508 elif nodeName_ == 'FunctionInput':4509 obj_ = FunctionInputType1.factory(parent_object_=self)4510 obj_.build(child_, gds_collector_=gds_collector_)4511 self.FunctionInput.append(obj_)4512 obj_.original_tagname_ = 'FunctionInput'4513# end class RedundantFunctionalInputsType4514class FunctionInputType1(GeneratedsSuper):4515 __hash__ = GeneratedsSuper.__hash__4516 subclass = None4517 superclass = None4518 def __init__(self, Position=None, Label=None, I=None, J=None, Value=None, FlowRef=None, OpZeroOrOne=None, BaseSetInd=None, Script=None, InputReference=None, gds_collector_=None, **kwargs_):4519 self.gds_collector_ = gds_collector_4520 self.gds_elementtree_node_ = None4521 self.original_tagname_ = None4522 self.parent_object_ = kwargs_.get('parent_object_')4523 self.ns_prefix_ = None4524 self.Position = _cast(int, Position)4525 self.Position_nsprefix_ = None4526 self.Label = Label4527 self.Label_nsprefix_ = None4528 self.I = I4529 self.I_nsprefix_ = None4530 self.J = J4531 self.J_nsprefix_ = None4532 self.Value = Value4533 self.Value_nsprefix_ = None4534 self.FlowRef = FlowRef4535 self.FlowRef_nsprefix_ = None4536 self.OpZeroOrOne = OpZeroOrOne4537 self.OpZeroOrOne_nsprefix_ = None4538 self.BaseSetInd = BaseSetInd4539 self.BaseSetInd_nsprefix_ = None4540 self.Script = Script4541 self.Script_nsprefix_ = None4542 self.InputReference = InputReference4543 self.InputReference_nsprefix_ = None4544 def factory(*args_, **kwargs_):4545 if CurrentSubclassModule_ is not None:4546 subclass = getSubclassFromModule_(4547 CurrentSubclassModule_, FunctionInputType1)4548 if subclass is not None:4549 return subclass(*args_, **kwargs_)4550 if FunctionInputType1.subclass:4551 return FunctionInputType1.subclass(*args_, **kwargs_)4552 else:4553 return FunctionInputType1(*args_, **kwargs_)4554 factory = staticmethod(factory)4555 def get_ns_prefix_(self):4556 return self.ns_prefix_4557 def set_ns_prefix_(self, ns_prefix):4558 self.ns_prefix_ = ns_prefix4559 def get_Label(self):4560 return self.Label4561 def set_Label(self, Label):4562 self.Label = Label4563 def get_I(self):4564 return self.I4565 def set_I(self, I):4566 self.I = I4567 def get_J(self):4568 return self.J4569 def set_J(self, J):4570 self.J = J4571 def get_Value(self):4572 return self.Value4573 def set_Value(self, Value):4574 self.Value = Value4575 def get_FlowRef(self):4576 return self.FlowRef4577 def set_FlowRef(self, FlowRef):4578 self.FlowRef = FlowRef4579 def get_OpZeroOrOne(self):4580 return self.OpZeroOrOne4581 def set_OpZeroOrOne(self, OpZeroOrOne):4582 self.OpZeroOrOne = OpZeroOrOne4583 def get_BaseSetInd(self):4584 return self.BaseSetInd4585 def set_BaseSetInd(self, BaseSetInd):4586 self.BaseSetInd = BaseSetInd4587 def get_Script(self):4588 return self.Script4589 def set_Script(self, Script):4590 self.Script = Script4591 def get_InputReference(self):4592 return self.InputReference4593 def set_InputReference(self, InputReference):4594 self.InputReference = InputReference4595 def get_Position(self):4596 return self.Position4597 def set_Position(self, Position):4598 self.Position = Position4599 def _hasContent(self):4600 if (4601 self.Label is not None or4602 self.I is not None or4603 self.J is not None or4604 self.Value is not None or4605 self.FlowRef is not None or4606 self.OpZeroOrOne is not None or4607 self.BaseSetInd is not None or4608 self.Script is not None or4609 self.InputReference is not None4610 ):4611 return True4612 else:4613 return False4614 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType1', pretty_print=True):4615 imported_ns_def_ = GenerateDSNamespaceDefs_.get('FunctionInputType1')4616 if imported_ns_def_ is not None:4617 namespacedef_ = imported_ns_def_4618 if pretty_print:4619 eol_ = '\n'4620 else:4621 eol_ = ''4622 if self.original_tagname_ is not None and name_ == 'FunctionInputType1':4623 name_ = self.original_tagname_4624 if UseCapturedNS_ and self.ns_prefix_:4625 namespaceprefix_ = self.ns_prefix_ + ':'4626 showIndent(outfile, level, pretty_print)4627 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4628 already_processed = set()4629 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FunctionInputType1')4630 if self._hasContent():4631 outfile.write('>%s' % (eol_, ))4632 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='FunctionInputType1', pretty_print=pretty_print)4633 showIndent(outfile, level, pretty_print)4634 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4635 else:4636 outfile.write('/>%s' % (eol_, ))4637 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='FunctionInputType1'):4638 if self.Position is not None and 'Position' not in already_processed:4639 already_processed.add('Position')4640 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))4641 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType1', fromsubclass_=False, pretty_print=True):4642 if pretty_print:4643 eol_ = '\n'4644 else:4645 eol_ = ''4646 if self.Label is not None:4647 namespaceprefix_ = self.Label_nsprefix_ + ':' if (UseCapturedNS_ and self.Label_nsprefix_) else ''4648 showIndent(outfile, level, pretty_print)4649 outfile.write('<%sLabel>%s</%sLabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Label), input_name='Label')), namespaceprefix_ , eol_))4650 if self.I is not None:4651 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''4652 showIndent(outfile, level, pretty_print)4653 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))4654 if self.J is not None:4655 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''4656 showIndent(outfile, level, pretty_print)4657 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))4658 if self.Value is not None:4659 namespaceprefix_ = self.Value_nsprefix_ + ':' if (UseCapturedNS_ and self.Value_nsprefix_) else ''4660 showIndent(outfile, level, pretty_print)4661 outfile.write('<%sValue>%s</%sValue>%s' % (namespaceprefix_ , self.gds_format_double(self.Value, input_name='Value'), namespaceprefix_ , eol_))4662 if self.FlowRef is not None:4663 namespaceprefix_ = self.FlowRef_nsprefix_ + ':' if (UseCapturedNS_ and self.FlowRef_nsprefix_) else ''4664 showIndent(outfile, level, pretty_print)4665 outfile.write('<%sFlowRef>%s</%sFlowRef>%s' % (namespaceprefix_ , self.gds_format_integer(self.FlowRef, input_name='FlowRef'), namespaceprefix_ , eol_))4666 if self.OpZeroOrOne is not None:4667 namespaceprefix_ = self.OpZeroOrOne_nsprefix_ + ':' if (UseCapturedNS_ and self.OpZeroOrOne_nsprefix_) else ''4668 showIndent(outfile, level, pretty_print)4669 outfile.write('<%sOpZeroOrOne>%s</%sOpZeroOrOne>%s' % (namespaceprefix_ , self.gds_format_integer(self.OpZeroOrOne, input_name='OpZeroOrOne'), namespaceprefix_ , eol_))4670 if self.BaseSetInd is not None:4671 namespaceprefix_ = self.BaseSetInd_nsprefix_ + ':' if (UseCapturedNS_ and self.BaseSetInd_nsprefix_) else ''4672 showIndent(outfile, level, pretty_print)4673 outfile.write('<%sBaseSetInd>%s</%sBaseSetInd>%s' % (namespaceprefix_ , self.gds_format_integer(self.BaseSetInd, input_name='BaseSetInd'), namespaceprefix_ , eol_))4674 if self.Script is not None:4675 namespaceprefix_ = self.Script_nsprefix_ + ':' if (UseCapturedNS_ and self.Script_nsprefix_) else ''4676 showIndent(outfile, level, pretty_print)4677 outfile.write('<%sScript>%s</%sScript>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Script), input_name='Script')), namespaceprefix_ , eol_))4678 if self.InputReference is not None:4679 namespaceprefix_ = self.InputReference_nsprefix_ + ':' if (UseCapturedNS_ and self.InputReference_nsprefix_) else ''4680 showIndent(outfile, level, pretty_print)4681 outfile.write('<%sInputReference>%s</%sInputReference>%s' % (namespaceprefix_ , self.gds_format_integer(self.InputReference, input_name='InputReference'), namespaceprefix_ , eol_))4682 def to_etree(self, parent_element=None, name_='FunctionInputType1', mapping_=None, reverse_mapping_=None, nsmap_=None):4683 if parent_element is None:4684 element = etree_.Element('{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4685 else:4686 element = etree_.SubElement(parent_element, '{https://github.com/wdatasci/WDS-ModelSpec}' + name_, nsmap=nsmap_)4687 if self.Position is not None:4688 element.set('Position', self.gds_format_integer(self.Position))4689 if self.Label is not None:4690 Label_ = self.Label4691 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Label').text = self.gds_format_string(Label_)4692 if self.I is not None:4693 I_ = self.I4694 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}I').text = self.gds_format_integer(I_)4695 if self.J is not None:4696 J_ = self.J4697 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}J').text = self.gds_format_integer(J_)4698 if self.Value is not None:4699 Value_ = self.Value4700 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Value').text = self.gds_format_double(Value_)4701 if self.FlowRef is not None:4702 FlowRef_ = self.FlowRef4703 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}FlowRef').text = self.gds_format_integer(FlowRef_)4704 if self.OpZeroOrOne is not None:4705 OpZeroOrOne_ = self.OpZeroOrOne4706 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}OpZeroOrOne').text = self.gds_format_integer(OpZeroOrOne_)4707 if self.BaseSetInd is not None:4708 BaseSetInd_ = self.BaseSetInd4709 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}BaseSetInd').text = self.gds_format_integer(BaseSetInd_)4710 if self.Script is not None:4711 Script_ = self.Script4712 etree_.SubElement(element, '{https://github.com/wdatasci/WDS-ModelSpec}Script').text = self.gds_format_string(Script_)4713 if self.InputReference is not None:4714 InputReference_ = self.InputReference...
gWDSMatrix_literal.py
Source:gWDSMatrix_literal.py
...295 decimal_.Decimal(value)296 except (TypeError, ValueError):297 raise_parse_error(node, 'Requires sequence of decimal values')298 return values299 def gds_format_double(self, input_data, input_name=''):300 return '%s' % input_data301 def gds_parse_double(self, input_data, node=None, input_name=''):302 try:303 fval_ = float(input_data)304 except (TypeError, ValueError) as exp:305 raise_parse_error(node, 'Requires double or float value: %s' % exp)306 return fval_307 def gds_validate_double(self, input_data, node=None, input_name=''):308 try:309 value = float(input_data)310 except (TypeError, ValueError):311 raise_parse_error(node, 'Requires double or float value')312 return value313 def gds_format_double_list(self, input_data, input_name=''):314 if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):315 input_data = [str(s) for s in input_data]316 return '%s' % ' '.join(input_data)317 def gds_validate_double_list(318 self, input_data, node=None, input_name=''):319 values = input_data.split()320 for value in values:321 try:322 float(value)323 except (TypeError, ValueError):324 raise_parse_error(325 node, 'Requires sequence of double or float values')326 return values327 def gds_format_boolean(self, input_data, input_name=''):328 return ('%s' % input_data).lower()329 def gds_parse_boolean(self, input_data, node=None, input_name=''):330 input_data = input_data.strip()331 if input_data in ('true', '1'):332 bval = True333 elif input_data in ('false', '0'):334 bval = False335 else:336 raise_parse_error(node, 'Requires boolean value')337 return bval338 def gds_validate_boolean(self, input_data, node=None, input_name=''):339 if input_data not in (True, 1, False, 0, ):340 raise_parse_error(341 node,342 'Requires boolean value '343 '(one of True, 1, False, 0)')344 return input_data345 def gds_format_boolean_list(self, input_data, input_name=''):346 if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):347 input_data = [str(s) for s in input_data]348 return '%s' % ' '.join(input_data)349 def gds_validate_boolean_list(350 self, input_data, node=None, input_name=''):351 values = input_data.split()352 for value in values:353 value = self.gds_parse_boolean(value, node, input_name)354 if value not in (True, 1, False, 0, ):355 raise_parse_error(356 node,357 'Requires sequence of boolean values '358 '(one of True, 1, False, 0)')359 return values360 def gds_validate_datetime(self, input_data, node=None, input_name=''):361 return input_data362 def gds_format_datetime(self, input_data, input_name=''):363 if input_data.microsecond == 0:364 _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (365 input_data.year,366 input_data.month,367 input_data.day,368 input_data.hour,369 input_data.minute,370 input_data.second,371 )372 else:373 _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (374 input_data.year,375 input_data.month,376 input_data.day,377 input_data.hour,378 input_data.minute,379 input_data.second,380 ('%f' % (float(input_data.microsecond) / 1000000))[2:],381 )382 if input_data.tzinfo is not None:383 tzoff = input_data.tzinfo.utcoffset(input_data)384 if tzoff is not None:385 total_seconds = tzoff.seconds + (86400 * tzoff.days)386 if total_seconds == 0:387 _svalue += 'Z'388 else:389 if total_seconds < 0:390 _svalue += '-'391 total_seconds *= -1392 else:393 _svalue += '+'394 hours = total_seconds // 3600395 minutes = (total_seconds - (hours * 3600)) // 60396 _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)397 return _svalue398 @classmethod399 def gds_parse_datetime(cls, input_data):400 tz = None401 if input_data[-1] == 'Z':402 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')403 input_data = input_data[:-1]404 else:405 results = GeneratedsSuper.tzoff_pattern.search(input_data)406 if results is not None:407 tzoff_parts = results.group(2).split(':')408 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])409 if results.group(1) == '-':410 tzoff *= -1411 tz = GeneratedsSuper._FixedOffsetTZ(412 tzoff, results.group(0))413 input_data = input_data[:-6]414 time_parts = input_data.split('.')415 if len(time_parts) > 1:416 micro_seconds = int(float('0.' + time_parts[1]) * 1000000)417 input_data = '%s.%s' % (418 time_parts[0], "{}".format(micro_seconds).rjust(6, "0"), )419 dt = datetime_.datetime.strptime(420 input_data, '%Y-%m-%dT%H:%M:%S.%f')421 else:422 dt = datetime_.datetime.strptime(423 input_data, '%Y-%m-%dT%H:%M:%S')424 dt = dt.replace(tzinfo=tz)425 return dt426 def gds_validate_date(self, input_data, node=None, input_name=''):427 return input_data428 def gds_format_date(self, input_data, input_name=''):429 _svalue = '%04d-%02d-%02d' % (430 input_data.year,431 input_data.month,432 input_data.day,433 )434 try:435 if input_data.tzinfo is not None:436 tzoff = input_data.tzinfo.utcoffset(input_data)437 if tzoff is not None:438 total_seconds = tzoff.seconds + (86400 * tzoff.days)439 if total_seconds == 0:440 _svalue += 'Z'441 else:442 if total_seconds < 0:443 _svalue += '-'444 total_seconds *= -1445 else:446 _svalue += '+'447 hours = total_seconds // 3600448 minutes = (total_seconds - (hours * 3600)) // 60449 _svalue += '{0:02d}:{1:02d}'.format(450 hours, minutes)451 except AttributeError:452 pass453 return _svalue454 @classmethod455 def gds_parse_date(cls, input_data):456 tz = None457 if input_data[-1] == 'Z':458 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')459 input_data = input_data[:-1]460 else:461 results = GeneratedsSuper.tzoff_pattern.search(input_data)462 if results is not None:463 tzoff_parts = results.group(2).split(':')464 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])465 if results.group(1) == '-':466 tzoff *= -1467 tz = GeneratedsSuper._FixedOffsetTZ(468 tzoff, results.group(0))469 input_data = input_data[:-6]470 dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')471 dt = dt.replace(tzinfo=tz)472 return dt.date()473 def gds_validate_time(self, input_data, node=None, input_name=''):474 return input_data475 def gds_format_time(self, input_data, input_name=''):476 if input_data.microsecond == 0:477 _svalue = '%02d:%02d:%02d' % (478 input_data.hour,479 input_data.minute,480 input_data.second,481 )482 else:483 _svalue = '%02d:%02d:%02d.%s' % (484 input_data.hour,485 input_data.minute,486 input_data.second,487 ('%f' % (float(input_data.microsecond) / 1000000))[2:],488 )489 if input_data.tzinfo is not None:490 tzoff = input_data.tzinfo.utcoffset(input_data)491 if tzoff is not None:492 total_seconds = tzoff.seconds + (86400 * tzoff.days)493 if total_seconds == 0:494 _svalue += 'Z'495 else:496 if total_seconds < 0:497 _svalue += '-'498 total_seconds *= -1499 else:500 _svalue += '+'501 hours = total_seconds // 3600502 minutes = (total_seconds - (hours * 3600)) // 60503 _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)504 return _svalue505 def gds_validate_simple_patterns(self, patterns, target):506 # pat is a list of lists of strings/patterns.507 # The target value must match at least one of the patterns508 # in order for the test to succeed.509 found1 = True510 target = str(target)511 for patterns1 in patterns:512 found2 = False513 for patterns2 in patterns1:514 mo = re_.search(patterns2, target)515 if mo is not None and len(mo.group(0)) == len(target):516 found2 = True517 break518 if not found2:519 found1 = False520 break521 return found1522 @classmethod523 def gds_parse_time(cls, input_data):524 tz = None525 if input_data[-1] == 'Z':526 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')527 input_data = input_data[:-1]528 else:529 results = GeneratedsSuper.tzoff_pattern.search(input_data)530 if results is not None:531 tzoff_parts = results.group(2).split(':')532 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])533 if results.group(1) == '-':534 tzoff *= -1535 tz = GeneratedsSuper._FixedOffsetTZ(536 tzoff, results.group(0))537 input_data = input_data[:-6]538 if len(input_data.split('.')) > 1:539 dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')540 else:541 dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')542 dt = dt.replace(tzinfo=tz)543 return dt.time()544 def gds_check_cardinality_(545 self, value, input_name,546 min_occurs=0, max_occurs=1, required=None):547 if value is None:548 length = 0549 elif isinstance(value, list):550 length = len(value)551 else:552 length = 1553 if required is not None :554 if required and length < 1:555 self.gds_collector_.add_message(556 "Required value {}{} is missing".format(557 input_name, self.gds_get_node_lineno_()))558 if length < min_occurs:559 self.gds_collector_.add_message(560 "Number of values for {}{} is below "561 "the minimum allowed, "562 "expected at least {}, found {}".format(563 input_name, self.gds_get_node_lineno_(),564 min_occurs, length))565 elif length > max_occurs:566 self.gds_collector_.add_message(567 "Number of values for {}{} is above "568 "the maximum allowed, "569 "expected at most {}, found {}".format(570 input_name, self.gds_get_node_lineno_(),571 max_occurs, length))572 def gds_validate_builtin_ST_(573 self, validator, value, input_name,574 min_occurs=None, max_occurs=None, required=None):575 if value is not None:576 try:577 validator(value, input_name=input_name)578 except GDSParseError as parse_error:579 self.gds_collector_.add_message(str(parse_error))580 def gds_validate_defined_ST_(581 self, validator, value, input_name,582 min_occurs=None, max_occurs=None, required=None):583 if value is not None:584 try:585 validator(value)586 except GDSParseError as parse_error:587 self.gds_collector_.add_message(str(parse_error))588 def gds_str_lower(self, instring):589 return instring.lower()590 def get_path_(self, node):591 path_list = []592 self.get_path_list_(node, path_list)593 path_list.reverse()594 path = '/'.join(path_list)595 return path596 Tag_strip_pattern_ = re_.compile(r'\{.*\}')597 def get_path_list_(self, node, path_list):598 if node is None:599 return600 tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)601 if tag:602 path_list.append(tag)603 self.get_path_list_(node.getparent(), path_list)604 def get_class_obj_(self, node, default_class=None):605 class_obj1 = default_class606 if 'xsi' in node.nsmap:607 classname = node.get('{%s}type' % node.nsmap['xsi'])608 if classname is not None:609 names = classname.split(':')610 if len(names) == 2:611 classname = names[1]612 class_obj2 = globals().get(classname)613 if class_obj2 is not None:614 class_obj1 = class_obj2615 return class_obj1616 def gds_build_any(self, node, type_name=None):617 # provide default value in case option --disable-xml is used.618 content = ""619 content = etree_.tostring(node, encoding="unicode")620 return content621 @classmethod622 def gds_reverse_node_mapping(cls, mapping):623 return dict(((v, k) for k, v in mapping.items()))624 @staticmethod625 def gds_encode(instring):626 if sys.version_info.major == 2:627 if ExternalEncoding:628 encoding = ExternalEncoding629 else:630 encoding = 'utf-8'631 return instring.encode(encoding)632 else:633 return instring634 @staticmethod635 def convert_unicode(instring):636 if isinstance(instring, str):637 result = quote_xml(instring)638 elif sys.version_info.major == 2 and isinstance(instring, unicode):639 result = quote_xml(instring).encode('utf8')640 else:641 result = GeneratedsSuper.gds_encode(str(instring))642 return result643 def __eq__(self, other):644 def excl_select_objs_(obj):645 return (obj[0] != 'parent_object_' and646 obj[0] != 'gds_collector_')647 if type(self) != type(other):648 return False649 return all(x == y for x, y in zip_longest(650 filter(excl_select_objs_, self.__dict__.items()),651 filter(excl_select_objs_, other.__dict__.items())))652 def __ne__(self, other):653 return not self.__eq__(other)654 # Django ETL transform hooks.655 def gds_djo_etl_transform(self):656 pass657 def gds_djo_etl_transform_db_obj(self, dbobj):658 pass659 # SQLAlchemy ETL transform hooks.660 def gds_sqa_etl_transform(self):661 return 0, None662 def gds_sqa_etl_transform_db_obj(self, dbobj):663 pass664 def gds_get_node_lineno_(self):665 if (hasattr(self, "gds_elementtree_node_") and666 self.gds_elementtree_node_ is not None):667 return ' near line {}'.format(668 self.gds_elementtree_node_.sourceline)669 else:670 return ""671 672 673 def getSubclassFromModule_(module, class_):674 '''Get the subclass of a class from a specific module.'''675 name = class_.__name__ + 'Sub'676 if hasattr(module, name):677 return getattr(module, name)678 else:679 return None680#681# If you have installed IPython you can uncomment and use the following.682# IPython is available from http://ipython.scipy.org/.683#684## from IPython.Shell import IPShellEmbed685## args = ''686## ipshell = IPShellEmbed(args,687## banner = 'Dropping into IPython',688## exit_msg = 'Leaving Interpreter, back to program.')689# Then use the following line where and when you want to drop into the690# IPython shell:691# ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')692#693# Globals694#695ExternalEncoding = ''696# Set this to false in order to deactivate during export, the use of697# name space prefixes captured from the input document.698UseCapturedNS_ = True699CapturedNsmap_ = {}700Tag_pattern_ = re_.compile(r'({.*})?(.*)')701String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")702Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')703CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)704# Change this to redirect the generated superclass module to use a705# specific subclass module.706CurrentSubclassModule_ = None707#708# Support/utility functions.709#710def showIndent(outfile, level, pretty_print=True):711 if pretty_print:712 for idx in range(level):713 outfile.write(' ')714def quote_xml(inStr):715 "Escape markup chars, but do not modify CDATA sections."716 if not inStr:717 return ''718 s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)719 s2 = ''720 pos = 0721 matchobjects = CDATA_pattern_.finditer(s1)722 for mo in matchobjects:723 s3 = s1[pos:mo.start()]724 s2 += quote_xml_aux(s3)725 s2 += s1[mo.start():mo.end()]726 pos = mo.end()727 s3 = s1[pos:]728 s2 += quote_xml_aux(s3)729 return s2730def quote_xml_aux(inStr):731 s1 = inStr.replace('&', '&')732 s1 = s1.replace('<', '<')733 s1 = s1.replace('>', '>')734 return s1735def quote_attrib(inStr):736 s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)737 s1 = s1.replace('&', '&')738 s1 = s1.replace('<', '<')739 s1 = s1.replace('>', '>')740 s1 = s1.replace('\n', ' ')741 if '"' in s1:742 if "'" in s1:743 s1 = '"%s"' % s1.replace('"', """)744 else:745 s1 = "'%s'" % s1746 else:747 s1 = '"%s"' % s1748 return s1749def quote_python(inStr):750 s1 = inStr751 if s1.find("'") == -1:752 if s1.find('\n') == -1:753 return "'%s'" % s1754 else:755 return "'''%s'''" % s1756 else:757 if s1.find('"') != -1:758 s1 = s1.replace('"', '\\"')759 if s1.find('\n') == -1:760 return '"%s"' % s1761 else:762 return '"""%s"""' % s1763def get_all_text_(node):764 if node.text is not None:765 text = node.text766 else:767 text = ''768 for child in node:769 if child.tail is not None:770 text += child.tail771 return text772def find_attr_value_(attr_name, node):773 attrs = node.attrib774 attr_parts = attr_name.split(':')775 value = None776 if len(attr_parts) == 1:777 value = attrs.get(attr_name)778 elif len(attr_parts) == 2:779 prefix, name = attr_parts780 if prefix == 'xml':781 namespace = 'http://www.w3.org/XML/1998/namespace'782 else:783 namespace = node.nsmap.get(prefix)784 if namespace is not None:785 value = attrs.get('{%s}%s' % (namespace, name, ))786 return value787def encode_str_2_3(instr):788 return instr789class GDSParseError(Exception):790 pass791def raise_parse_error(node, msg):792 if node is not None:793 msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )794 raise GDSParseError(msg)795class MixedContainer:796 # Constants for category:797 CategoryNone = 0798 CategoryText = 1799 CategorySimple = 2800 CategoryComplex = 3801 # Constants for content_type:802 TypeNone = 0803 TypeText = 1804 TypeString = 2805 TypeInteger = 3806 TypeFloat = 4807 TypeDecimal = 5808 TypeDouble = 6809 TypeBoolean = 7810 TypeBase64 = 8811 def __init__(self, category, content_type, name, value):812 self.category = category813 self.content_type = content_type814 self.name = name815 self.value = value816 def getCategory(self):817 return self.category818 def getContenttype(self, content_type):819 return self.content_type820 def getValue(self):821 return self.value822 def getName(self):823 return self.name824 def export(self, outfile, level, name, namespace,825 pretty_print=True):826 if self.category == MixedContainer.CategoryText:827 # Prevent exporting empty content as empty lines.828 if self.value.strip():829 outfile.write(self.value)830 elif self.category == MixedContainer.CategorySimple:831 self.exportSimple(outfile, level, name)832 else: # category == MixedContainer.CategoryComplex833 self.value.export(834 outfile, level, namespace, name_=name,835 pretty_print=pretty_print)836 def exportSimple(self, outfile, level, name):837 if self.content_type == MixedContainer.TypeString:838 outfile.write('<%s>%s</%s>' % (839 self.name, self.value, self.name))840 elif self.content_type == MixedContainer.TypeInteger or \841 self.content_type == MixedContainer.TypeBoolean:842 outfile.write('<%s>%d</%s>' % (843 self.name, self.value, self.name))844 elif self.content_type == MixedContainer.TypeFloat or \845 self.content_type == MixedContainer.TypeDecimal:846 outfile.write('<%s>%f</%s>' % (847 self.name, self.value, self.name))848 elif self.content_type == MixedContainer.TypeDouble:849 outfile.write('<%s>%g</%s>' % (850 self.name, self.value, self.name))851 elif self.content_type == MixedContainer.TypeBase64:852 outfile.write('<%s>%s</%s>' % (853 self.name,854 base64.b64encode(self.value),855 self.name))856 def to_etree(self, element, mapping_=None, reverse_mapping_=None, nsmap_=None):857 if self.category == MixedContainer.CategoryText:858 # Prevent exporting empty content as empty lines.859 if self.value.strip():860 if len(element) > 0:861 if element[-1].tail is None:862 element[-1].tail = self.value863 else:864 element[-1].tail += self.value865 else:866 if element.text is None:867 element.text = self.value868 else:869 element.text += self.value870 elif self.category == MixedContainer.CategorySimple:871 subelement = etree_.SubElement(872 element, '%s' % self.name)873 subelement.text = self.to_etree_simple()874 else: # category == MixedContainer.CategoryComplex875 self.value.to_etree(element)876 def to_etree_simple(self, mapping_=None, reverse_mapping_=None, nsmap_=None):877 if self.content_type == MixedContainer.TypeString:878 text = self.value879 elif (self.content_type == MixedContainer.TypeInteger or880 self.content_type == MixedContainer.TypeBoolean):881 text = '%d' % self.value882 elif (self.content_type == MixedContainer.TypeFloat or883 self.content_type == MixedContainer.TypeDecimal):884 text = '%f' % self.value885 elif self.content_type == MixedContainer.TypeDouble:886 text = '%g' % self.value887 elif self.content_type == MixedContainer.TypeBase64:888 text = '%s' % base64.b64encode(self.value)889 return text890 def exportLiteral(self, outfile, level, name):891 if self.category == MixedContainer.CategoryText:892 showIndent(outfile, level)893 outfile.write(894 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (895 self.category, self.content_type,896 self.name, self.value))897 elif self.category == MixedContainer.CategorySimple:898 showIndent(outfile, level)899 outfile.write(900 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (901 self.category, self.content_type,902 self.name, self.value))903 else: # category == MixedContainer.CategoryComplex904 showIndent(outfile, level)905 outfile.write(906 'model_.MixedContainer(%d, %d, "%s",\n' % (907 self.category, self.content_type, self.name,))908 self.value.exportLiteral(outfile, level + 1)909 showIndent(outfile, level)910 outfile.write(')\n')911class MemberSpec_(object):912 def __init__(self, name='', data_type='', container=0,913 optional=0, child_attrs=None, choice=None):914 self.name = name915 self.data_type = data_type916 self.container = container917 self.child_attrs = child_attrs918 self.choice = choice919 self.optional = optional920 def set_name(self, name): self.name = name921 def get_name(self): return self.name922 def set_data_type(self, data_type): self.data_type = data_type923 def get_data_type_chain(self): return self.data_type924 def get_data_type(self):925 if isinstance(self.data_type, list):926 if len(self.data_type) > 0:927 return self.data_type[-1]928 else:929 return 'xs:string'930 else:931 return self.data_type932 def set_container(self, container): self.container = container933 def get_container(self): return self.container934 def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs935 def get_child_attrs(self): return self.child_attrs936 def set_choice(self, choice): self.choice = choice937 def get_choice(self): return self.choice938 def set_optional(self, optional): self.optional = optional939 def get_optional(self): return self.optional940def _cast(typ, value):941 if typ is None or value is None:942 return value943 return typ(value)944#945# Data representation classes.946#947class WDSMatrix(GeneratedsSuper):948 __hash__ = GeneratedsSuper.__hash__949 subclass = None950 superclass = None951 def __init__(self, Name=None, NumberOfStates=None, NumberOfAdditionalAxes=None, ProvidesNonZeroCoords=None, AdditionalAxesUpperLimits=None, AdditionalAxesLowerLimits=None, StateLabels=None, NonZeroElements=None, MData=None, Betas=None, FunctionalInputs=None, RedundantFunctionalInputs=None, gds_collector_=None, **kwargs_):952 self.gds_collector_ = gds_collector_953 self.gds_elementtree_node_ = None954 self.original_tagname_ = None955 self.parent_object_ = kwargs_.get('parent_object_')956 self.ns_prefix_ = None957 self.Name = _cast(None, Name)958 self.Name_nsprefix_ = None959 self.NumberOfStates = NumberOfStates960 self.NumberOfStates_nsprefix_ = None961 self.NumberOfAdditionalAxes = NumberOfAdditionalAxes962 self.NumberOfAdditionalAxes_nsprefix_ = None963 self.ProvidesNonZeroCoords = ProvidesNonZeroCoords964 self.ProvidesNonZeroCoords_nsprefix_ = None965 self.AdditionalAxesUpperLimits = AdditionalAxesUpperLimits966 self.AdditionalAxesUpperLimits_nsprefix_ = None967 self.AdditionalAxesLowerLimits = AdditionalAxesLowerLimits968 self.AdditionalAxesLowerLimits_nsprefix_ = None969 self.StateLabels = StateLabels970 self.StateLabels_nsprefix_ = None971 self.NonZeroElements = NonZeroElements972 self.NonZeroElements_nsprefix_ = None973 if MData is None:974 self.MData = []975 else:976 self.MData = MData977 self.MData_nsprefix_ = None978 self.Betas = Betas979 self.Betas_nsprefix_ = None980 self.FunctionalInputs = FunctionalInputs981 self.FunctionalInputs_nsprefix_ = None982 self.RedundantFunctionalInputs = RedundantFunctionalInputs983 self.RedundantFunctionalInputs_nsprefix_ = None984 def factory(*args_, **kwargs_):985 if CurrentSubclassModule_ is not None:986 subclass = getSubclassFromModule_(987 CurrentSubclassModule_, WDSMatrix)988 if subclass is not None:989 return subclass(*args_, **kwargs_)990 if WDSMatrix.subclass:991 return WDSMatrix.subclass(*args_, **kwargs_)992 else:993 return WDSMatrix(*args_, **kwargs_)994 factory = staticmethod(factory)995 def get_ns_prefix_(self):996 return self.ns_prefix_997 def set_ns_prefix_(self, ns_prefix):998 self.ns_prefix_ = ns_prefix999 def get_NumberOfStates(self):1000 return self.NumberOfStates1001 def set_NumberOfStates(self, NumberOfStates):1002 self.NumberOfStates = NumberOfStates1003 def get_NumberOfAdditionalAxes(self):1004 return self.NumberOfAdditionalAxes1005 def set_NumberOfAdditionalAxes(self, NumberOfAdditionalAxes):1006 self.NumberOfAdditionalAxes = NumberOfAdditionalAxes1007 def get_ProvidesNonZeroCoords(self):1008 return self.ProvidesNonZeroCoords1009 def set_ProvidesNonZeroCoords(self, ProvidesNonZeroCoords):1010 self.ProvidesNonZeroCoords = ProvidesNonZeroCoords1011 def get_AdditionalAxesUpperLimits(self):1012 return self.AdditionalAxesUpperLimits1013 def set_AdditionalAxesUpperLimits(self, AdditionalAxesUpperLimits):1014 self.AdditionalAxesUpperLimits = AdditionalAxesUpperLimits1015 def get_AdditionalAxesLowerLimits(self):1016 return self.AdditionalAxesLowerLimits1017 def set_AdditionalAxesLowerLimits(self, AdditionalAxesLowerLimits):1018 self.AdditionalAxesLowerLimits = AdditionalAxesLowerLimits1019 def get_StateLabels(self):1020 return self.StateLabels1021 def set_StateLabels(self, StateLabels):1022 self.StateLabels = StateLabels1023 def get_NonZeroElements(self):1024 return self.NonZeroElements1025 def set_NonZeroElements(self, NonZeroElements):1026 self.NonZeroElements = NonZeroElements1027 def get_MData(self):1028 return self.MData1029 def set_MData(self, MData):1030 self.MData = MData1031 def add_MData(self, value):1032 self.MData.append(value)1033 def insert_MData_at(self, index, value):1034 self.MData.insert(index, value)1035 def replace_MData_at(self, index, value):1036 self.MData[index] = value1037 def get_Betas(self):1038 return self.Betas1039 def set_Betas(self, Betas):1040 self.Betas = Betas1041 def get_FunctionalInputs(self):1042 return self.FunctionalInputs1043 def set_FunctionalInputs(self, FunctionalInputs):1044 self.FunctionalInputs = FunctionalInputs1045 def get_RedundantFunctionalInputs(self):1046 return self.RedundantFunctionalInputs1047 def set_RedundantFunctionalInputs(self, RedundantFunctionalInputs):1048 self.RedundantFunctionalInputs = RedundantFunctionalInputs1049 def get_Name(self):1050 return self.Name1051 def set_Name(self, Name):1052 self.Name = Name1053 def _hasContent(self):1054 if (1055 self.NumberOfStates is not None or1056 self.NumberOfAdditionalAxes is not None or1057 self.ProvidesNonZeroCoords is not None or1058 self.AdditionalAxesUpperLimits is not None or1059 self.AdditionalAxesLowerLimits is not None or1060 self.StateLabels is not None or1061 self.NonZeroElements is not None or1062 self.MData or1063 self.Betas is not None or1064 self.FunctionalInputs is not None or1065 self.RedundantFunctionalInputs is not None1066 ):1067 return True1068 else:1069 return False1070 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='WDSMatrix', pretty_print=True):1071 imported_ns_def_ = GenerateDSNamespaceDefs_.get('WDSMatrix')1072 if imported_ns_def_ is not None:1073 namespacedef_ = imported_ns_def_1074 if pretty_print:1075 eol_ = '\n'1076 else:1077 eol_ = ''1078 if self.original_tagname_ is not None and name_ == 'WDSMatrix':1079 name_ = self.original_tagname_1080 if UseCapturedNS_ and self.ns_prefix_:1081 namespaceprefix_ = self.ns_prefix_ + ':'1082 showIndent(outfile, level, pretty_print)1083 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1084 already_processed = set()1085 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='WDSMatrix')1086 if self._hasContent():1087 outfile.write('>%s' % (eol_, ))1088 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='WDSMatrix', pretty_print=pretty_print)1089 showIndent(outfile, level, pretty_print)1090 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1091 else:1092 outfile.write('/>%s' % (eol_, ))1093 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='WDSMatrix'):1094 if self.Name is not None and 'Name' not in already_processed:1095 already_processed.add('Name')1096 outfile.write(' Name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Name), input_name='Name')), ))1097 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='WDSMatrix', fromsubclass_=False, pretty_print=True):1098 if pretty_print:1099 eol_ = '\n'1100 else:1101 eol_ = ''1102 if self.NumberOfStates is not None:1103 namespaceprefix_ = self.NumberOfStates_nsprefix_ + ':' if (UseCapturedNS_ and self.NumberOfStates_nsprefix_) else ''1104 showIndent(outfile, level, pretty_print)1105 outfile.write('<%sNumberOfStates>%s</%sNumberOfStates>%s' % (namespaceprefix_ , self.gds_format_integer(self.NumberOfStates, input_name='NumberOfStates'), namespaceprefix_ , eol_))1106 if self.NumberOfAdditionalAxes is not None:1107 namespaceprefix_ = self.NumberOfAdditionalAxes_nsprefix_ + ':' if (UseCapturedNS_ and self.NumberOfAdditionalAxes_nsprefix_) else ''1108 showIndent(outfile, level, pretty_print)1109 outfile.write('<%sNumberOfAdditionalAxes>%s</%sNumberOfAdditionalAxes>%s' % (namespaceprefix_ , self.gds_format_integer(self.NumberOfAdditionalAxes, input_name='NumberOfAdditionalAxes'), namespaceprefix_ , eol_))1110 if self.ProvidesNonZeroCoords is not None:1111 namespaceprefix_ = self.ProvidesNonZeroCoords_nsprefix_ + ':' if (UseCapturedNS_ and self.ProvidesNonZeroCoords_nsprefix_) else ''1112 showIndent(outfile, level, pretty_print)1113 outfile.write('<%sProvidesNonZeroCoords>%s</%sProvidesNonZeroCoords>%s' % (namespaceprefix_ , self.gds_format_integer(self.ProvidesNonZeroCoords, input_name='ProvidesNonZeroCoords'), namespaceprefix_ , eol_))1114 if self.AdditionalAxesUpperLimits is not None:1115 namespaceprefix_ = self.AdditionalAxesUpperLimits_nsprefix_ + ':' if (UseCapturedNS_ and self.AdditionalAxesUpperLimits_nsprefix_) else ''1116 self.AdditionalAxesUpperLimits.export(outfile, level, namespaceprefix_, namespacedef_='', name_='AdditionalAxesUpperLimits', pretty_print=pretty_print)1117 if self.AdditionalAxesLowerLimits is not None:1118 namespaceprefix_ = self.AdditionalAxesLowerLimits_nsprefix_ + ':' if (UseCapturedNS_ and self.AdditionalAxesLowerLimits_nsprefix_) else ''1119 self.AdditionalAxesLowerLimits.export(outfile, level, namespaceprefix_, namespacedef_='', name_='AdditionalAxesLowerLimits', pretty_print=pretty_print)1120 if self.StateLabels is not None:1121 namespaceprefix_ = self.StateLabels_nsprefix_ + ':' if (UseCapturedNS_ and self.StateLabels_nsprefix_) else ''1122 self.StateLabels.export(outfile, level, namespaceprefix_, namespacedef_='', name_='StateLabels', pretty_print=pretty_print)1123 if self.NonZeroElements is not None:1124 namespaceprefix_ = self.NonZeroElements_nsprefix_ + ':' if (UseCapturedNS_ and self.NonZeroElements_nsprefix_) else ''1125 self.NonZeroElements.export(outfile, level, namespaceprefix_, namespacedef_='', name_='NonZeroElements', pretty_print=pretty_print)1126 for MData_ in self.MData:1127 namespaceprefix_ = self.MData_nsprefix_ + ':' if (UseCapturedNS_ and self.MData_nsprefix_) else ''1128 MData_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='MData', pretty_print=pretty_print)1129 if self.Betas is not None:1130 namespaceprefix_ = self.Betas_nsprefix_ + ':' if (UseCapturedNS_ and self.Betas_nsprefix_) else ''1131 self.Betas.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Betas', pretty_print=pretty_print)1132 if self.FunctionalInputs is not None:1133 namespaceprefix_ = self.FunctionalInputs_nsprefix_ + ':' if (UseCapturedNS_ and self.FunctionalInputs_nsprefix_) else ''1134 self.FunctionalInputs.export(outfile, level, namespaceprefix_, namespacedef_='', name_='FunctionalInputs', pretty_print=pretty_print)1135 if self.RedundantFunctionalInputs is not None:1136 namespaceprefix_ = self.RedundantFunctionalInputs_nsprefix_ + ':' if (UseCapturedNS_ and self.RedundantFunctionalInputs_nsprefix_) else ''1137 self.RedundantFunctionalInputs.export(outfile, level, namespaceprefix_, namespacedef_='', name_='RedundantFunctionalInputs', pretty_print=pretty_print)1138 def exportLiteral(self, outfile, level, name_='WDSMatrix'):1139 level += 11140 already_processed = set()1141 self._exportLiteralAttributes(outfile, level, already_processed, name_)1142 if self._hasContent():1143 self._exportLiteralChildren(outfile, level, name_)1144 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):1145 if self.Name is not None and 'Name' not in already_processed:1146 already_processed.add('Name')1147 showIndent(outfile, level)1148 outfile.write('Name="%s",\n' % (self.Name,))1149 def _exportLiteralChildren(self, outfile, level, name_):1150 if self.NumberOfStates is not None:1151 showIndent(outfile, level)1152 outfile.write('NumberOfStates=%d,\n' % self.NumberOfStates)1153 if self.NumberOfAdditionalAxes is not None:1154 showIndent(outfile, level)1155 outfile.write('NumberOfAdditionalAxes=%d,\n' % self.NumberOfAdditionalAxes)1156 if self.ProvidesNonZeroCoords is not None:1157 showIndent(outfile, level)1158 outfile.write('ProvidesNonZeroCoords=%d,\n' % self.ProvidesNonZeroCoords)1159 if self.AdditionalAxesUpperLimits is not None:1160 showIndent(outfile, level)1161 outfile.write('AdditionalAxesUpperLimits=model_.AdditionalAxesUpperLimitsType(\n')1162 self.AdditionalAxesUpperLimits.exportLiteral(outfile, level, name_='AdditionalAxesUpperLimits')1163 showIndent(outfile, level)1164 outfile.write('),\n')1165 if self.AdditionalAxesLowerLimits is not None:1166 showIndent(outfile, level)1167 outfile.write('AdditionalAxesLowerLimits=model_.AdditionalAxesLowerLimitsType(\n')1168 self.AdditionalAxesLowerLimits.exportLiteral(outfile, level, name_='AdditionalAxesLowerLimits')1169 showIndent(outfile, level)1170 outfile.write('),\n')1171 if self.StateLabels is not None:1172 showIndent(outfile, level)1173 outfile.write('StateLabels=model_.StateLabelsType(\n')1174 self.StateLabels.exportLiteral(outfile, level, name_='StateLabels')1175 showIndent(outfile, level)1176 outfile.write('),\n')1177 if self.NonZeroElements is not None:1178 showIndent(outfile, level)1179 outfile.write('NonZeroElements=model_.NonZeroElementsType(\n')1180 self.NonZeroElements.exportLiteral(outfile, level, name_='NonZeroElements')1181 showIndent(outfile, level)1182 outfile.write('),\n')1183 showIndent(outfile, level)1184 outfile.write('MData=[\n')1185 level += 11186 for MData_ in self.MData:1187 showIndent(outfile, level)1188 outfile.write('model_.MDataType(\n')1189 MData_.exportLiteral(outfile, level, name_='MDataType')1190 showIndent(outfile, level)1191 outfile.write('),\n')1192 level -= 11193 showIndent(outfile, level)1194 outfile.write('],\n')1195 if self.Betas is not None:1196 showIndent(outfile, level)1197 outfile.write('Betas=model_.BetasType(\n')1198 self.Betas.exportLiteral(outfile, level, name_='Betas')1199 showIndent(outfile, level)1200 outfile.write('),\n')1201 if self.FunctionalInputs is not None:1202 showIndent(outfile, level)1203 outfile.write('FunctionalInputs=model_.FunctionalInputsType(\n')1204 self.FunctionalInputs.exportLiteral(outfile, level, name_='FunctionalInputs')1205 showIndent(outfile, level)1206 outfile.write('),\n')1207 if self.RedundantFunctionalInputs is not None:1208 showIndent(outfile, level)1209 outfile.write('RedundantFunctionalInputs=model_.RedundantFunctionalInputsType(\n')1210 self.RedundantFunctionalInputs.exportLiteral(outfile, level, name_='RedundantFunctionalInputs')1211 showIndent(outfile, level)1212 outfile.write('),\n')1213 def build(self, node, gds_collector_=None):1214 self.gds_collector_ = gds_collector_1215 if SaveElementTreeNode:1216 self.gds_elementtree_node_ = node1217 already_processed = set()1218 self.ns_prefix_ = node.prefix1219 self._buildAttributes(node, node.attrib, already_processed)1220 for child in node:1221 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1222 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1223 return self1224 def _buildAttributes(self, node, attrs, already_processed):1225 value = find_attr_value_('Name', node)1226 if value is not None and 'Name' not in already_processed:1227 already_processed.add('Name')1228 self.Name = value1229 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1230 if nodeName_ == 'NumberOfStates' and child_.text:1231 sval_ = child_.text1232 ival_ = self.gds_parse_integer(sval_, node, 'NumberOfStates')1233 ival_ = self.gds_validate_integer(ival_, node, 'NumberOfStates')1234 self.NumberOfStates = ival_1235 self.NumberOfStates_nsprefix_ = child_.prefix1236 elif nodeName_ == 'NumberOfAdditionalAxes' and child_.text:1237 sval_ = child_.text1238 ival_ = self.gds_parse_integer(sval_, node, 'NumberOfAdditionalAxes')1239 ival_ = self.gds_validate_integer(ival_, node, 'NumberOfAdditionalAxes')1240 self.NumberOfAdditionalAxes = ival_1241 self.NumberOfAdditionalAxes_nsprefix_ = child_.prefix1242 elif nodeName_ == 'ProvidesNonZeroCoords' and child_.text:1243 sval_ = child_.text1244 ival_ = self.gds_parse_integer(sval_, node, 'ProvidesNonZeroCoords')1245 ival_ = self.gds_validate_integer(ival_, node, 'ProvidesNonZeroCoords')1246 self.ProvidesNonZeroCoords = ival_1247 self.ProvidesNonZeroCoords_nsprefix_ = child_.prefix1248 elif nodeName_ == 'AdditionalAxesUpperLimits':1249 obj_ = AdditionalAxesUpperLimitsType.factory(parent_object_=self)1250 obj_.build(child_, gds_collector_=gds_collector_)1251 self.AdditionalAxesUpperLimits = obj_1252 obj_.original_tagname_ = 'AdditionalAxesUpperLimits'1253 elif nodeName_ == 'AdditionalAxesLowerLimits':1254 obj_ = AdditionalAxesLowerLimitsType.factory(parent_object_=self)1255 obj_.build(child_, gds_collector_=gds_collector_)1256 self.AdditionalAxesLowerLimits = obj_1257 obj_.original_tagname_ = 'AdditionalAxesLowerLimits'1258 elif nodeName_ == 'StateLabels':1259 obj_ = StateLabelsType.factory(parent_object_=self)1260 obj_.build(child_, gds_collector_=gds_collector_)1261 self.StateLabels = obj_1262 obj_.original_tagname_ = 'StateLabels'1263 elif nodeName_ == 'NonZeroElements':1264 obj_ = NonZeroElementsType.factory(parent_object_=self)1265 obj_.build(child_, gds_collector_=gds_collector_)1266 self.NonZeroElements = obj_1267 obj_.original_tagname_ = 'NonZeroElements'1268 elif nodeName_ == 'MData':1269 obj_ = MDataType.factory(parent_object_=self)1270 obj_.build(child_, gds_collector_=gds_collector_)1271 self.MData.append(obj_)1272 obj_.original_tagname_ = 'MData'1273 elif nodeName_ == 'Betas':1274 obj_ = BetasType.factory(parent_object_=self)1275 obj_.build(child_, gds_collector_=gds_collector_)1276 self.Betas = obj_1277 obj_.original_tagname_ = 'Betas'1278 elif nodeName_ == 'FunctionalInputs':1279 obj_ = FunctionalInputsType.factory(parent_object_=self)1280 obj_.build(child_, gds_collector_=gds_collector_)1281 self.FunctionalInputs = obj_1282 obj_.original_tagname_ = 'FunctionalInputs'1283 elif nodeName_ == 'RedundantFunctionalInputs':1284 obj_ = RedundantFunctionalInputsType.factory(parent_object_=self)1285 obj_.build(child_, gds_collector_=gds_collector_)1286 self.RedundantFunctionalInputs = obj_1287 obj_.original_tagname_ = 'RedundantFunctionalInputs'1288# end class WDSMatrix1289class AdditionalAxesUpperLimitsType(GeneratedsSuper):1290 __hash__ = GeneratedsSuper.__hash__1291 subclass = None1292 superclass = None1293 def __init__(self, Axis1=None, Axis2=None, Axis3=None, Axis4=None, gds_collector_=None, **kwargs_):1294 self.gds_collector_ = gds_collector_1295 self.gds_elementtree_node_ = None1296 self.original_tagname_ = None1297 self.parent_object_ = kwargs_.get('parent_object_')1298 self.ns_prefix_ = None1299 self.Axis1 = Axis11300 self.Axis1_nsprefix_ = None1301 self.Axis2 = Axis21302 self.Axis2_nsprefix_ = None1303 self.Axis3 = Axis31304 self.Axis3_nsprefix_ = None1305 self.Axis4 = Axis41306 self.Axis4_nsprefix_ = None1307 def factory(*args_, **kwargs_):1308 if CurrentSubclassModule_ is not None:1309 subclass = getSubclassFromModule_(1310 CurrentSubclassModule_, AdditionalAxesUpperLimitsType)1311 if subclass is not None:1312 return subclass(*args_, **kwargs_)1313 if AdditionalAxesUpperLimitsType.subclass:1314 return AdditionalAxesUpperLimitsType.subclass(*args_, **kwargs_)1315 else:1316 return AdditionalAxesUpperLimitsType(*args_, **kwargs_)1317 factory = staticmethod(factory)1318 def get_ns_prefix_(self):1319 return self.ns_prefix_1320 def set_ns_prefix_(self, ns_prefix):1321 self.ns_prefix_ = ns_prefix1322 def get_Axis1(self):1323 return self.Axis11324 def set_Axis1(self, Axis1):1325 self.Axis1 = Axis11326 def get_Axis2(self):1327 return self.Axis21328 def set_Axis2(self, Axis2):1329 self.Axis2 = Axis21330 def get_Axis3(self):1331 return self.Axis31332 def set_Axis3(self, Axis3):1333 self.Axis3 = Axis31334 def get_Axis4(self):1335 return self.Axis41336 def set_Axis4(self, Axis4):1337 self.Axis4 = Axis41338 def _hasContent(self):1339 if (1340 self.Axis1 is not None or1341 self.Axis2 is not None or1342 self.Axis3 is not None or1343 self.Axis4 is not None1344 ):1345 return True1346 else:1347 return False1348 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesUpperLimitsType', pretty_print=True):1349 imported_ns_def_ = GenerateDSNamespaceDefs_.get('AdditionalAxesUpperLimitsType')1350 if imported_ns_def_ is not None:1351 namespacedef_ = imported_ns_def_1352 if pretty_print:1353 eol_ = '\n'1354 else:1355 eol_ = ''1356 if self.original_tagname_ is not None and name_ == 'AdditionalAxesUpperLimitsType':1357 name_ = self.original_tagname_1358 if UseCapturedNS_ and self.ns_prefix_:1359 namespaceprefix_ = self.ns_prefix_ + ':'1360 showIndent(outfile, level, pretty_print)1361 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1362 already_processed = set()1363 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdditionalAxesUpperLimitsType')1364 if self._hasContent():1365 outfile.write('>%s' % (eol_, ))1366 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='AdditionalAxesUpperLimitsType', pretty_print=pretty_print)1367 showIndent(outfile, level, pretty_print)1368 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1369 else:1370 outfile.write('/>%s' % (eol_, ))1371 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AdditionalAxesUpperLimitsType'):1372 pass1373 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesUpperLimitsType', fromsubclass_=False, pretty_print=True):1374 if pretty_print:1375 eol_ = '\n'1376 else:1377 eol_ = ''1378 if self.Axis1 is not None:1379 namespaceprefix_ = self.Axis1_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis1_nsprefix_) else ''1380 showIndent(outfile, level, pretty_print)1381 outfile.write('<%sAxis1>%s</%sAxis1>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis1, input_name='Axis1'), namespaceprefix_ , eol_))1382 if self.Axis2 is not None:1383 namespaceprefix_ = self.Axis2_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis2_nsprefix_) else ''1384 showIndent(outfile, level, pretty_print)1385 outfile.write('<%sAxis2>%s</%sAxis2>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis2, input_name='Axis2'), namespaceprefix_ , eol_))1386 if self.Axis3 is not None:1387 namespaceprefix_ = self.Axis3_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis3_nsprefix_) else ''1388 showIndent(outfile, level, pretty_print)1389 outfile.write('<%sAxis3>%s</%sAxis3>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis3, input_name='Axis3'), namespaceprefix_ , eol_))1390 if self.Axis4 is not None:1391 namespaceprefix_ = self.Axis4_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis4_nsprefix_) else ''1392 showIndent(outfile, level, pretty_print)1393 outfile.write('<%sAxis4>%s</%sAxis4>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis4, input_name='Axis4'), namespaceprefix_ , eol_))1394 def exportLiteral(self, outfile, level, name_='AdditionalAxesUpperLimitsType'):1395 level += 11396 already_processed = set()1397 self._exportLiteralAttributes(outfile, level, already_processed, name_)1398 if self._hasContent():1399 self._exportLiteralChildren(outfile, level, name_)1400 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):1401 pass1402 def _exportLiteralChildren(self, outfile, level, name_):1403 if self.Axis1 is not None:1404 showIndent(outfile, level)1405 outfile.write('Axis1=%d,\n' % self.Axis1)1406 if self.Axis2 is not None:1407 showIndent(outfile, level)1408 outfile.write('Axis2=%d,\n' % self.Axis2)1409 if self.Axis3 is not None:1410 showIndent(outfile, level)1411 outfile.write('Axis3=%d,\n' % self.Axis3)1412 if self.Axis4 is not None:1413 showIndent(outfile, level)1414 outfile.write('Axis4=%d,\n' % self.Axis4)1415 def build(self, node, gds_collector_=None):1416 self.gds_collector_ = gds_collector_1417 if SaveElementTreeNode:1418 self.gds_elementtree_node_ = node1419 already_processed = set()1420 self.ns_prefix_ = node.prefix1421 self._buildAttributes(node, node.attrib, already_processed)1422 for child in node:1423 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1424 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1425 return self1426 def _buildAttributes(self, node, attrs, already_processed):1427 pass1428 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1429 if nodeName_ == 'Axis1' and child_.text:1430 sval_ = child_.text1431 ival_ = self.gds_parse_integer(sval_, node, 'Axis1')1432 ival_ = self.gds_validate_integer(ival_, node, 'Axis1')1433 self.Axis1 = ival_1434 self.Axis1_nsprefix_ = child_.prefix1435 elif nodeName_ == 'Axis2' and child_.text:1436 sval_ = child_.text1437 ival_ = self.gds_parse_integer(sval_, node, 'Axis2')1438 ival_ = self.gds_validate_integer(ival_, node, 'Axis2')1439 self.Axis2 = ival_1440 self.Axis2_nsprefix_ = child_.prefix1441 elif nodeName_ == 'Axis3' and child_.text:1442 sval_ = child_.text1443 ival_ = self.gds_parse_integer(sval_, node, 'Axis3')1444 ival_ = self.gds_validate_integer(ival_, node, 'Axis3')1445 self.Axis3 = ival_1446 self.Axis3_nsprefix_ = child_.prefix1447 elif nodeName_ == 'Axis4' and child_.text:1448 sval_ = child_.text1449 ival_ = self.gds_parse_integer(sval_, node, 'Axis4')1450 ival_ = self.gds_validate_integer(ival_, node, 'Axis4')1451 self.Axis4 = ival_1452 self.Axis4_nsprefix_ = child_.prefix1453# end class AdditionalAxesUpperLimitsType1454class AdditionalAxesLowerLimitsType(GeneratedsSuper):1455 __hash__ = GeneratedsSuper.__hash__1456 subclass = None1457 superclass = None1458 def __init__(self, Axis1=None, Axis2=None, Axis3=None, Axis4=None, gds_collector_=None, **kwargs_):1459 self.gds_collector_ = gds_collector_1460 self.gds_elementtree_node_ = None1461 self.original_tagname_ = None1462 self.parent_object_ = kwargs_.get('parent_object_')1463 self.ns_prefix_ = None1464 self.Axis1 = Axis11465 self.Axis1_nsprefix_ = None1466 self.Axis2 = Axis21467 self.Axis2_nsprefix_ = None1468 self.Axis3 = Axis31469 self.Axis3_nsprefix_ = None1470 self.Axis4 = Axis41471 self.Axis4_nsprefix_ = None1472 def factory(*args_, **kwargs_):1473 if CurrentSubclassModule_ is not None:1474 subclass = getSubclassFromModule_(1475 CurrentSubclassModule_, AdditionalAxesLowerLimitsType)1476 if subclass is not None:1477 return subclass(*args_, **kwargs_)1478 if AdditionalAxesLowerLimitsType.subclass:1479 return AdditionalAxesLowerLimitsType.subclass(*args_, **kwargs_)1480 else:1481 return AdditionalAxesLowerLimitsType(*args_, **kwargs_)1482 factory = staticmethod(factory)1483 def get_ns_prefix_(self):1484 return self.ns_prefix_1485 def set_ns_prefix_(self, ns_prefix):1486 self.ns_prefix_ = ns_prefix1487 def get_Axis1(self):1488 return self.Axis11489 def set_Axis1(self, Axis1):1490 self.Axis1 = Axis11491 def get_Axis2(self):1492 return self.Axis21493 def set_Axis2(self, Axis2):1494 self.Axis2 = Axis21495 def get_Axis3(self):1496 return self.Axis31497 def set_Axis3(self, Axis3):1498 self.Axis3 = Axis31499 def get_Axis4(self):1500 return self.Axis41501 def set_Axis4(self, Axis4):1502 self.Axis4 = Axis41503 def _hasContent(self):1504 if (1505 self.Axis1 is not None or1506 self.Axis2 is not None or1507 self.Axis3 is not None or1508 self.Axis4 is not None1509 ):1510 return True1511 else:1512 return False1513 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesLowerLimitsType', pretty_print=True):1514 imported_ns_def_ = GenerateDSNamespaceDefs_.get('AdditionalAxesLowerLimitsType')1515 if imported_ns_def_ is not None:1516 namespacedef_ = imported_ns_def_1517 if pretty_print:1518 eol_ = '\n'1519 else:1520 eol_ = ''1521 if self.original_tagname_ is not None and name_ == 'AdditionalAxesLowerLimitsType':1522 name_ = self.original_tagname_1523 if UseCapturedNS_ and self.ns_prefix_:1524 namespaceprefix_ = self.ns_prefix_ + ':'1525 showIndent(outfile, level, pretty_print)1526 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1527 already_processed = set()1528 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdditionalAxesLowerLimitsType')1529 if self._hasContent():1530 outfile.write('>%s' % (eol_, ))1531 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='AdditionalAxesLowerLimitsType', pretty_print=pretty_print)1532 showIndent(outfile, level, pretty_print)1533 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1534 else:1535 outfile.write('/>%s' % (eol_, ))1536 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AdditionalAxesLowerLimitsType'):1537 pass1538 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='AdditionalAxesLowerLimitsType', fromsubclass_=False, pretty_print=True):1539 if pretty_print:1540 eol_ = '\n'1541 else:1542 eol_ = ''1543 if self.Axis1 is not None:1544 namespaceprefix_ = self.Axis1_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis1_nsprefix_) else ''1545 showIndent(outfile, level, pretty_print)1546 outfile.write('<%sAxis1>%s</%sAxis1>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis1, input_name='Axis1'), namespaceprefix_ , eol_))1547 if self.Axis2 is not None:1548 namespaceprefix_ = self.Axis2_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis2_nsprefix_) else ''1549 showIndent(outfile, level, pretty_print)1550 outfile.write('<%sAxis2>%s</%sAxis2>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis2, input_name='Axis2'), namespaceprefix_ , eol_))1551 if self.Axis3 is not None:1552 namespaceprefix_ = self.Axis3_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis3_nsprefix_) else ''1553 showIndent(outfile, level, pretty_print)1554 outfile.write('<%sAxis3>%s</%sAxis3>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis3, input_name='Axis3'), namespaceprefix_ , eol_))1555 if self.Axis4 is not None:1556 namespaceprefix_ = self.Axis4_nsprefix_ + ':' if (UseCapturedNS_ and self.Axis4_nsprefix_) else ''1557 showIndent(outfile, level, pretty_print)1558 outfile.write('<%sAxis4>%s</%sAxis4>%s' % (namespaceprefix_ , self.gds_format_integer(self.Axis4, input_name='Axis4'), namespaceprefix_ , eol_))1559 def exportLiteral(self, outfile, level, name_='AdditionalAxesLowerLimitsType'):1560 level += 11561 already_processed = set()1562 self._exportLiteralAttributes(outfile, level, already_processed, name_)1563 if self._hasContent():1564 self._exportLiteralChildren(outfile, level, name_)1565 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):1566 pass1567 def _exportLiteralChildren(self, outfile, level, name_):1568 if self.Axis1 is not None:1569 showIndent(outfile, level)1570 outfile.write('Axis1=%d,\n' % self.Axis1)1571 if self.Axis2 is not None:1572 showIndent(outfile, level)1573 outfile.write('Axis2=%d,\n' % self.Axis2)1574 if self.Axis3 is not None:1575 showIndent(outfile, level)1576 outfile.write('Axis3=%d,\n' % self.Axis3)1577 if self.Axis4 is not None:1578 showIndent(outfile, level)1579 outfile.write('Axis4=%d,\n' % self.Axis4)1580 def build(self, node, gds_collector_=None):1581 self.gds_collector_ = gds_collector_1582 if SaveElementTreeNode:1583 self.gds_elementtree_node_ = node1584 already_processed = set()1585 self.ns_prefix_ = node.prefix1586 self._buildAttributes(node, node.attrib, already_processed)1587 for child in node:1588 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1589 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1590 return self1591 def _buildAttributes(self, node, attrs, already_processed):1592 pass1593 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1594 if nodeName_ == 'Axis1' and child_.text:1595 sval_ = child_.text1596 ival_ = self.gds_parse_integer(sval_, node, 'Axis1')1597 ival_ = self.gds_validate_integer(ival_, node, 'Axis1')1598 self.Axis1 = ival_1599 self.Axis1_nsprefix_ = child_.prefix1600 elif nodeName_ == 'Axis2' and child_.text:1601 sval_ = child_.text1602 ival_ = self.gds_parse_integer(sval_, node, 'Axis2')1603 ival_ = self.gds_validate_integer(ival_, node, 'Axis2')1604 self.Axis2 = ival_1605 self.Axis2_nsprefix_ = child_.prefix1606 elif nodeName_ == 'Axis3' and child_.text:1607 sval_ = child_.text1608 ival_ = self.gds_parse_integer(sval_, node, 'Axis3')1609 ival_ = self.gds_validate_integer(ival_, node, 'Axis3')1610 self.Axis3 = ival_1611 self.Axis3_nsprefix_ = child_.prefix1612 elif nodeName_ == 'Axis4' and child_.text:1613 sval_ = child_.text1614 ival_ = self.gds_parse_integer(sval_, node, 'Axis4')1615 ival_ = self.gds_validate_integer(ival_, node, 'Axis4')1616 self.Axis4 = ival_1617 self.Axis4_nsprefix_ = child_.prefix1618# end class AdditionalAxesLowerLimitsType1619class StateLabelsType(GeneratedsSuper):1620 __hash__ = GeneratedsSuper.__hash__1621 subclass = None1622 superclass = None1623 def __init__(self, StateLabel=None, gds_collector_=None, **kwargs_):1624 self.gds_collector_ = gds_collector_1625 self.gds_elementtree_node_ = None1626 self.original_tagname_ = None1627 self.parent_object_ = kwargs_.get('parent_object_')1628 self.ns_prefix_ = None1629 if StateLabel is None:1630 self.StateLabel = []1631 else:1632 self.StateLabel = StateLabel1633 self.StateLabel_nsprefix_ = None1634 def factory(*args_, **kwargs_):1635 if CurrentSubclassModule_ is not None:1636 subclass = getSubclassFromModule_(1637 CurrentSubclassModule_, StateLabelsType)1638 if subclass is not None:1639 return subclass(*args_, **kwargs_)1640 if StateLabelsType.subclass:1641 return StateLabelsType.subclass(*args_, **kwargs_)1642 else:1643 return StateLabelsType(*args_, **kwargs_)1644 factory = staticmethod(factory)1645 def get_ns_prefix_(self):1646 return self.ns_prefix_1647 def set_ns_prefix_(self, ns_prefix):1648 self.ns_prefix_ = ns_prefix1649 def get_StateLabel(self):1650 return self.StateLabel1651 def set_StateLabel(self, StateLabel):1652 self.StateLabel = StateLabel1653 def add_StateLabel(self, value):1654 self.StateLabel.append(value)1655 def insert_StateLabel_at(self, index, value):1656 self.StateLabel.insert(index, value)1657 def replace_StateLabel_at(self, index, value):1658 self.StateLabel[index] = value1659 def _hasContent(self):1660 if (1661 self.StateLabel1662 ):1663 return True1664 else:1665 return False1666 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelsType', pretty_print=True):1667 imported_ns_def_ = GenerateDSNamespaceDefs_.get('StateLabelsType')1668 if imported_ns_def_ is not None:1669 namespacedef_ = imported_ns_def_1670 if pretty_print:1671 eol_ = '\n'1672 else:1673 eol_ = ''1674 if self.original_tagname_ is not None and name_ == 'StateLabelsType':1675 name_ = self.original_tagname_1676 if UseCapturedNS_ and self.ns_prefix_:1677 namespaceprefix_ = self.ns_prefix_ + ':'1678 showIndent(outfile, level, pretty_print)1679 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1680 already_processed = set()1681 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='StateLabelsType')1682 if self._hasContent():1683 outfile.write('>%s' % (eol_, ))1684 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='StateLabelsType', pretty_print=pretty_print)1685 showIndent(outfile, level, pretty_print)1686 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1687 else:1688 outfile.write('/>%s' % (eol_, ))1689 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='StateLabelsType'):1690 pass1691 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelsType', fromsubclass_=False, pretty_print=True):1692 if pretty_print:1693 eol_ = '\n'1694 else:1695 eol_ = ''1696 for StateLabel_ in self.StateLabel:1697 namespaceprefix_ = self.StateLabel_nsprefix_ + ':' if (UseCapturedNS_ and self.StateLabel_nsprefix_) else ''1698 StateLabel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='StateLabel', pretty_print=pretty_print)1699 def exportLiteral(self, outfile, level, name_='StateLabelsType'):1700 level += 11701 already_processed = set()1702 self._exportLiteralAttributes(outfile, level, already_processed, name_)1703 if self._hasContent():1704 self._exportLiteralChildren(outfile, level, name_)1705 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):1706 pass1707 def _exportLiteralChildren(self, outfile, level, name_):1708 showIndent(outfile, level)1709 outfile.write('StateLabel=[\n')1710 level += 11711 for StateLabel_ in self.StateLabel:1712 showIndent(outfile, level)1713 outfile.write('model_.StateLabelType(\n')1714 StateLabel_.exportLiteral(outfile, level, name_='StateLabelType')1715 showIndent(outfile, level)1716 outfile.write('),\n')1717 level -= 11718 showIndent(outfile, level)1719 outfile.write('],\n')1720 def build(self, node, gds_collector_=None):1721 self.gds_collector_ = gds_collector_1722 if SaveElementTreeNode:1723 self.gds_elementtree_node_ = node1724 already_processed = set()1725 self.ns_prefix_ = node.prefix1726 self._buildAttributes(node, node.attrib, already_processed)1727 for child in node:1728 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1729 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1730 return self1731 def _buildAttributes(self, node, attrs, already_processed):1732 pass1733 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1734 if nodeName_ == 'StateLabel':1735 obj_ = StateLabelType.factory(parent_object_=self)1736 obj_.build(child_, gds_collector_=gds_collector_)1737 self.StateLabel.append(obj_)1738 obj_.original_tagname_ = 'StateLabel'1739# end class StateLabelsType1740class StateLabelType(GeneratedsSuper):1741 __hash__ = GeneratedsSuper.__hash__1742 subclass = None1743 superclass = None1744 def __init__(self, Position=None, valueOf_=None, gds_collector_=None, **kwargs_):1745 self.gds_collector_ = gds_collector_1746 self.gds_elementtree_node_ = None1747 self.original_tagname_ = None1748 self.parent_object_ = kwargs_.get('parent_object_')1749 self.ns_prefix_ = None1750 self.Position = _cast(int, Position)1751 self.Position_nsprefix_ = None1752 self.valueOf_ = valueOf_1753 def factory(*args_, **kwargs_):1754 if CurrentSubclassModule_ is not None:1755 subclass = getSubclassFromModule_(1756 CurrentSubclassModule_, StateLabelType)1757 if subclass is not None:1758 return subclass(*args_, **kwargs_)1759 if StateLabelType.subclass:1760 return StateLabelType.subclass(*args_, **kwargs_)1761 else:1762 return StateLabelType(*args_, **kwargs_)1763 factory = staticmethod(factory)1764 def get_ns_prefix_(self):1765 return self.ns_prefix_1766 def set_ns_prefix_(self, ns_prefix):1767 self.ns_prefix_ = ns_prefix1768 def get_Position(self):1769 return self.Position1770 def set_Position(self, Position):1771 self.Position = Position1772 def get_valueOf_(self): return self.valueOf_1773 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_1774 def _hasContent(self):1775 if (1776 (1 if type(self.valueOf_) in [int,float] else self.valueOf_)1777 ):1778 return True1779 else:1780 return False1781 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelType', pretty_print=True):1782 imported_ns_def_ = GenerateDSNamespaceDefs_.get('StateLabelType')1783 if imported_ns_def_ is not None:1784 namespacedef_ = imported_ns_def_1785 if pretty_print:1786 eol_ = '\n'1787 else:1788 eol_ = ''1789 if self.original_tagname_ is not None and name_ == 'StateLabelType':1790 name_ = self.original_tagname_1791 if UseCapturedNS_ and self.ns_prefix_:1792 namespaceprefix_ = self.ns_prefix_ + ':'1793 showIndent(outfile, level, pretty_print)1794 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1795 already_processed = set()1796 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='StateLabelType')1797 if self._hasContent():1798 outfile.write('>')1799 outfile.write(self.convert_unicode(self.valueOf_))1800 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='StateLabelType', pretty_print=pretty_print)1801 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1802 else:1803 outfile.write('/>%s' % (eol_, ))1804 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='StateLabelType'):1805 if self.Position is not None and 'Position' not in already_processed:1806 already_processed.add('Position')1807 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))1808 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='StateLabelType', fromsubclass_=False, pretty_print=True):1809 pass1810 def exportLiteral(self, outfile, level, name_='StateLabelType'):1811 level += 11812 already_processed = set()1813 self._exportLiteralAttributes(outfile, level, already_processed, name_)1814 if self._hasContent():1815 self._exportLiteralChildren(outfile, level, name_)1816 showIndent(outfile, level)1817 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))1818 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):1819 if self.Position is not None and 'Position' not in already_processed:1820 already_processed.add('Position')1821 showIndent(outfile, level)1822 outfile.write('Position=%d,\n' % (self.Position,))1823 def _exportLiteralChildren(self, outfile, level, name_):1824 pass1825 def build(self, node, gds_collector_=None):1826 self.gds_collector_ = gds_collector_1827 if SaveElementTreeNode:1828 self.gds_elementtree_node_ = node1829 already_processed = set()1830 self.ns_prefix_ = node.prefix1831 self._buildAttributes(node, node.attrib, already_processed)1832 self.valueOf_ = get_all_text_(node)1833 for child in node:1834 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1835 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1836 return self1837 def _buildAttributes(self, node, attrs, already_processed):1838 value = find_attr_value_('Position', node)1839 if value is not None and 'Position' not in already_processed:1840 already_processed.add('Position')1841 self.Position = self.gds_parse_integer(value, node, 'Position')1842 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1843 pass1844# end class StateLabelType1845class NonZeroElementsType(GeneratedsSuper):1846 __hash__ = GeneratedsSuper.__hash__1847 subclass = None1848 superclass = None1849 def __init__(self, Number=None, NonZeroCoordinates=None, gds_collector_=None, **kwargs_):1850 self.gds_collector_ = gds_collector_1851 self.gds_elementtree_node_ = None1852 self.original_tagname_ = None1853 self.parent_object_ = kwargs_.get('parent_object_')1854 self.ns_prefix_ = None1855 self.Number = Number1856 self.Number_nsprefix_ = None1857 self.NonZeroCoordinates = NonZeroCoordinates1858 self.NonZeroCoordinates_nsprefix_ = None1859 def factory(*args_, **kwargs_):1860 if CurrentSubclassModule_ is not None:1861 subclass = getSubclassFromModule_(1862 CurrentSubclassModule_, NonZeroElementsType)1863 if subclass is not None:1864 return subclass(*args_, **kwargs_)1865 if NonZeroElementsType.subclass:1866 return NonZeroElementsType.subclass(*args_, **kwargs_)1867 else:1868 return NonZeroElementsType(*args_, **kwargs_)1869 factory = staticmethod(factory)1870 def get_ns_prefix_(self):1871 return self.ns_prefix_1872 def set_ns_prefix_(self, ns_prefix):1873 self.ns_prefix_ = ns_prefix1874 def get_Number(self):1875 return self.Number1876 def set_Number(self, Number):1877 self.Number = Number1878 def get_NonZeroCoordinates(self):1879 return self.NonZeroCoordinates1880 def set_NonZeroCoordinates(self, NonZeroCoordinates):1881 self.NonZeroCoordinates = NonZeroCoordinates1882 def _hasContent(self):1883 if (1884 self.Number is not None or1885 self.NonZeroCoordinates is not None1886 ):1887 return True1888 else:1889 return False1890 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroElementsType', pretty_print=True):1891 imported_ns_def_ = GenerateDSNamespaceDefs_.get('NonZeroElementsType')1892 if imported_ns_def_ is not None:1893 namespacedef_ = imported_ns_def_1894 if pretty_print:1895 eol_ = '\n'1896 else:1897 eol_ = ''1898 if self.original_tagname_ is not None and name_ == 'NonZeroElementsType':1899 name_ = self.original_tagname_1900 if UseCapturedNS_ and self.ns_prefix_:1901 namespaceprefix_ = self.ns_prefix_ + ':'1902 showIndent(outfile, level, pretty_print)1903 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1904 already_processed = set()1905 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NonZeroElementsType')1906 if self._hasContent():1907 outfile.write('>%s' % (eol_, ))1908 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NonZeroElementsType', pretty_print=pretty_print)1909 showIndent(outfile, level, pretty_print)1910 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1911 else:1912 outfile.write('/>%s' % (eol_, ))1913 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NonZeroElementsType'):1914 pass1915 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroElementsType', fromsubclass_=False, pretty_print=True):1916 if pretty_print:1917 eol_ = '\n'1918 else:1919 eol_ = ''1920 if self.Number is not None:1921 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''1922 showIndent(outfile, level, pretty_print)1923 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))1924 if self.NonZeroCoordinates is not None:1925 namespaceprefix_ = self.NonZeroCoordinates_nsprefix_ + ':' if (UseCapturedNS_ and self.NonZeroCoordinates_nsprefix_) else ''1926 self.NonZeroCoordinates.export(outfile, level, namespaceprefix_, namespacedef_='', name_='NonZeroCoordinates', pretty_print=pretty_print)1927 def exportLiteral(self, outfile, level, name_='NonZeroElementsType'):1928 level += 11929 already_processed = set()1930 self._exportLiteralAttributes(outfile, level, already_processed, name_)1931 if self._hasContent():1932 self._exportLiteralChildren(outfile, level, name_)1933 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):1934 pass1935 def _exportLiteralChildren(self, outfile, level, name_):1936 if self.Number is not None:1937 showIndent(outfile, level)1938 outfile.write('Number=%d,\n' % self.Number)1939 if self.NonZeroCoordinates is not None:1940 showIndent(outfile, level)1941 outfile.write('NonZeroCoordinates=model_.NonZeroCoordinatesType(\n')1942 self.NonZeroCoordinates.exportLiteral(outfile, level, name_='NonZeroCoordinates')1943 showIndent(outfile, level)1944 outfile.write('),\n')1945 def build(self, node, gds_collector_=None):1946 self.gds_collector_ = gds_collector_1947 if SaveElementTreeNode:1948 self.gds_elementtree_node_ = node1949 already_processed = set()1950 self.ns_prefix_ = node.prefix1951 self._buildAttributes(node, node.attrib, already_processed)1952 for child in node:1953 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1954 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)1955 return self1956 def _buildAttributes(self, node, attrs, already_processed):1957 pass1958 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):1959 if nodeName_ == 'Number' and child_.text:1960 sval_ = child_.text1961 ival_ = self.gds_parse_integer(sval_, node, 'Number')1962 ival_ = self.gds_validate_integer(ival_, node, 'Number')1963 self.Number = ival_1964 self.Number_nsprefix_ = child_.prefix1965 elif nodeName_ == 'NonZeroCoordinates':1966 obj_ = NonZeroCoordinatesType.factory(parent_object_=self)1967 obj_.build(child_, gds_collector_=gds_collector_)1968 self.NonZeroCoordinates = obj_1969 obj_.original_tagname_ = 'NonZeroCoordinates'1970# end class NonZeroElementsType1971class NonZeroCoordinatesType(GeneratedsSuper):1972 __hash__ = GeneratedsSuper.__hash__1973 subclass = None1974 superclass = None1975 def __init__(self, NonZeroCoordinate=None, gds_collector_=None, **kwargs_):1976 self.gds_collector_ = gds_collector_1977 self.gds_elementtree_node_ = None1978 self.original_tagname_ = None1979 self.parent_object_ = kwargs_.get('parent_object_')1980 self.ns_prefix_ = None1981 if NonZeroCoordinate is None:1982 self.NonZeroCoordinate = []1983 else:1984 self.NonZeroCoordinate = NonZeroCoordinate1985 self.NonZeroCoordinate_nsprefix_ = None1986 def factory(*args_, **kwargs_):1987 if CurrentSubclassModule_ is not None:1988 subclass = getSubclassFromModule_(1989 CurrentSubclassModule_, NonZeroCoordinatesType)1990 if subclass is not None:1991 return subclass(*args_, **kwargs_)1992 if NonZeroCoordinatesType.subclass:1993 return NonZeroCoordinatesType.subclass(*args_, **kwargs_)1994 else:1995 return NonZeroCoordinatesType(*args_, **kwargs_)1996 factory = staticmethod(factory)1997 def get_ns_prefix_(self):1998 return self.ns_prefix_1999 def set_ns_prefix_(self, ns_prefix):2000 self.ns_prefix_ = ns_prefix2001 def get_NonZeroCoordinate(self):2002 return self.NonZeroCoordinate2003 def set_NonZeroCoordinate(self, NonZeroCoordinate):2004 self.NonZeroCoordinate = NonZeroCoordinate2005 def add_NonZeroCoordinate(self, value):2006 self.NonZeroCoordinate.append(value)2007 def insert_NonZeroCoordinate_at(self, index, value):2008 self.NonZeroCoordinate.insert(index, value)2009 def replace_NonZeroCoordinate_at(self, index, value):2010 self.NonZeroCoordinate[index] = value2011 def _hasContent(self):2012 if (2013 self.NonZeroCoordinate2014 ):2015 return True2016 else:2017 return False2018 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinatesType', pretty_print=True):2019 imported_ns_def_ = GenerateDSNamespaceDefs_.get('NonZeroCoordinatesType')2020 if imported_ns_def_ is not None:2021 namespacedef_ = imported_ns_def_2022 if pretty_print:2023 eol_ = '\n'2024 else:2025 eol_ = ''2026 if self.original_tagname_ is not None and name_ == 'NonZeroCoordinatesType':2027 name_ = self.original_tagname_2028 if UseCapturedNS_ and self.ns_prefix_:2029 namespaceprefix_ = self.ns_prefix_ + ':'2030 showIndent(outfile, level, pretty_print)2031 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2032 already_processed = set()2033 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NonZeroCoordinatesType')2034 if self._hasContent():2035 outfile.write('>%s' % (eol_, ))2036 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NonZeroCoordinatesType', pretty_print=pretty_print)2037 showIndent(outfile, level, pretty_print)2038 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))2039 else:2040 outfile.write('/>%s' % (eol_, ))2041 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NonZeroCoordinatesType'):2042 pass2043 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinatesType', fromsubclass_=False, pretty_print=True):2044 if pretty_print:2045 eol_ = '\n'2046 else:2047 eol_ = ''2048 for NonZeroCoordinate_ in self.NonZeroCoordinate:2049 namespaceprefix_ = self.NonZeroCoordinate_nsprefix_ + ':' if (UseCapturedNS_ and self.NonZeroCoordinate_nsprefix_) else ''2050 NonZeroCoordinate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='NonZeroCoordinate', pretty_print=pretty_print)2051 def exportLiteral(self, outfile, level, name_='NonZeroCoordinatesType'):2052 level += 12053 already_processed = set()2054 self._exportLiteralAttributes(outfile, level, already_processed, name_)2055 if self._hasContent():2056 self._exportLiteralChildren(outfile, level, name_)2057 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):2058 pass2059 def _exportLiteralChildren(self, outfile, level, name_):2060 showIndent(outfile, level)2061 outfile.write('NonZeroCoordinate=[\n')2062 level += 12063 for NonZeroCoordinate_ in self.NonZeroCoordinate:2064 showIndent(outfile, level)2065 outfile.write('model_.NonZeroCoordinateType(\n')2066 NonZeroCoordinate_.exportLiteral(outfile, level, name_='NonZeroCoordinateType')2067 showIndent(outfile, level)2068 outfile.write('),\n')2069 level -= 12070 showIndent(outfile, level)2071 outfile.write('],\n')2072 def build(self, node, gds_collector_=None):2073 self.gds_collector_ = gds_collector_2074 if SaveElementTreeNode:2075 self.gds_elementtree_node_ = node2076 already_processed = set()2077 self.ns_prefix_ = node.prefix2078 self._buildAttributes(node, node.attrib, already_processed)2079 for child in node:2080 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2081 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)2082 return self2083 def _buildAttributes(self, node, attrs, already_processed):2084 pass2085 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):2086 if nodeName_ == 'NonZeroCoordinate':2087 obj_ = NonZeroCoordinateType.factory(parent_object_=self)2088 obj_.build(child_, gds_collector_=gds_collector_)2089 self.NonZeroCoordinate.append(obj_)2090 obj_.original_tagname_ = 'NonZeroCoordinate'2091# end class NonZeroCoordinatesType2092class NonZeroCoordinateType(GeneratedsSuper):2093 __hash__ = GeneratedsSuper.__hash__2094 subclass = None2095 superclass = None2096 def __init__(self, Position=None, I=None, J=None, gds_collector_=None, **kwargs_):2097 self.gds_collector_ = gds_collector_2098 self.gds_elementtree_node_ = None2099 self.original_tagname_ = None2100 self.parent_object_ = kwargs_.get('parent_object_')2101 self.ns_prefix_ = None2102 self.Position = _cast(int, Position)2103 self.Position_nsprefix_ = None2104 self.I = I2105 self.I_nsprefix_ = None2106 self.J = J2107 self.J_nsprefix_ = None2108 def factory(*args_, **kwargs_):2109 if CurrentSubclassModule_ is not None:2110 subclass = getSubclassFromModule_(2111 CurrentSubclassModule_, NonZeroCoordinateType)2112 if subclass is not None:2113 return subclass(*args_, **kwargs_)2114 if NonZeroCoordinateType.subclass:2115 return NonZeroCoordinateType.subclass(*args_, **kwargs_)2116 else:2117 return NonZeroCoordinateType(*args_, **kwargs_)2118 factory = staticmethod(factory)2119 def get_ns_prefix_(self):2120 return self.ns_prefix_2121 def set_ns_prefix_(self, ns_prefix):2122 self.ns_prefix_ = ns_prefix2123 def get_I(self):2124 return self.I2125 def set_I(self, I):2126 self.I = I2127 def get_J(self):2128 return self.J2129 def set_J(self, J):2130 self.J = J2131 def get_Position(self):2132 return self.Position2133 def set_Position(self, Position):2134 self.Position = Position2135 def _hasContent(self):2136 if (2137 self.I is not None or2138 self.J is not None2139 ):2140 return True2141 else:2142 return False2143 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinateType', pretty_print=True):2144 imported_ns_def_ = GenerateDSNamespaceDefs_.get('NonZeroCoordinateType')2145 if imported_ns_def_ is not None:2146 namespacedef_ = imported_ns_def_2147 if pretty_print:2148 eol_ = '\n'2149 else:2150 eol_ = ''2151 if self.original_tagname_ is not None and name_ == 'NonZeroCoordinateType':2152 name_ = self.original_tagname_2153 if UseCapturedNS_ and self.ns_prefix_:2154 namespaceprefix_ = self.ns_prefix_ + ':'2155 showIndent(outfile, level, pretty_print)2156 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2157 already_processed = set()2158 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NonZeroCoordinateType')2159 if self._hasContent():2160 outfile.write('>%s' % (eol_, ))2161 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='NonZeroCoordinateType', pretty_print=pretty_print)2162 showIndent(outfile, level, pretty_print)2163 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))2164 else:2165 outfile.write('/>%s' % (eol_, ))2166 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NonZeroCoordinateType'):2167 if self.Position is not None and 'Position' not in already_processed:2168 already_processed.add('Position')2169 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))2170 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='NonZeroCoordinateType', fromsubclass_=False, pretty_print=True):2171 if pretty_print:2172 eol_ = '\n'2173 else:2174 eol_ = ''2175 if self.I is not None:2176 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''2177 showIndent(outfile, level, pretty_print)2178 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))2179 if self.J is not None:2180 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''2181 showIndent(outfile, level, pretty_print)2182 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))2183 def exportLiteral(self, outfile, level, name_='NonZeroCoordinateType'):2184 level += 12185 already_processed = set()2186 self._exportLiteralAttributes(outfile, level, already_processed, name_)2187 if self._hasContent():2188 self._exportLiteralChildren(outfile, level, name_)2189 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):2190 if self.Position is not None and 'Position' not in already_processed:2191 already_processed.add('Position')2192 showIndent(outfile, level)2193 outfile.write('Position=%d,\n' % (self.Position,))2194 def _exportLiteralChildren(self, outfile, level, name_):2195 if self.I is not None:2196 showIndent(outfile, level)2197 outfile.write('I=%d,\n' % self.I)2198 if self.J is not None:2199 showIndent(outfile, level)2200 outfile.write('J=%d,\n' % self.J)2201 def build(self, node, gds_collector_=None):2202 self.gds_collector_ = gds_collector_2203 if SaveElementTreeNode:2204 self.gds_elementtree_node_ = node2205 already_processed = set()2206 self.ns_prefix_ = node.prefix2207 self._buildAttributes(node, node.attrib, already_processed)2208 for child in node:2209 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2210 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)2211 return self2212 def _buildAttributes(self, node, attrs, already_processed):2213 value = find_attr_value_('Position', node)2214 if value is not None and 'Position' not in already_processed:2215 already_processed.add('Position')2216 self.Position = self.gds_parse_integer(value, node, 'Position')2217 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):2218 if nodeName_ == 'I' and child_.text:2219 sval_ = child_.text2220 ival_ = self.gds_parse_integer(sval_, node, 'I')2221 ival_ = self.gds_validate_integer(ival_, node, 'I')2222 self.I = ival_2223 self.I_nsprefix_ = child_.prefix2224 elif nodeName_ == 'J' and child_.text:2225 sval_ = child_.text2226 ival_ = self.gds_parse_integer(sval_, node, 'J')2227 ival_ = self.gds_validate_integer(ival_, node, 'J')2228 self.J = ival_2229 self.J_nsprefix_ = child_.prefix2230# end class NonZeroCoordinateType2231class MDataType(GeneratedsSuper):2232 __hash__ = GeneratedsSuper.__hash__2233 subclass = None2234 superclass = None2235 def __init__(self, Row=None, Axis1=None, Axis2=None, Axis3=None, Axis4=None, Col1=None, Col2=None, Col3=None, Col4=None, Col5=None, Col6=None, Col7=None, Col8=None, Col9=None, Col10=None, Col11=None, Col12=None, Col13=None, Col14=None, Col15=None, Col16=None, Col17=None, Col18=None, Col19=None, Col20=None, Col21=None, Col22=None, Col23=None, Col24=None, Col25=None, Col26=None, Col27=None, Col28=None, Col29=None, Col30=None, Col31=None, Col32=None, Col33=None, Col34=None, Col35=None, Col36=None, Col37=None, Col38=None, Col39=None, Col40=None, Col41=None, Col42=None, Col43=None, Col44=None, Col45=None, Col46=None, Col47=None, Col48=None, Col49=None, Col50=None, Col51=None, Col52=None, Col53=None, Col54=None, Col55=None, Col56=None, Col57=None, Col58=None, Col59=None, Col60=None, Col61=None, Col62=None, Col63=None, Col64=None, gds_collector_=None, **kwargs_):2236 self.gds_collector_ = gds_collector_2237 self.gds_elementtree_node_ = None2238 self.original_tagname_ = None2239 self.parent_object_ = kwargs_.get('parent_object_')2240 self.ns_prefix_ = None2241 self.Row = _cast(int, Row)2242 self.Row_nsprefix_ = None2243 self.Axis1 = _cast(int, Axis1)2244 self.Axis1_nsprefix_ = None2245 self.Axis2 = _cast(int, Axis2)2246 self.Axis2_nsprefix_ = None2247 self.Axis3 = _cast(int, Axis3)2248 self.Axis3_nsprefix_ = None2249 self.Axis4 = _cast(int, Axis4)2250 self.Axis4_nsprefix_ = None2251 self.Col1 = Col12252 self.Col1_nsprefix_ = None2253 self.Col2 = Col22254 self.Col2_nsprefix_ = None2255 self.Col3 = Col32256 self.Col3_nsprefix_ = None2257 self.Col4 = Col42258 self.Col4_nsprefix_ = None2259 self.Col5 = Col52260 self.Col5_nsprefix_ = None2261 self.Col6 = Col62262 self.Col6_nsprefix_ = None2263 self.Col7 = Col72264 self.Col7_nsprefix_ = None2265 self.Col8 = Col82266 self.Col8_nsprefix_ = None2267 self.Col9 = Col92268 self.Col9_nsprefix_ = None2269 self.Col10 = Col102270 self.Col10_nsprefix_ = None2271 self.Col11 = Col112272 self.Col11_nsprefix_ = None2273 self.Col12 = Col122274 self.Col12_nsprefix_ = None2275 self.Col13 = Col132276 self.Col13_nsprefix_ = None2277 self.Col14 = Col142278 self.Col14_nsprefix_ = None2279 self.Col15 = Col152280 self.Col15_nsprefix_ = None2281 self.Col16 = Col162282 self.Col16_nsprefix_ = None2283 self.Col17 = Col172284 self.Col17_nsprefix_ = None2285 self.Col18 = Col182286 self.Col18_nsprefix_ = None2287 self.Col19 = Col192288 self.Col19_nsprefix_ = None2289 self.Col20 = Col202290 self.Col20_nsprefix_ = None2291 self.Col21 = Col212292 self.Col21_nsprefix_ = None2293 self.Col22 = Col222294 self.Col22_nsprefix_ = None2295 self.Col23 = Col232296 self.Col23_nsprefix_ = None2297 self.Col24 = Col242298 self.Col24_nsprefix_ = None2299 self.Col25 = Col252300 self.Col25_nsprefix_ = None2301 self.Col26 = Col262302 self.Col26_nsprefix_ = None2303 self.Col27 = Col272304 self.Col27_nsprefix_ = None2305 self.Col28 = Col282306 self.Col28_nsprefix_ = None2307 self.Col29 = Col292308 self.Col29_nsprefix_ = None2309 self.Col30 = Col302310 self.Col30_nsprefix_ = None2311 self.Col31 = Col312312 self.Col31_nsprefix_ = None2313 self.Col32 = Col322314 self.Col32_nsprefix_ = None2315 self.Col33 = Col332316 self.Col33_nsprefix_ = None2317 self.Col34 = Col342318 self.Col34_nsprefix_ = None2319 self.Col35 = Col352320 self.Col35_nsprefix_ = None2321 self.Col36 = Col362322 self.Col36_nsprefix_ = None2323 self.Col37 = Col372324 self.Col37_nsprefix_ = None2325 self.Col38 = Col382326 self.Col38_nsprefix_ = None2327 self.Col39 = Col392328 self.Col39_nsprefix_ = None2329 self.Col40 = Col402330 self.Col40_nsprefix_ = None2331 self.Col41 = Col412332 self.Col41_nsprefix_ = None2333 self.Col42 = Col422334 self.Col42_nsprefix_ = None2335 self.Col43 = Col432336 self.Col43_nsprefix_ = None2337 self.Col44 = Col442338 self.Col44_nsprefix_ = None2339 self.Col45 = Col452340 self.Col45_nsprefix_ = None2341 self.Col46 = Col462342 self.Col46_nsprefix_ = None2343 self.Col47 = Col472344 self.Col47_nsprefix_ = None2345 self.Col48 = Col482346 self.Col48_nsprefix_ = None2347 self.Col49 = Col492348 self.Col49_nsprefix_ = None2349 self.Col50 = Col502350 self.Col50_nsprefix_ = None2351 self.Col51 = Col512352 self.Col51_nsprefix_ = None2353 self.Col52 = Col522354 self.Col52_nsprefix_ = None2355 self.Col53 = Col532356 self.Col53_nsprefix_ = None2357 self.Col54 = Col542358 self.Col54_nsprefix_ = None2359 self.Col55 = Col552360 self.Col55_nsprefix_ = None2361 self.Col56 = Col562362 self.Col56_nsprefix_ = None2363 self.Col57 = Col572364 self.Col57_nsprefix_ = None2365 self.Col58 = Col582366 self.Col58_nsprefix_ = None2367 self.Col59 = Col592368 self.Col59_nsprefix_ = None2369 self.Col60 = Col602370 self.Col60_nsprefix_ = None2371 self.Col61 = Col612372 self.Col61_nsprefix_ = None2373 self.Col62 = Col622374 self.Col62_nsprefix_ = None2375 self.Col63 = Col632376 self.Col63_nsprefix_ = None2377 self.Col64 = Col642378 self.Col64_nsprefix_ = None2379 def factory(*args_, **kwargs_):2380 if CurrentSubclassModule_ is not None:2381 subclass = getSubclassFromModule_(2382 CurrentSubclassModule_, MDataType)2383 if subclass is not None:2384 return subclass(*args_, **kwargs_)2385 if MDataType.subclass:2386 return MDataType.subclass(*args_, **kwargs_)2387 else:2388 return MDataType(*args_, **kwargs_)2389 factory = staticmethod(factory)2390 def get_ns_prefix_(self):2391 return self.ns_prefix_2392 def set_ns_prefix_(self, ns_prefix):2393 self.ns_prefix_ = ns_prefix2394 def get_Col1(self):2395 return self.Col12396 def set_Col1(self, Col1):2397 self.Col1 = Col12398 def get_Col2(self):2399 return self.Col22400 def set_Col2(self, Col2):2401 self.Col2 = Col22402 def get_Col3(self):2403 return self.Col32404 def set_Col3(self, Col3):2405 self.Col3 = Col32406 def get_Col4(self):2407 return self.Col42408 def set_Col4(self, Col4):2409 self.Col4 = Col42410 def get_Col5(self):2411 return self.Col52412 def set_Col5(self, Col5):2413 self.Col5 = Col52414 def get_Col6(self):2415 return self.Col62416 def set_Col6(self, Col6):2417 self.Col6 = Col62418 def get_Col7(self):2419 return self.Col72420 def set_Col7(self, Col7):2421 self.Col7 = Col72422 def get_Col8(self):2423 return self.Col82424 def set_Col8(self, Col8):2425 self.Col8 = Col82426 def get_Col9(self):2427 return self.Col92428 def set_Col9(self, Col9):2429 self.Col9 = Col92430 def get_Col10(self):2431 return self.Col102432 def set_Col10(self, Col10):2433 self.Col10 = Col102434 def get_Col11(self):2435 return self.Col112436 def set_Col11(self, Col11):2437 self.Col11 = Col112438 def get_Col12(self):2439 return self.Col122440 def set_Col12(self, Col12):2441 self.Col12 = Col122442 def get_Col13(self):2443 return self.Col132444 def set_Col13(self, Col13):2445 self.Col13 = Col132446 def get_Col14(self):2447 return self.Col142448 def set_Col14(self, Col14):2449 self.Col14 = Col142450 def get_Col15(self):2451 return self.Col152452 def set_Col15(self, Col15):2453 self.Col15 = Col152454 def get_Col16(self):2455 return self.Col162456 def set_Col16(self, Col16):2457 self.Col16 = Col162458 def get_Col17(self):2459 return self.Col172460 def set_Col17(self, Col17):2461 self.Col17 = Col172462 def get_Col18(self):2463 return self.Col182464 def set_Col18(self, Col18):2465 self.Col18 = Col182466 def get_Col19(self):2467 return self.Col192468 def set_Col19(self, Col19):2469 self.Col19 = Col192470 def get_Col20(self):2471 return self.Col202472 def set_Col20(self, Col20):2473 self.Col20 = Col202474 def get_Col21(self):2475 return self.Col212476 def set_Col21(self, Col21):2477 self.Col21 = Col212478 def get_Col22(self):2479 return self.Col222480 def set_Col22(self, Col22):2481 self.Col22 = Col222482 def get_Col23(self):2483 return self.Col232484 def set_Col23(self, Col23):2485 self.Col23 = Col232486 def get_Col24(self):2487 return self.Col242488 def set_Col24(self, Col24):2489 self.Col24 = Col242490 def get_Col25(self):2491 return self.Col252492 def set_Col25(self, Col25):2493 self.Col25 = Col252494 def get_Col26(self):2495 return self.Col262496 def set_Col26(self, Col26):2497 self.Col26 = Col262498 def get_Col27(self):2499 return self.Col272500 def set_Col27(self, Col27):2501 self.Col27 = Col272502 def get_Col28(self):2503 return self.Col282504 def set_Col28(self, Col28):2505 self.Col28 = Col282506 def get_Col29(self):2507 return self.Col292508 def set_Col29(self, Col29):2509 self.Col29 = Col292510 def get_Col30(self):2511 return self.Col302512 def set_Col30(self, Col30):2513 self.Col30 = Col302514 def get_Col31(self):2515 return self.Col312516 def set_Col31(self, Col31):2517 self.Col31 = Col312518 def get_Col32(self):2519 return self.Col322520 def set_Col32(self, Col32):2521 self.Col32 = Col322522 def get_Col33(self):2523 return self.Col332524 def set_Col33(self, Col33):2525 self.Col33 = Col332526 def get_Col34(self):2527 return self.Col342528 def set_Col34(self, Col34):2529 self.Col34 = Col342530 def get_Col35(self):2531 return self.Col352532 def set_Col35(self, Col35):2533 self.Col35 = Col352534 def get_Col36(self):2535 return self.Col362536 def set_Col36(self, Col36):2537 self.Col36 = Col362538 def get_Col37(self):2539 return self.Col372540 def set_Col37(self, Col37):2541 self.Col37 = Col372542 def get_Col38(self):2543 return self.Col382544 def set_Col38(self, Col38):2545 self.Col38 = Col382546 def get_Col39(self):2547 return self.Col392548 def set_Col39(self, Col39):2549 self.Col39 = Col392550 def get_Col40(self):2551 return self.Col402552 def set_Col40(self, Col40):2553 self.Col40 = Col402554 def get_Col41(self):2555 return self.Col412556 def set_Col41(self, Col41):2557 self.Col41 = Col412558 def get_Col42(self):2559 return self.Col422560 def set_Col42(self, Col42):2561 self.Col42 = Col422562 def get_Col43(self):2563 return self.Col432564 def set_Col43(self, Col43):2565 self.Col43 = Col432566 def get_Col44(self):2567 return self.Col442568 def set_Col44(self, Col44):2569 self.Col44 = Col442570 def get_Col45(self):2571 return self.Col452572 def set_Col45(self, Col45):2573 self.Col45 = Col452574 def get_Col46(self):2575 return self.Col462576 def set_Col46(self, Col46):2577 self.Col46 = Col462578 def get_Col47(self):2579 return self.Col472580 def set_Col47(self, Col47):2581 self.Col47 = Col472582 def get_Col48(self):2583 return self.Col482584 def set_Col48(self, Col48):2585 self.Col48 = Col482586 def get_Col49(self):2587 return self.Col492588 def set_Col49(self, Col49):2589 self.Col49 = Col492590 def get_Col50(self):2591 return self.Col502592 def set_Col50(self, Col50):2593 self.Col50 = Col502594 def get_Col51(self):2595 return self.Col512596 def set_Col51(self, Col51):2597 self.Col51 = Col512598 def get_Col52(self):2599 return self.Col522600 def set_Col52(self, Col52):2601 self.Col52 = Col522602 def get_Col53(self):2603 return self.Col532604 def set_Col53(self, Col53):2605 self.Col53 = Col532606 def get_Col54(self):2607 return self.Col542608 def set_Col54(self, Col54):2609 self.Col54 = Col542610 def get_Col55(self):2611 return self.Col552612 def set_Col55(self, Col55):2613 self.Col55 = Col552614 def get_Col56(self):2615 return self.Col562616 def set_Col56(self, Col56):2617 self.Col56 = Col562618 def get_Col57(self):2619 return self.Col572620 def set_Col57(self, Col57):2621 self.Col57 = Col572622 def get_Col58(self):2623 return self.Col582624 def set_Col58(self, Col58):2625 self.Col58 = Col582626 def get_Col59(self):2627 return self.Col592628 def set_Col59(self, Col59):2629 self.Col59 = Col592630 def get_Col60(self):2631 return self.Col602632 def set_Col60(self, Col60):2633 self.Col60 = Col602634 def get_Col61(self):2635 return self.Col612636 def set_Col61(self, Col61):2637 self.Col61 = Col612638 def get_Col62(self):2639 return self.Col622640 def set_Col62(self, Col62):2641 self.Col62 = Col622642 def get_Col63(self):2643 return self.Col632644 def set_Col63(self, Col63):2645 self.Col63 = Col632646 def get_Col64(self):2647 return self.Col642648 def set_Col64(self, Col64):2649 self.Col64 = Col642650 def get_Row(self):2651 return self.Row2652 def set_Row(self, Row):2653 self.Row = Row2654 def get_Axis1(self):2655 return self.Axis12656 def set_Axis1(self, Axis1):2657 self.Axis1 = Axis12658 def get_Axis2(self):2659 return self.Axis22660 def set_Axis2(self, Axis2):2661 self.Axis2 = Axis22662 def get_Axis3(self):2663 return self.Axis32664 def set_Axis3(self, Axis3):2665 self.Axis3 = Axis32666 def get_Axis4(self):2667 return self.Axis42668 def set_Axis4(self, Axis4):2669 self.Axis4 = Axis42670 def _hasContent(self):2671 if (2672 self.Col1 is not None or2673 self.Col2 is not None or2674 self.Col3 is not None or2675 self.Col4 is not None or2676 self.Col5 is not None or2677 self.Col6 is not None or2678 self.Col7 is not None or2679 self.Col8 is not None or2680 self.Col9 is not None or2681 self.Col10 is not None or2682 self.Col11 is not None or2683 self.Col12 is not None or2684 self.Col13 is not None or2685 self.Col14 is not None or2686 self.Col15 is not None or2687 self.Col16 is not None or2688 self.Col17 is not None or2689 self.Col18 is not None or2690 self.Col19 is not None or2691 self.Col20 is not None or2692 self.Col21 is not None or2693 self.Col22 is not None or2694 self.Col23 is not None or2695 self.Col24 is not None or2696 self.Col25 is not None or2697 self.Col26 is not None or2698 self.Col27 is not None or2699 self.Col28 is not None or2700 self.Col29 is not None or2701 self.Col30 is not None or2702 self.Col31 is not None or2703 self.Col32 is not None or2704 self.Col33 is not None or2705 self.Col34 is not None or2706 self.Col35 is not None or2707 self.Col36 is not None or2708 self.Col37 is not None or2709 self.Col38 is not None or2710 self.Col39 is not None or2711 self.Col40 is not None or2712 self.Col41 is not None or2713 self.Col42 is not None or2714 self.Col43 is not None or2715 self.Col44 is not None or2716 self.Col45 is not None or2717 self.Col46 is not None or2718 self.Col47 is not None or2719 self.Col48 is not None or2720 self.Col49 is not None or2721 self.Col50 is not None or2722 self.Col51 is not None or2723 self.Col52 is not None or2724 self.Col53 is not None or2725 self.Col54 is not None or2726 self.Col55 is not None or2727 self.Col56 is not None or2728 self.Col57 is not None or2729 self.Col58 is not None or2730 self.Col59 is not None or2731 self.Col60 is not None or2732 self.Col61 is not None or2733 self.Col62 is not None or2734 self.Col63 is not None or2735 self.Col64 is not None2736 ):2737 return True2738 else:2739 return False2740 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='MDataType', pretty_print=True):2741 imported_ns_def_ = GenerateDSNamespaceDefs_.get('MDataType')2742 if imported_ns_def_ is not None:2743 namespacedef_ = imported_ns_def_2744 if pretty_print:2745 eol_ = '\n'2746 else:2747 eol_ = ''2748 if self.original_tagname_ is not None and name_ == 'MDataType':2749 name_ = self.original_tagname_2750 if UseCapturedNS_ and self.ns_prefix_:2751 namespaceprefix_ = self.ns_prefix_ + ':'2752 showIndent(outfile, level, pretty_print)2753 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2754 already_processed = set()2755 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MDataType')2756 if self._hasContent():2757 outfile.write('>%s' % (eol_, ))2758 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='MDataType', pretty_print=pretty_print)2759 showIndent(outfile, level, pretty_print)2760 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))2761 else:2762 outfile.write('/>%s' % (eol_, ))2763 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='MDataType'):2764 if self.Row is not None and 'Row' not in already_processed:2765 already_processed.add('Row')2766 outfile.write(' Row="%s"' % self.gds_format_integer(self.Row, input_name='Row'))2767 if self.Axis1 is not None and 'Axis1' not in already_processed:2768 already_processed.add('Axis1')2769 outfile.write(' Axis1="%s"' % self.gds_format_integer(self.Axis1, input_name='Axis1'))2770 if self.Axis2 is not None and 'Axis2' not in already_processed:2771 already_processed.add('Axis2')2772 outfile.write(' Axis2="%s"' % self.gds_format_integer(self.Axis2, input_name='Axis2'))2773 if self.Axis3 is not None and 'Axis3' not in already_processed:2774 already_processed.add('Axis3')2775 outfile.write(' Axis3="%s"' % self.gds_format_integer(self.Axis3, input_name='Axis3'))2776 if self.Axis4 is not None and 'Axis4' not in already_processed:2777 already_processed.add('Axis4')2778 outfile.write(' Axis4="%s"' % self.gds_format_integer(self.Axis4, input_name='Axis4'))2779 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='MDataType', fromsubclass_=False, pretty_print=True):2780 if pretty_print:2781 eol_ = '\n'2782 else:2783 eol_ = ''2784 if self.Col1 is not None:2785 namespaceprefix_ = self.Col1_nsprefix_ + ':' if (UseCapturedNS_ and self.Col1_nsprefix_) else ''2786 showIndent(outfile, level, pretty_print)2787 outfile.write('<%sCol1>%s</%sCol1>%s' % (namespaceprefix_ , self.gds_format_double(self.Col1, input_name='Col1'), namespaceprefix_ , eol_))2788 if self.Col2 is not None:2789 namespaceprefix_ = self.Col2_nsprefix_ + ':' if (UseCapturedNS_ and self.Col2_nsprefix_) else ''2790 showIndent(outfile, level, pretty_print)2791 outfile.write('<%sCol2>%s</%sCol2>%s' % (namespaceprefix_ , self.gds_format_double(self.Col2, input_name='Col2'), namespaceprefix_ , eol_))2792 if self.Col3 is not None:2793 namespaceprefix_ = self.Col3_nsprefix_ + ':' if (UseCapturedNS_ and self.Col3_nsprefix_) else ''2794 showIndent(outfile, level, pretty_print)2795 outfile.write('<%sCol3>%s</%sCol3>%s' % (namespaceprefix_ , self.gds_format_double(self.Col3, input_name='Col3'), namespaceprefix_ , eol_))2796 if self.Col4 is not None:2797 namespaceprefix_ = self.Col4_nsprefix_ + ':' if (UseCapturedNS_ and self.Col4_nsprefix_) else ''2798 showIndent(outfile, level, pretty_print)2799 outfile.write('<%sCol4>%s</%sCol4>%s' % (namespaceprefix_ , self.gds_format_double(self.Col4, input_name='Col4'), namespaceprefix_ , eol_))2800 if self.Col5 is not None:2801 namespaceprefix_ = self.Col5_nsprefix_ + ':' if (UseCapturedNS_ and self.Col5_nsprefix_) else ''2802 showIndent(outfile, level, pretty_print)2803 outfile.write('<%sCol5>%s</%sCol5>%s' % (namespaceprefix_ , self.gds_format_double(self.Col5, input_name='Col5'), namespaceprefix_ , eol_))2804 if self.Col6 is not None:2805 namespaceprefix_ = self.Col6_nsprefix_ + ':' if (UseCapturedNS_ and self.Col6_nsprefix_) else ''2806 showIndent(outfile, level, pretty_print)2807 outfile.write('<%sCol6>%s</%sCol6>%s' % (namespaceprefix_ , self.gds_format_double(self.Col6, input_name='Col6'), namespaceprefix_ , eol_))2808 if self.Col7 is not None:2809 namespaceprefix_ = self.Col7_nsprefix_ + ':' if (UseCapturedNS_ and self.Col7_nsprefix_) else ''2810 showIndent(outfile, level, pretty_print)2811 outfile.write('<%sCol7>%s</%sCol7>%s' % (namespaceprefix_ , self.gds_format_double(self.Col7, input_name='Col7'), namespaceprefix_ , eol_))2812 if self.Col8 is not None:2813 namespaceprefix_ = self.Col8_nsprefix_ + ':' if (UseCapturedNS_ and self.Col8_nsprefix_) else ''2814 showIndent(outfile, level, pretty_print)2815 outfile.write('<%sCol8>%s</%sCol8>%s' % (namespaceprefix_ , self.gds_format_double(self.Col8, input_name='Col8'), namespaceprefix_ , eol_))2816 if self.Col9 is not None:2817 namespaceprefix_ = self.Col9_nsprefix_ + ':' if (UseCapturedNS_ and self.Col9_nsprefix_) else ''2818 showIndent(outfile, level, pretty_print)2819 outfile.write('<%sCol9>%s</%sCol9>%s' % (namespaceprefix_ , self.gds_format_double(self.Col9, input_name='Col9'), namespaceprefix_ , eol_))2820 if self.Col10 is not None:2821 namespaceprefix_ = self.Col10_nsprefix_ + ':' if (UseCapturedNS_ and self.Col10_nsprefix_) else ''2822 showIndent(outfile, level, pretty_print)2823 outfile.write('<%sCol10>%s</%sCol10>%s' % (namespaceprefix_ , self.gds_format_double(self.Col10, input_name='Col10'), namespaceprefix_ , eol_))2824 if self.Col11 is not None:2825 namespaceprefix_ = self.Col11_nsprefix_ + ':' if (UseCapturedNS_ and self.Col11_nsprefix_) else ''2826 showIndent(outfile, level, pretty_print)2827 outfile.write('<%sCol11>%s</%sCol11>%s' % (namespaceprefix_ , self.gds_format_double(self.Col11, input_name='Col11'), namespaceprefix_ , eol_))2828 if self.Col12 is not None:2829 namespaceprefix_ = self.Col12_nsprefix_ + ':' if (UseCapturedNS_ and self.Col12_nsprefix_) else ''2830 showIndent(outfile, level, pretty_print)2831 outfile.write('<%sCol12>%s</%sCol12>%s' % (namespaceprefix_ , self.gds_format_double(self.Col12, input_name='Col12'), namespaceprefix_ , eol_))2832 if self.Col13 is not None:2833 namespaceprefix_ = self.Col13_nsprefix_ + ':' if (UseCapturedNS_ and self.Col13_nsprefix_) else ''2834 showIndent(outfile, level, pretty_print)2835 outfile.write('<%sCol13>%s</%sCol13>%s' % (namespaceprefix_ , self.gds_format_double(self.Col13, input_name='Col13'), namespaceprefix_ , eol_))2836 if self.Col14 is not None:2837 namespaceprefix_ = self.Col14_nsprefix_ + ':' if (UseCapturedNS_ and self.Col14_nsprefix_) else ''2838 showIndent(outfile, level, pretty_print)2839 outfile.write('<%sCol14>%s</%sCol14>%s' % (namespaceprefix_ , self.gds_format_double(self.Col14, input_name='Col14'), namespaceprefix_ , eol_))2840 if self.Col15 is not None:2841 namespaceprefix_ = self.Col15_nsprefix_ + ':' if (UseCapturedNS_ and self.Col15_nsprefix_) else ''2842 showIndent(outfile, level, pretty_print)2843 outfile.write('<%sCol15>%s</%sCol15>%s' % (namespaceprefix_ , self.gds_format_double(self.Col15, input_name='Col15'), namespaceprefix_ , eol_))2844 if self.Col16 is not None:2845 namespaceprefix_ = self.Col16_nsprefix_ + ':' if (UseCapturedNS_ and self.Col16_nsprefix_) else ''2846 showIndent(outfile, level, pretty_print)2847 outfile.write('<%sCol16>%s</%sCol16>%s' % (namespaceprefix_ , self.gds_format_double(self.Col16, input_name='Col16'), namespaceprefix_ , eol_))2848 if self.Col17 is not None:2849 namespaceprefix_ = self.Col17_nsprefix_ + ':' if (UseCapturedNS_ and self.Col17_nsprefix_) else ''2850 showIndent(outfile, level, pretty_print)2851 outfile.write('<%sCol17>%s</%sCol17>%s' % (namespaceprefix_ , self.gds_format_double(self.Col17, input_name='Col17'), namespaceprefix_ , eol_))2852 if self.Col18 is not None:2853 namespaceprefix_ = self.Col18_nsprefix_ + ':' if (UseCapturedNS_ and self.Col18_nsprefix_) else ''2854 showIndent(outfile, level, pretty_print)2855 outfile.write('<%sCol18>%s</%sCol18>%s' % (namespaceprefix_ , self.gds_format_double(self.Col18, input_name='Col18'), namespaceprefix_ , eol_))2856 if self.Col19 is not None:2857 namespaceprefix_ = self.Col19_nsprefix_ + ':' if (UseCapturedNS_ and self.Col19_nsprefix_) else ''2858 showIndent(outfile, level, pretty_print)2859 outfile.write('<%sCol19>%s</%sCol19>%s' % (namespaceprefix_ , self.gds_format_double(self.Col19, input_name='Col19'), namespaceprefix_ , eol_))2860 if self.Col20 is not None:2861 namespaceprefix_ = self.Col20_nsprefix_ + ':' if (UseCapturedNS_ and self.Col20_nsprefix_) else ''2862 showIndent(outfile, level, pretty_print)2863 outfile.write('<%sCol20>%s</%sCol20>%s' % (namespaceprefix_ , self.gds_format_double(self.Col20, input_name='Col20'), namespaceprefix_ , eol_))2864 if self.Col21 is not None:2865 namespaceprefix_ = self.Col21_nsprefix_ + ':' if (UseCapturedNS_ and self.Col21_nsprefix_) else ''2866 showIndent(outfile, level, pretty_print)2867 outfile.write('<%sCol21>%s</%sCol21>%s' % (namespaceprefix_ , self.gds_format_double(self.Col21, input_name='Col21'), namespaceprefix_ , eol_))2868 if self.Col22 is not None:2869 namespaceprefix_ = self.Col22_nsprefix_ + ':' if (UseCapturedNS_ and self.Col22_nsprefix_) else ''2870 showIndent(outfile, level, pretty_print)2871 outfile.write('<%sCol22>%s</%sCol22>%s' % (namespaceprefix_ , self.gds_format_double(self.Col22, input_name='Col22'), namespaceprefix_ , eol_))2872 if self.Col23 is not None:2873 namespaceprefix_ = self.Col23_nsprefix_ + ':' if (UseCapturedNS_ and self.Col23_nsprefix_) else ''2874 showIndent(outfile, level, pretty_print)2875 outfile.write('<%sCol23>%s</%sCol23>%s' % (namespaceprefix_ , self.gds_format_double(self.Col23, input_name='Col23'), namespaceprefix_ , eol_))2876 if self.Col24 is not None:2877 namespaceprefix_ = self.Col24_nsprefix_ + ':' if (UseCapturedNS_ and self.Col24_nsprefix_) else ''2878 showIndent(outfile, level, pretty_print)2879 outfile.write('<%sCol24>%s</%sCol24>%s' % (namespaceprefix_ , self.gds_format_double(self.Col24, input_name='Col24'), namespaceprefix_ , eol_))2880 if self.Col25 is not None:2881 namespaceprefix_ = self.Col25_nsprefix_ + ':' if (UseCapturedNS_ and self.Col25_nsprefix_) else ''2882 showIndent(outfile, level, pretty_print)2883 outfile.write('<%sCol25>%s</%sCol25>%s' % (namespaceprefix_ , self.gds_format_double(self.Col25, input_name='Col25'), namespaceprefix_ , eol_))2884 if self.Col26 is not None:2885 namespaceprefix_ = self.Col26_nsprefix_ + ':' if (UseCapturedNS_ and self.Col26_nsprefix_) else ''2886 showIndent(outfile, level, pretty_print)2887 outfile.write('<%sCol26>%s</%sCol26>%s' % (namespaceprefix_ , self.gds_format_double(self.Col26, input_name='Col26'), namespaceprefix_ , eol_))2888 if self.Col27 is not None:2889 namespaceprefix_ = self.Col27_nsprefix_ + ':' if (UseCapturedNS_ and self.Col27_nsprefix_) else ''2890 showIndent(outfile, level, pretty_print)2891 outfile.write('<%sCol27>%s</%sCol27>%s' % (namespaceprefix_ , self.gds_format_double(self.Col27, input_name='Col27'), namespaceprefix_ , eol_))2892 if self.Col28 is not None:2893 namespaceprefix_ = self.Col28_nsprefix_ + ':' if (UseCapturedNS_ and self.Col28_nsprefix_) else ''2894 showIndent(outfile, level, pretty_print)2895 outfile.write('<%sCol28>%s</%sCol28>%s' % (namespaceprefix_ , self.gds_format_double(self.Col28, input_name='Col28'), namespaceprefix_ , eol_))2896 if self.Col29 is not None:2897 namespaceprefix_ = self.Col29_nsprefix_ + ':' if (UseCapturedNS_ and self.Col29_nsprefix_) else ''2898 showIndent(outfile, level, pretty_print)2899 outfile.write('<%sCol29>%s</%sCol29>%s' % (namespaceprefix_ , self.gds_format_double(self.Col29, input_name='Col29'), namespaceprefix_ , eol_))2900 if self.Col30 is not None:2901 namespaceprefix_ = self.Col30_nsprefix_ + ':' if (UseCapturedNS_ and self.Col30_nsprefix_) else ''2902 showIndent(outfile, level, pretty_print)2903 outfile.write('<%sCol30>%s</%sCol30>%s' % (namespaceprefix_ , self.gds_format_double(self.Col30, input_name='Col30'), namespaceprefix_ , eol_))2904 if self.Col31 is not None:2905 namespaceprefix_ = self.Col31_nsprefix_ + ':' if (UseCapturedNS_ and self.Col31_nsprefix_) else ''2906 showIndent(outfile, level, pretty_print)2907 outfile.write('<%sCol31>%s</%sCol31>%s' % (namespaceprefix_ , self.gds_format_double(self.Col31, input_name='Col31'), namespaceprefix_ , eol_))2908 if self.Col32 is not None:2909 namespaceprefix_ = self.Col32_nsprefix_ + ':' if (UseCapturedNS_ and self.Col32_nsprefix_) else ''2910 showIndent(outfile, level, pretty_print)2911 outfile.write('<%sCol32>%s</%sCol32>%s' % (namespaceprefix_ , self.gds_format_double(self.Col32, input_name='Col32'), namespaceprefix_ , eol_))2912 if self.Col33 is not None:2913 namespaceprefix_ = self.Col33_nsprefix_ + ':' if (UseCapturedNS_ and self.Col33_nsprefix_) else ''2914 showIndent(outfile, level, pretty_print)2915 outfile.write('<%sCol33>%s</%sCol33>%s' % (namespaceprefix_ , self.gds_format_double(self.Col33, input_name='Col33'), namespaceprefix_ , eol_))2916 if self.Col34 is not None:2917 namespaceprefix_ = self.Col34_nsprefix_ + ':' if (UseCapturedNS_ and self.Col34_nsprefix_) else ''2918 showIndent(outfile, level, pretty_print)2919 outfile.write('<%sCol34>%s</%sCol34>%s' % (namespaceprefix_ , self.gds_format_double(self.Col34, input_name='Col34'), namespaceprefix_ , eol_))2920 if self.Col35 is not None:2921 namespaceprefix_ = self.Col35_nsprefix_ + ':' if (UseCapturedNS_ and self.Col35_nsprefix_) else ''2922 showIndent(outfile, level, pretty_print)2923 outfile.write('<%sCol35>%s</%sCol35>%s' % (namespaceprefix_ , self.gds_format_double(self.Col35, input_name='Col35'), namespaceprefix_ , eol_))2924 if self.Col36 is not None:2925 namespaceprefix_ = self.Col36_nsprefix_ + ':' if (UseCapturedNS_ and self.Col36_nsprefix_) else ''2926 showIndent(outfile, level, pretty_print)2927 outfile.write('<%sCol36>%s</%sCol36>%s' % (namespaceprefix_ , self.gds_format_double(self.Col36, input_name='Col36'), namespaceprefix_ , eol_))2928 if self.Col37 is not None:2929 namespaceprefix_ = self.Col37_nsprefix_ + ':' if (UseCapturedNS_ and self.Col37_nsprefix_) else ''2930 showIndent(outfile, level, pretty_print)2931 outfile.write('<%sCol37>%s</%sCol37>%s' % (namespaceprefix_ , self.gds_format_double(self.Col37, input_name='Col37'), namespaceprefix_ , eol_))2932 if self.Col38 is not None:2933 namespaceprefix_ = self.Col38_nsprefix_ + ':' if (UseCapturedNS_ and self.Col38_nsprefix_) else ''2934 showIndent(outfile, level, pretty_print)2935 outfile.write('<%sCol38>%s</%sCol38>%s' % (namespaceprefix_ , self.gds_format_double(self.Col38, input_name='Col38'), namespaceprefix_ , eol_))2936 if self.Col39 is not None:2937 namespaceprefix_ = self.Col39_nsprefix_ + ':' if (UseCapturedNS_ and self.Col39_nsprefix_) else ''2938 showIndent(outfile, level, pretty_print)2939 outfile.write('<%sCol39>%s</%sCol39>%s' % (namespaceprefix_ , self.gds_format_double(self.Col39, input_name='Col39'), namespaceprefix_ , eol_))2940 if self.Col40 is not None:2941 namespaceprefix_ = self.Col40_nsprefix_ + ':' if (UseCapturedNS_ and self.Col40_nsprefix_) else ''2942 showIndent(outfile, level, pretty_print)2943 outfile.write('<%sCol40>%s</%sCol40>%s' % (namespaceprefix_ , self.gds_format_double(self.Col40, input_name='Col40'), namespaceprefix_ , eol_))2944 if self.Col41 is not None:2945 namespaceprefix_ = self.Col41_nsprefix_ + ':' if (UseCapturedNS_ and self.Col41_nsprefix_) else ''2946 showIndent(outfile, level, pretty_print)2947 outfile.write('<%sCol41>%s</%sCol41>%s' % (namespaceprefix_ , self.gds_format_double(self.Col41, input_name='Col41'), namespaceprefix_ , eol_))2948 if self.Col42 is not None:2949 namespaceprefix_ = self.Col42_nsprefix_ + ':' if (UseCapturedNS_ and self.Col42_nsprefix_) else ''2950 showIndent(outfile, level, pretty_print)2951 outfile.write('<%sCol42>%s</%sCol42>%s' % (namespaceprefix_ , self.gds_format_double(self.Col42, input_name='Col42'), namespaceprefix_ , eol_))2952 if self.Col43 is not None:2953 namespaceprefix_ = self.Col43_nsprefix_ + ':' if (UseCapturedNS_ and self.Col43_nsprefix_) else ''2954 showIndent(outfile, level, pretty_print)2955 outfile.write('<%sCol43>%s</%sCol43>%s' % (namespaceprefix_ , self.gds_format_double(self.Col43, input_name='Col43'), namespaceprefix_ , eol_))2956 if self.Col44 is not None:2957 namespaceprefix_ = self.Col44_nsprefix_ + ':' if (UseCapturedNS_ and self.Col44_nsprefix_) else ''2958 showIndent(outfile, level, pretty_print)2959 outfile.write('<%sCol44>%s</%sCol44>%s' % (namespaceprefix_ , self.gds_format_double(self.Col44, input_name='Col44'), namespaceprefix_ , eol_))2960 if self.Col45 is not None:2961 namespaceprefix_ = self.Col45_nsprefix_ + ':' if (UseCapturedNS_ and self.Col45_nsprefix_) else ''2962 showIndent(outfile, level, pretty_print)2963 outfile.write('<%sCol45>%s</%sCol45>%s' % (namespaceprefix_ , self.gds_format_double(self.Col45, input_name='Col45'), namespaceprefix_ , eol_))2964 if self.Col46 is not None:2965 namespaceprefix_ = self.Col46_nsprefix_ + ':' if (UseCapturedNS_ and self.Col46_nsprefix_) else ''2966 showIndent(outfile, level, pretty_print)2967 outfile.write('<%sCol46>%s</%sCol46>%s' % (namespaceprefix_ , self.gds_format_double(self.Col46, input_name='Col46'), namespaceprefix_ , eol_))2968 if self.Col47 is not None:2969 namespaceprefix_ = self.Col47_nsprefix_ + ':' if (UseCapturedNS_ and self.Col47_nsprefix_) else ''2970 showIndent(outfile, level, pretty_print)2971 outfile.write('<%sCol47>%s</%sCol47>%s' % (namespaceprefix_ , self.gds_format_double(self.Col47, input_name='Col47'), namespaceprefix_ , eol_))2972 if self.Col48 is not None:2973 namespaceprefix_ = self.Col48_nsprefix_ + ':' if (UseCapturedNS_ and self.Col48_nsprefix_) else ''2974 showIndent(outfile, level, pretty_print)2975 outfile.write('<%sCol48>%s</%sCol48>%s' % (namespaceprefix_ , self.gds_format_double(self.Col48, input_name='Col48'), namespaceprefix_ , eol_))2976 if self.Col49 is not None:2977 namespaceprefix_ = self.Col49_nsprefix_ + ':' if (UseCapturedNS_ and self.Col49_nsprefix_) else ''2978 showIndent(outfile, level, pretty_print)2979 outfile.write('<%sCol49>%s</%sCol49>%s' % (namespaceprefix_ , self.gds_format_double(self.Col49, input_name='Col49'), namespaceprefix_ , eol_))2980 if self.Col50 is not None:2981 namespaceprefix_ = self.Col50_nsprefix_ + ':' if (UseCapturedNS_ and self.Col50_nsprefix_) else ''2982 showIndent(outfile, level, pretty_print)2983 outfile.write('<%sCol50>%s</%sCol50>%s' % (namespaceprefix_ , self.gds_format_double(self.Col50, input_name='Col50'), namespaceprefix_ , eol_))2984 if self.Col51 is not None:2985 namespaceprefix_ = self.Col51_nsprefix_ + ':' if (UseCapturedNS_ and self.Col51_nsprefix_) else ''2986 showIndent(outfile, level, pretty_print)2987 outfile.write('<%sCol51>%s</%sCol51>%s' % (namespaceprefix_ , self.gds_format_double(self.Col51, input_name='Col51'), namespaceprefix_ , eol_))2988 if self.Col52 is not None:2989 namespaceprefix_ = self.Col52_nsprefix_ + ':' if (UseCapturedNS_ and self.Col52_nsprefix_) else ''2990 showIndent(outfile, level, pretty_print)2991 outfile.write('<%sCol52>%s</%sCol52>%s' % (namespaceprefix_ , self.gds_format_double(self.Col52, input_name='Col52'), namespaceprefix_ , eol_))2992 if self.Col53 is not None:2993 namespaceprefix_ = self.Col53_nsprefix_ + ':' if (UseCapturedNS_ and self.Col53_nsprefix_) else ''2994 showIndent(outfile, level, pretty_print)2995 outfile.write('<%sCol53>%s</%sCol53>%s' % (namespaceprefix_ , self.gds_format_double(self.Col53, input_name='Col53'), namespaceprefix_ , eol_))2996 if self.Col54 is not None:2997 namespaceprefix_ = self.Col54_nsprefix_ + ':' if (UseCapturedNS_ and self.Col54_nsprefix_) else ''2998 showIndent(outfile, level, pretty_print)2999 outfile.write('<%sCol54>%s</%sCol54>%s' % (namespaceprefix_ , self.gds_format_double(self.Col54, input_name='Col54'), namespaceprefix_ , eol_))3000 if self.Col55 is not None:3001 namespaceprefix_ = self.Col55_nsprefix_ + ':' if (UseCapturedNS_ and self.Col55_nsprefix_) else ''3002 showIndent(outfile, level, pretty_print)3003 outfile.write('<%sCol55>%s</%sCol55>%s' % (namespaceprefix_ , self.gds_format_double(self.Col55, input_name='Col55'), namespaceprefix_ , eol_))3004 if self.Col56 is not None:3005 namespaceprefix_ = self.Col56_nsprefix_ + ':' if (UseCapturedNS_ and self.Col56_nsprefix_) else ''3006 showIndent(outfile, level, pretty_print)3007 outfile.write('<%sCol56>%s</%sCol56>%s' % (namespaceprefix_ , self.gds_format_double(self.Col56, input_name='Col56'), namespaceprefix_ , eol_))3008 if self.Col57 is not None:3009 namespaceprefix_ = self.Col57_nsprefix_ + ':' if (UseCapturedNS_ and self.Col57_nsprefix_) else ''3010 showIndent(outfile, level, pretty_print)3011 outfile.write('<%sCol57>%s</%sCol57>%s' % (namespaceprefix_ , self.gds_format_double(self.Col57, input_name='Col57'), namespaceprefix_ , eol_))3012 if self.Col58 is not None:3013 namespaceprefix_ = self.Col58_nsprefix_ + ':' if (UseCapturedNS_ and self.Col58_nsprefix_) else ''3014 showIndent(outfile, level, pretty_print)3015 outfile.write('<%sCol58>%s</%sCol58>%s' % (namespaceprefix_ , self.gds_format_double(self.Col58, input_name='Col58'), namespaceprefix_ , eol_))3016 if self.Col59 is not None:3017 namespaceprefix_ = self.Col59_nsprefix_ + ':' if (UseCapturedNS_ and self.Col59_nsprefix_) else ''3018 showIndent(outfile, level, pretty_print)3019 outfile.write('<%sCol59>%s</%sCol59>%s' % (namespaceprefix_ , self.gds_format_double(self.Col59, input_name='Col59'), namespaceprefix_ , eol_))3020 if self.Col60 is not None:3021 namespaceprefix_ = self.Col60_nsprefix_ + ':' if (UseCapturedNS_ and self.Col60_nsprefix_) else ''3022 showIndent(outfile, level, pretty_print)3023 outfile.write('<%sCol60>%s</%sCol60>%s' % (namespaceprefix_ , self.gds_format_double(self.Col60, input_name='Col60'), namespaceprefix_ , eol_))3024 if self.Col61 is not None:3025 namespaceprefix_ = self.Col61_nsprefix_ + ':' if (UseCapturedNS_ and self.Col61_nsprefix_) else ''3026 showIndent(outfile, level, pretty_print)3027 outfile.write('<%sCol61>%s</%sCol61>%s' % (namespaceprefix_ , self.gds_format_double(self.Col61, input_name='Col61'), namespaceprefix_ , eol_))3028 if self.Col62 is not None:3029 namespaceprefix_ = self.Col62_nsprefix_ + ':' if (UseCapturedNS_ and self.Col62_nsprefix_) else ''3030 showIndent(outfile, level, pretty_print)3031 outfile.write('<%sCol62>%s</%sCol62>%s' % (namespaceprefix_ , self.gds_format_double(self.Col62, input_name='Col62'), namespaceprefix_ , eol_))3032 if self.Col63 is not None:3033 namespaceprefix_ = self.Col63_nsprefix_ + ':' if (UseCapturedNS_ and self.Col63_nsprefix_) else ''3034 showIndent(outfile, level, pretty_print)3035 outfile.write('<%sCol63>%s</%sCol63>%s' % (namespaceprefix_ , self.gds_format_double(self.Col63, input_name='Col63'), namespaceprefix_ , eol_))3036 if self.Col64 is not None:3037 namespaceprefix_ = self.Col64_nsprefix_ + ':' if (UseCapturedNS_ and self.Col64_nsprefix_) else ''3038 showIndent(outfile, level, pretty_print)3039 outfile.write('<%sCol64>%s</%sCol64>%s' % (namespaceprefix_ , self.gds_format_double(self.Col64, input_name='Col64'), namespaceprefix_ , eol_))3040 def exportLiteral(self, outfile, level, name_='MDataType'):3041 level += 13042 already_processed = set()3043 self._exportLiteralAttributes(outfile, level, already_processed, name_)3044 if self._hasContent():3045 self._exportLiteralChildren(outfile, level, name_)3046 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):3047 if self.Row is not None and 'Row' not in already_processed:3048 already_processed.add('Row')3049 showIndent(outfile, level)3050 outfile.write('Row=%d,\n' % (self.Row,))3051 if self.Axis1 is not None and 'Axis1' not in already_processed:3052 already_processed.add('Axis1')3053 showIndent(outfile, level)3054 outfile.write('Axis1=%d,\n' % (self.Axis1,))3055 if self.Axis2 is not None and 'Axis2' not in already_processed:3056 already_processed.add('Axis2')3057 showIndent(outfile, level)3058 outfile.write('Axis2=%d,\n' % (self.Axis2,))3059 if self.Axis3 is not None and 'Axis3' not in already_processed:3060 already_processed.add('Axis3')3061 showIndent(outfile, level)3062 outfile.write('Axis3=%d,\n' % (self.Axis3,))3063 if self.Axis4 is not None and 'Axis4' not in already_processed:3064 already_processed.add('Axis4')3065 showIndent(outfile, level)3066 outfile.write('Axis4=%d,\n' % (self.Axis4,))3067 def _exportLiteralChildren(self, outfile, level, name_):3068 if self.Col1 is not None:3069 showIndent(outfile, level)3070 outfile.write(Col1=self.gds_format_double(self.Col1))3071 if self.Col2 is not None:3072 showIndent(outfile, level)3073 outfile.write(Col2=self.gds_format_double(self.Col2))3074 if self.Col3 is not None:3075 showIndent(outfile, level)3076 outfile.write(Col3=self.gds_format_double(self.Col3))3077 if self.Col4 is not None:3078 showIndent(outfile, level)3079 outfile.write(Col4=self.gds_format_double(self.Col4))3080 if self.Col5 is not None:3081 showIndent(outfile, level)3082 outfile.write(Col5=self.gds_format_double(self.Col5))3083 if self.Col6 is not None:3084 showIndent(outfile, level)3085 outfile.write(Col6=self.gds_format_double(self.Col6))3086 if self.Col7 is not None:3087 showIndent(outfile, level)3088 outfile.write(Col7=self.gds_format_double(self.Col7))3089 if self.Col8 is not None:3090 showIndent(outfile, level)3091 outfile.write(Col8=self.gds_format_double(self.Col8))3092 if self.Col9 is not None:3093 showIndent(outfile, level)3094 outfile.write(Col9=self.gds_format_double(self.Col9))3095 if self.Col10 is not None:3096 showIndent(outfile, level)3097 outfile.write(Col10=self.gds_format_double(self.Col10))3098 if self.Col11 is not None:3099 showIndent(outfile, level)3100 outfile.write(Col11=self.gds_format_double(self.Col11))3101 if self.Col12 is not None:3102 showIndent(outfile, level)3103 outfile.write(Col12=self.gds_format_double(self.Col12))3104 if self.Col13 is not None:3105 showIndent(outfile, level)3106 outfile.write(Col13=self.gds_format_double(self.Col13))3107 if self.Col14 is not None:3108 showIndent(outfile, level)3109 outfile.write(Col14=self.gds_format_double(self.Col14))3110 if self.Col15 is not None:3111 showIndent(outfile, level)3112 outfile.write(Col15=self.gds_format_double(self.Col15))3113 if self.Col16 is not None:3114 showIndent(outfile, level)3115 outfile.write(Col16=self.gds_format_double(self.Col16))3116 if self.Col17 is not None:3117 showIndent(outfile, level)3118 outfile.write(Col17=self.gds_format_double(self.Col17))3119 if self.Col18 is not None:3120 showIndent(outfile, level)3121 outfile.write(Col18=self.gds_format_double(self.Col18))3122 if self.Col19 is not None:3123 showIndent(outfile, level)3124 outfile.write(Col19=self.gds_format_double(self.Col19))3125 if self.Col20 is not None:3126 showIndent(outfile, level)3127 outfile.write(Col20=self.gds_format_double(self.Col20))3128 if self.Col21 is not None:3129 showIndent(outfile, level)3130 outfile.write(Col21=self.gds_format_double(self.Col21))3131 if self.Col22 is not None:3132 showIndent(outfile, level)3133 outfile.write(Col22=self.gds_format_double(self.Col22))3134 if self.Col23 is not None:3135 showIndent(outfile, level)3136 outfile.write(Col23=self.gds_format_double(self.Col23))3137 if self.Col24 is not None:3138 showIndent(outfile, level)3139 outfile.write(Col24=self.gds_format_double(self.Col24))3140 if self.Col25 is not None:3141 showIndent(outfile, level)3142 outfile.write(Col25=self.gds_format_double(self.Col25))3143 if self.Col26 is not None:3144 showIndent(outfile, level)3145 outfile.write(Col26=self.gds_format_double(self.Col26))3146 if self.Col27 is not None:3147 showIndent(outfile, level)3148 outfile.write(Col27=self.gds_format_double(self.Col27))3149 if self.Col28 is not None:3150 showIndent(outfile, level)3151 outfile.write(Col28=self.gds_format_double(self.Col28))3152 if self.Col29 is not None:3153 showIndent(outfile, level)3154 outfile.write(Col29=self.gds_format_double(self.Col29))3155 if self.Col30 is not None:3156 showIndent(outfile, level)3157 outfile.write(Col30=self.gds_format_double(self.Col30))3158 if self.Col31 is not None:3159 showIndent(outfile, level)3160 outfile.write(Col31=self.gds_format_double(self.Col31))3161 if self.Col32 is not None:3162 showIndent(outfile, level)3163 outfile.write(Col32=self.gds_format_double(self.Col32))3164 if self.Col33 is not None:3165 showIndent(outfile, level)3166 outfile.write(Col33=self.gds_format_double(self.Col33))3167 if self.Col34 is not None:3168 showIndent(outfile, level)3169 outfile.write(Col34=self.gds_format_double(self.Col34))3170 if self.Col35 is not None:3171 showIndent(outfile, level)3172 outfile.write(Col35=self.gds_format_double(self.Col35))3173 if self.Col36 is not None:3174 showIndent(outfile, level)3175 outfile.write(Col36=self.gds_format_double(self.Col36))3176 if self.Col37 is not None:3177 showIndent(outfile, level)3178 outfile.write(Col37=self.gds_format_double(self.Col37))3179 if self.Col38 is not None:3180 showIndent(outfile, level)3181 outfile.write(Col38=self.gds_format_double(self.Col38))3182 if self.Col39 is not None:3183 showIndent(outfile, level)3184 outfile.write(Col39=self.gds_format_double(self.Col39))3185 if self.Col40 is not None:3186 showIndent(outfile, level)3187 outfile.write(Col40=self.gds_format_double(self.Col40))3188 if self.Col41 is not None:3189 showIndent(outfile, level)3190 outfile.write(Col41=self.gds_format_double(self.Col41))3191 if self.Col42 is not None:3192 showIndent(outfile, level)3193 outfile.write(Col42=self.gds_format_double(self.Col42))3194 if self.Col43 is not None:3195 showIndent(outfile, level)3196 outfile.write(Col43=self.gds_format_double(self.Col43))3197 if self.Col44 is not None:3198 showIndent(outfile, level)3199 outfile.write(Col44=self.gds_format_double(self.Col44))3200 if self.Col45 is not None:3201 showIndent(outfile, level)3202 outfile.write(Col45=self.gds_format_double(self.Col45))3203 if self.Col46 is not None:3204 showIndent(outfile, level)3205 outfile.write(Col46=self.gds_format_double(self.Col46))3206 if self.Col47 is not None:3207 showIndent(outfile, level)3208 outfile.write(Col47=self.gds_format_double(self.Col47))3209 if self.Col48 is not None:3210 showIndent(outfile, level)3211 outfile.write(Col48=self.gds_format_double(self.Col48))3212 if self.Col49 is not None:3213 showIndent(outfile, level)3214 outfile.write(Col49=self.gds_format_double(self.Col49))3215 if self.Col50 is not None:3216 showIndent(outfile, level)3217 outfile.write(Col50=self.gds_format_double(self.Col50))3218 if self.Col51 is not None:3219 showIndent(outfile, level)3220 outfile.write(Col51=self.gds_format_double(self.Col51))3221 if self.Col52 is not None:3222 showIndent(outfile, level)3223 outfile.write(Col52=self.gds_format_double(self.Col52))3224 if self.Col53 is not None:3225 showIndent(outfile, level)3226 outfile.write(Col53=self.gds_format_double(self.Col53))3227 if self.Col54 is not None:3228 showIndent(outfile, level)3229 outfile.write(Col54=self.gds_format_double(self.Col54))3230 if self.Col55 is not None:3231 showIndent(outfile, level)3232 outfile.write(Col55=self.gds_format_double(self.Col55))3233 if self.Col56 is not None:3234 showIndent(outfile, level)3235 outfile.write(Col56=self.gds_format_double(self.Col56))3236 if self.Col57 is not None:3237 showIndent(outfile, level)3238 outfile.write(Col57=self.gds_format_double(self.Col57))3239 if self.Col58 is not None:3240 showIndent(outfile, level)3241 outfile.write(Col58=self.gds_format_double(self.Col58))3242 if self.Col59 is not None:3243 showIndent(outfile, level)3244 outfile.write(Col59=self.gds_format_double(self.Col59))3245 if self.Col60 is not None:3246 showIndent(outfile, level)3247 outfile.write(Col60=self.gds_format_double(self.Col60))3248 if self.Col61 is not None:3249 showIndent(outfile, level)3250 outfile.write(Col61=self.gds_format_double(self.Col61))3251 if self.Col62 is not None:3252 showIndent(outfile, level)3253 outfile.write(Col62=self.gds_format_double(self.Col62))3254 if self.Col63 is not None:3255 showIndent(outfile, level)3256 outfile.write(Col63=self.gds_format_double(self.Col63))3257 if self.Col64 is not None:3258 showIndent(outfile, level)3259 outfile.write(Col64=self.gds_format_double(self.Col64))3260 def build(self, node, gds_collector_=None):3261 self.gds_collector_ = gds_collector_3262 if SaveElementTreeNode:3263 self.gds_elementtree_node_ = node3264 already_processed = set()3265 self.ns_prefix_ = node.prefix3266 self._buildAttributes(node, node.attrib, already_processed)3267 for child in node:3268 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3269 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)3270 return self3271 def _buildAttributes(self, node, attrs, already_processed):3272 value = find_attr_value_('Row', node)3273 if value is not None and 'Row' not in already_processed:3274 already_processed.add('Row')3275 self.Row = self.gds_parse_integer(value, node, 'Row')3276 value = find_attr_value_('Axis1', node)3277 if value is not None and 'Axis1' not in already_processed:3278 already_processed.add('Axis1')3279 self.Axis1 = self.gds_parse_integer(value, node, 'Axis1')3280 value = find_attr_value_('Axis2', node)3281 if value is not None and 'Axis2' not in already_processed:3282 already_processed.add('Axis2')3283 self.Axis2 = self.gds_parse_integer(value, node, 'Axis2')3284 value = find_attr_value_('Axis3', node)3285 if value is not None and 'Axis3' not in already_processed:3286 already_processed.add('Axis3')3287 self.Axis3 = self.gds_parse_integer(value, node, 'Axis3')3288 value = find_attr_value_('Axis4', node)3289 if value is not None and 'Axis4' not in already_processed:3290 already_processed.add('Axis4')3291 self.Axis4 = self.gds_parse_integer(value, node, 'Axis4')3292 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):3293 if nodeName_ == 'Col1' and child_.text:3294 sval_ = child_.text3295 fval_ = self.gds_parse_double(sval_, node, 'Col1')3296 fval_ = self.gds_validate_double(fval_, node, 'Col1')3297 self.Col1 = fval_3298 self.Col1_nsprefix_ = child_.prefix3299 elif nodeName_ == 'Col2' and child_.text:3300 sval_ = child_.text3301 fval_ = self.gds_parse_double(sval_, node, 'Col2')3302 fval_ = self.gds_validate_double(fval_, node, 'Col2')3303 self.Col2 = fval_3304 self.Col2_nsprefix_ = child_.prefix3305 elif nodeName_ == 'Col3' and child_.text:3306 sval_ = child_.text3307 fval_ = self.gds_parse_double(sval_, node, 'Col3')3308 fval_ = self.gds_validate_double(fval_, node, 'Col3')3309 self.Col3 = fval_3310 self.Col3_nsprefix_ = child_.prefix3311 elif nodeName_ == 'Col4' and child_.text:3312 sval_ = child_.text3313 fval_ = self.gds_parse_double(sval_, node, 'Col4')3314 fval_ = self.gds_validate_double(fval_, node, 'Col4')3315 self.Col4 = fval_3316 self.Col4_nsprefix_ = child_.prefix3317 elif nodeName_ == 'Col5' and child_.text:3318 sval_ = child_.text3319 fval_ = self.gds_parse_double(sval_, node, 'Col5')3320 fval_ = self.gds_validate_double(fval_, node, 'Col5')3321 self.Col5 = fval_3322 self.Col5_nsprefix_ = child_.prefix3323 elif nodeName_ == 'Col6' and child_.text:3324 sval_ = child_.text3325 fval_ = self.gds_parse_double(sval_, node, 'Col6')3326 fval_ = self.gds_validate_double(fval_, node, 'Col6')3327 self.Col6 = fval_3328 self.Col6_nsprefix_ = child_.prefix3329 elif nodeName_ == 'Col7' and child_.text:3330 sval_ = child_.text3331 fval_ = self.gds_parse_double(sval_, node, 'Col7')3332 fval_ = self.gds_validate_double(fval_, node, 'Col7')3333 self.Col7 = fval_3334 self.Col7_nsprefix_ = child_.prefix3335 elif nodeName_ == 'Col8' and child_.text:3336 sval_ = child_.text3337 fval_ = self.gds_parse_double(sval_, node, 'Col8')3338 fval_ = self.gds_validate_double(fval_, node, 'Col8')3339 self.Col8 = fval_3340 self.Col8_nsprefix_ = child_.prefix3341 elif nodeName_ == 'Col9' and child_.text:3342 sval_ = child_.text3343 fval_ = self.gds_parse_double(sval_, node, 'Col9')3344 fval_ = self.gds_validate_double(fval_, node, 'Col9')3345 self.Col9 = fval_3346 self.Col9_nsprefix_ = child_.prefix3347 elif nodeName_ == 'Col10' and child_.text:3348 sval_ = child_.text3349 fval_ = self.gds_parse_double(sval_, node, 'Col10')3350 fval_ = self.gds_validate_double(fval_, node, 'Col10')3351 self.Col10 = fval_3352 self.Col10_nsprefix_ = child_.prefix3353 elif nodeName_ == 'Col11' and child_.text:3354 sval_ = child_.text3355 fval_ = self.gds_parse_double(sval_, node, 'Col11')3356 fval_ = self.gds_validate_double(fval_, node, 'Col11')3357 self.Col11 = fval_3358 self.Col11_nsprefix_ = child_.prefix3359 elif nodeName_ == 'Col12' and child_.text:3360 sval_ = child_.text3361 fval_ = self.gds_parse_double(sval_, node, 'Col12')3362 fval_ = self.gds_validate_double(fval_, node, 'Col12')3363 self.Col12 = fval_3364 self.Col12_nsprefix_ = child_.prefix3365 elif nodeName_ == 'Col13' and child_.text:3366 sval_ = child_.text3367 fval_ = self.gds_parse_double(sval_, node, 'Col13')3368 fval_ = self.gds_validate_double(fval_, node, 'Col13')3369 self.Col13 = fval_3370 self.Col13_nsprefix_ = child_.prefix3371 elif nodeName_ == 'Col14' and child_.text:3372 sval_ = child_.text3373 fval_ = self.gds_parse_double(sval_, node, 'Col14')3374 fval_ = self.gds_validate_double(fval_, node, 'Col14')3375 self.Col14 = fval_3376 self.Col14_nsprefix_ = child_.prefix3377 elif nodeName_ == 'Col15' and child_.text:3378 sval_ = child_.text3379 fval_ = self.gds_parse_double(sval_, node, 'Col15')3380 fval_ = self.gds_validate_double(fval_, node, 'Col15')3381 self.Col15 = fval_3382 self.Col15_nsprefix_ = child_.prefix3383 elif nodeName_ == 'Col16' and child_.text:3384 sval_ = child_.text3385 fval_ = self.gds_parse_double(sval_, node, 'Col16')3386 fval_ = self.gds_validate_double(fval_, node, 'Col16')3387 self.Col16 = fval_3388 self.Col16_nsprefix_ = child_.prefix3389 elif nodeName_ == 'Col17' and child_.text:3390 sval_ = child_.text3391 fval_ = self.gds_parse_double(sval_, node, 'Col17')3392 fval_ = self.gds_validate_double(fval_, node, 'Col17')3393 self.Col17 = fval_3394 self.Col17_nsprefix_ = child_.prefix3395 elif nodeName_ == 'Col18' and child_.text:3396 sval_ = child_.text3397 fval_ = self.gds_parse_double(sval_, node, 'Col18')3398 fval_ = self.gds_validate_double(fval_, node, 'Col18')3399 self.Col18 = fval_3400 self.Col18_nsprefix_ = child_.prefix3401 elif nodeName_ == 'Col19' and child_.text:3402 sval_ = child_.text3403 fval_ = self.gds_parse_double(sval_, node, 'Col19')3404 fval_ = self.gds_validate_double(fval_, node, 'Col19')3405 self.Col19 = fval_3406 self.Col19_nsprefix_ = child_.prefix3407 elif nodeName_ == 'Col20' and child_.text:3408 sval_ = child_.text3409 fval_ = self.gds_parse_double(sval_, node, 'Col20')3410 fval_ = self.gds_validate_double(fval_, node, 'Col20')3411 self.Col20 = fval_3412 self.Col20_nsprefix_ = child_.prefix3413 elif nodeName_ == 'Col21' and child_.text:3414 sval_ = child_.text3415 fval_ = self.gds_parse_double(sval_, node, 'Col21')3416 fval_ = self.gds_validate_double(fval_, node, 'Col21')3417 self.Col21 = fval_3418 self.Col21_nsprefix_ = child_.prefix3419 elif nodeName_ == 'Col22' and child_.text:3420 sval_ = child_.text3421 fval_ = self.gds_parse_double(sval_, node, 'Col22')3422 fval_ = self.gds_validate_double(fval_, node, 'Col22')3423 self.Col22 = fval_3424 self.Col22_nsprefix_ = child_.prefix3425 elif nodeName_ == 'Col23' and child_.text:3426 sval_ = child_.text3427 fval_ = self.gds_parse_double(sval_, node, 'Col23')3428 fval_ = self.gds_validate_double(fval_, node, 'Col23')3429 self.Col23 = fval_3430 self.Col23_nsprefix_ = child_.prefix3431 elif nodeName_ == 'Col24' and child_.text:3432 sval_ = child_.text3433 fval_ = self.gds_parse_double(sval_, node, 'Col24')3434 fval_ = self.gds_validate_double(fval_, node, 'Col24')3435 self.Col24 = fval_3436 self.Col24_nsprefix_ = child_.prefix3437 elif nodeName_ == 'Col25' and child_.text:3438 sval_ = child_.text3439 fval_ = self.gds_parse_double(sval_, node, 'Col25')3440 fval_ = self.gds_validate_double(fval_, node, 'Col25')3441 self.Col25 = fval_3442 self.Col25_nsprefix_ = child_.prefix3443 elif nodeName_ == 'Col26' and child_.text:3444 sval_ = child_.text3445 fval_ = self.gds_parse_double(sval_, node, 'Col26')3446 fval_ = self.gds_validate_double(fval_, node, 'Col26')3447 self.Col26 = fval_3448 self.Col26_nsprefix_ = child_.prefix3449 elif nodeName_ == 'Col27' and child_.text:3450 sval_ = child_.text3451 fval_ = self.gds_parse_double(sval_, node, 'Col27')3452 fval_ = self.gds_validate_double(fval_, node, 'Col27')3453 self.Col27 = fval_3454 self.Col27_nsprefix_ = child_.prefix3455 elif nodeName_ == 'Col28' and child_.text:3456 sval_ = child_.text3457 fval_ = self.gds_parse_double(sval_, node, 'Col28')3458 fval_ = self.gds_validate_double(fval_, node, 'Col28')3459 self.Col28 = fval_3460 self.Col28_nsprefix_ = child_.prefix3461 elif nodeName_ == 'Col29' and child_.text:3462 sval_ = child_.text3463 fval_ = self.gds_parse_double(sval_, node, 'Col29')3464 fval_ = self.gds_validate_double(fval_, node, 'Col29')3465 self.Col29 = fval_3466 self.Col29_nsprefix_ = child_.prefix3467 elif nodeName_ == 'Col30' and child_.text:3468 sval_ = child_.text3469 fval_ = self.gds_parse_double(sval_, node, 'Col30')3470 fval_ = self.gds_validate_double(fval_, node, 'Col30')3471 self.Col30 = fval_3472 self.Col30_nsprefix_ = child_.prefix3473 elif nodeName_ == 'Col31' and child_.text:3474 sval_ = child_.text3475 fval_ = self.gds_parse_double(sval_, node, 'Col31')3476 fval_ = self.gds_validate_double(fval_, node, 'Col31')3477 self.Col31 = fval_3478 self.Col31_nsprefix_ = child_.prefix3479 elif nodeName_ == 'Col32' and child_.text:3480 sval_ = child_.text3481 fval_ = self.gds_parse_double(sval_, node, 'Col32')3482 fval_ = self.gds_validate_double(fval_, node, 'Col32')3483 self.Col32 = fval_3484 self.Col32_nsprefix_ = child_.prefix3485 elif nodeName_ == 'Col33' and child_.text:3486 sval_ = child_.text3487 fval_ = self.gds_parse_double(sval_, node, 'Col33')3488 fval_ = self.gds_validate_double(fval_, node, 'Col33')3489 self.Col33 = fval_3490 self.Col33_nsprefix_ = child_.prefix3491 elif nodeName_ == 'Col34' and child_.text:3492 sval_ = child_.text3493 fval_ = self.gds_parse_double(sval_, node, 'Col34')3494 fval_ = self.gds_validate_double(fval_, node, 'Col34')3495 self.Col34 = fval_3496 self.Col34_nsprefix_ = child_.prefix3497 elif nodeName_ == 'Col35' and child_.text:3498 sval_ = child_.text3499 fval_ = self.gds_parse_double(sval_, node, 'Col35')3500 fval_ = self.gds_validate_double(fval_, node, 'Col35')3501 self.Col35 = fval_3502 self.Col35_nsprefix_ = child_.prefix3503 elif nodeName_ == 'Col36' and child_.text:3504 sval_ = child_.text3505 fval_ = self.gds_parse_double(sval_, node, 'Col36')3506 fval_ = self.gds_validate_double(fval_, node, 'Col36')3507 self.Col36 = fval_3508 self.Col36_nsprefix_ = child_.prefix3509 elif nodeName_ == 'Col37' and child_.text:3510 sval_ = child_.text3511 fval_ = self.gds_parse_double(sval_, node, 'Col37')3512 fval_ = self.gds_validate_double(fval_, node, 'Col37')3513 self.Col37 = fval_3514 self.Col37_nsprefix_ = child_.prefix3515 elif nodeName_ == 'Col38' and child_.text:3516 sval_ = child_.text3517 fval_ = self.gds_parse_double(sval_, node, 'Col38')3518 fval_ = self.gds_validate_double(fval_, node, 'Col38')3519 self.Col38 = fval_3520 self.Col38_nsprefix_ = child_.prefix3521 elif nodeName_ == 'Col39' and child_.text:3522 sval_ = child_.text3523 fval_ = self.gds_parse_double(sval_, node, 'Col39')3524 fval_ = self.gds_validate_double(fval_, node, 'Col39')3525 self.Col39 = fval_3526 self.Col39_nsprefix_ = child_.prefix3527 elif nodeName_ == 'Col40' and child_.text:3528 sval_ = child_.text3529 fval_ = self.gds_parse_double(sval_, node, 'Col40')3530 fval_ = self.gds_validate_double(fval_, node, 'Col40')3531 self.Col40 = fval_3532 self.Col40_nsprefix_ = child_.prefix3533 elif nodeName_ == 'Col41' and child_.text:3534 sval_ = child_.text3535 fval_ = self.gds_parse_double(sval_, node, 'Col41')3536 fval_ = self.gds_validate_double(fval_, node, 'Col41')3537 self.Col41 = fval_3538 self.Col41_nsprefix_ = child_.prefix3539 elif nodeName_ == 'Col42' and child_.text:3540 sval_ = child_.text3541 fval_ = self.gds_parse_double(sval_, node, 'Col42')3542 fval_ = self.gds_validate_double(fval_, node, 'Col42')3543 self.Col42 = fval_3544 self.Col42_nsprefix_ = child_.prefix3545 elif nodeName_ == 'Col43' and child_.text:3546 sval_ = child_.text3547 fval_ = self.gds_parse_double(sval_, node, 'Col43')3548 fval_ = self.gds_validate_double(fval_, node, 'Col43')3549 self.Col43 = fval_3550 self.Col43_nsprefix_ = child_.prefix3551 elif nodeName_ == 'Col44' and child_.text:3552 sval_ = child_.text3553 fval_ = self.gds_parse_double(sval_, node, 'Col44')3554 fval_ = self.gds_validate_double(fval_, node, 'Col44')3555 self.Col44 = fval_3556 self.Col44_nsprefix_ = child_.prefix3557 elif nodeName_ == 'Col45' and child_.text:3558 sval_ = child_.text3559 fval_ = self.gds_parse_double(sval_, node, 'Col45')3560 fval_ = self.gds_validate_double(fval_, node, 'Col45')3561 self.Col45 = fval_3562 self.Col45_nsprefix_ = child_.prefix3563 elif nodeName_ == 'Col46' and child_.text:3564 sval_ = child_.text3565 fval_ = self.gds_parse_double(sval_, node, 'Col46')3566 fval_ = self.gds_validate_double(fval_, node, 'Col46')3567 self.Col46 = fval_3568 self.Col46_nsprefix_ = child_.prefix3569 elif nodeName_ == 'Col47' and child_.text:3570 sval_ = child_.text3571 fval_ = self.gds_parse_double(sval_, node, 'Col47')3572 fval_ = self.gds_validate_double(fval_, node, 'Col47')3573 self.Col47 = fval_3574 self.Col47_nsprefix_ = child_.prefix3575 elif nodeName_ == 'Col48' and child_.text:3576 sval_ = child_.text3577 fval_ = self.gds_parse_double(sval_, node, 'Col48')3578 fval_ = self.gds_validate_double(fval_, node, 'Col48')3579 self.Col48 = fval_3580 self.Col48_nsprefix_ = child_.prefix3581 elif nodeName_ == 'Col49' and child_.text:3582 sval_ = child_.text3583 fval_ = self.gds_parse_double(sval_, node, 'Col49')3584 fval_ = self.gds_validate_double(fval_, node, 'Col49')3585 self.Col49 = fval_3586 self.Col49_nsprefix_ = child_.prefix3587 elif nodeName_ == 'Col50' and child_.text:3588 sval_ = child_.text3589 fval_ = self.gds_parse_double(sval_, node, 'Col50')3590 fval_ = self.gds_validate_double(fval_, node, 'Col50')3591 self.Col50 = fval_3592 self.Col50_nsprefix_ = child_.prefix3593 elif nodeName_ == 'Col51' and child_.text:3594 sval_ = child_.text3595 fval_ = self.gds_parse_double(sval_, node, 'Col51')3596 fval_ = self.gds_validate_double(fval_, node, 'Col51')3597 self.Col51 = fval_3598 self.Col51_nsprefix_ = child_.prefix3599 elif nodeName_ == 'Col52' and child_.text:3600 sval_ = child_.text3601 fval_ = self.gds_parse_double(sval_, node, 'Col52')3602 fval_ = self.gds_validate_double(fval_, node, 'Col52')3603 self.Col52 = fval_3604 self.Col52_nsprefix_ = child_.prefix3605 elif nodeName_ == 'Col53' and child_.text:3606 sval_ = child_.text3607 fval_ = self.gds_parse_double(sval_, node, 'Col53')3608 fval_ = self.gds_validate_double(fval_, node, 'Col53')3609 self.Col53 = fval_3610 self.Col53_nsprefix_ = child_.prefix3611 elif nodeName_ == 'Col54' and child_.text:3612 sval_ = child_.text3613 fval_ = self.gds_parse_double(sval_, node, 'Col54')3614 fval_ = self.gds_validate_double(fval_, node, 'Col54')3615 self.Col54 = fval_3616 self.Col54_nsprefix_ = child_.prefix3617 elif nodeName_ == 'Col55' and child_.text:3618 sval_ = child_.text3619 fval_ = self.gds_parse_double(sval_, node, 'Col55')3620 fval_ = self.gds_validate_double(fval_, node, 'Col55')3621 self.Col55 = fval_3622 self.Col55_nsprefix_ = child_.prefix3623 elif nodeName_ == 'Col56' and child_.text:3624 sval_ = child_.text3625 fval_ = self.gds_parse_double(sval_, node, 'Col56')3626 fval_ = self.gds_validate_double(fval_, node, 'Col56')3627 self.Col56 = fval_3628 self.Col56_nsprefix_ = child_.prefix3629 elif nodeName_ == 'Col57' and child_.text:3630 sval_ = child_.text3631 fval_ = self.gds_parse_double(sval_, node, 'Col57')3632 fval_ = self.gds_validate_double(fval_, node, 'Col57')3633 self.Col57 = fval_3634 self.Col57_nsprefix_ = child_.prefix3635 elif nodeName_ == 'Col58' and child_.text:3636 sval_ = child_.text3637 fval_ = self.gds_parse_double(sval_, node, 'Col58')3638 fval_ = self.gds_validate_double(fval_, node, 'Col58')3639 self.Col58 = fval_3640 self.Col58_nsprefix_ = child_.prefix3641 elif nodeName_ == 'Col59' and child_.text:3642 sval_ = child_.text3643 fval_ = self.gds_parse_double(sval_, node, 'Col59')3644 fval_ = self.gds_validate_double(fval_, node, 'Col59')3645 self.Col59 = fval_3646 self.Col59_nsprefix_ = child_.prefix3647 elif nodeName_ == 'Col60' and child_.text:3648 sval_ = child_.text3649 fval_ = self.gds_parse_double(sval_, node, 'Col60')3650 fval_ = self.gds_validate_double(fval_, node, 'Col60')3651 self.Col60 = fval_3652 self.Col60_nsprefix_ = child_.prefix3653 elif nodeName_ == 'Col61' and child_.text:3654 sval_ = child_.text3655 fval_ = self.gds_parse_double(sval_, node, 'Col61')3656 fval_ = self.gds_validate_double(fval_, node, 'Col61')3657 self.Col61 = fval_3658 self.Col61_nsprefix_ = child_.prefix3659 elif nodeName_ == 'Col62' and child_.text:3660 sval_ = child_.text3661 fval_ = self.gds_parse_double(sval_, node, 'Col62')3662 fval_ = self.gds_validate_double(fval_, node, 'Col62')3663 self.Col62 = fval_3664 self.Col62_nsprefix_ = child_.prefix3665 elif nodeName_ == 'Col63' and child_.text:3666 sval_ = child_.text3667 fval_ = self.gds_parse_double(sval_, node, 'Col63')3668 fval_ = self.gds_validate_double(fval_, node, 'Col63')3669 self.Col63 = fval_3670 self.Col63_nsprefix_ = child_.prefix3671 elif nodeName_ == 'Col64' and child_.text:3672 sval_ = child_.text3673 fval_ = self.gds_parse_double(sval_, node, 'Col64')3674 fval_ = self.gds_validate_double(fval_, node, 'Col64')3675 self.Col64 = fval_3676 self.Col64_nsprefix_ = child_.prefix3677# end class MDataType3678class BetasType(GeneratedsSuper):3679 __hash__ = GeneratedsSuper.__hash__3680 subclass = None3681 superclass = None3682 def __init__(self, Number=None, Beta=None, gds_collector_=None, **kwargs_):3683 self.gds_collector_ = gds_collector_3684 self.gds_elementtree_node_ = None3685 self.original_tagname_ = None3686 self.parent_object_ = kwargs_.get('parent_object_')3687 self.ns_prefix_ = None3688 self.Number = Number3689 self.Number_nsprefix_ = None3690 if Beta is None:3691 self.Beta = []3692 else:3693 self.Beta = Beta3694 self.Beta_nsprefix_ = None3695 def factory(*args_, **kwargs_):3696 if CurrentSubclassModule_ is not None:3697 subclass = getSubclassFromModule_(3698 CurrentSubclassModule_, BetasType)3699 if subclass is not None:3700 return subclass(*args_, **kwargs_)3701 if BetasType.subclass:3702 return BetasType.subclass(*args_, **kwargs_)3703 else:3704 return BetasType(*args_, **kwargs_)3705 factory = staticmethod(factory)3706 def get_ns_prefix_(self):3707 return self.ns_prefix_3708 def set_ns_prefix_(self, ns_prefix):3709 self.ns_prefix_ = ns_prefix3710 def get_Number(self):3711 return self.Number3712 def set_Number(self, Number):3713 self.Number = Number3714 def get_Beta(self):3715 return self.Beta3716 def set_Beta(self, Beta):3717 self.Beta = Beta3718 def add_Beta(self, value):3719 self.Beta.append(value)3720 def insert_Beta_at(self, index, value):3721 self.Beta.insert(index, value)3722 def replace_Beta_at(self, index, value):3723 self.Beta[index] = value3724 def _hasContent(self):3725 if (3726 self.Number is not None or3727 self.Beta3728 ):3729 return True3730 else:3731 return False3732 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetasType', pretty_print=True):3733 imported_ns_def_ = GenerateDSNamespaceDefs_.get('BetasType')3734 if imported_ns_def_ is not None:3735 namespacedef_ = imported_ns_def_3736 if pretty_print:3737 eol_ = '\n'3738 else:3739 eol_ = ''3740 if self.original_tagname_ is not None and name_ == 'BetasType':3741 name_ = self.original_tagname_3742 if UseCapturedNS_ and self.ns_prefix_:3743 namespaceprefix_ = self.ns_prefix_ + ':'3744 showIndent(outfile, level, pretty_print)3745 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3746 already_processed = set()3747 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BetasType')3748 if self._hasContent():3749 outfile.write('>%s' % (eol_, ))3750 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BetasType', pretty_print=pretty_print)3751 showIndent(outfile, level, pretty_print)3752 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))3753 else:3754 outfile.write('/>%s' % (eol_, ))3755 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BetasType'):3756 pass3757 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetasType', fromsubclass_=False, pretty_print=True):3758 if pretty_print:3759 eol_ = '\n'3760 else:3761 eol_ = ''3762 if self.Number is not None:3763 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''3764 showIndent(outfile, level, pretty_print)3765 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))3766 for Beta_ in self.Beta:3767 namespaceprefix_ = self.Beta_nsprefix_ + ':' if (UseCapturedNS_ and self.Beta_nsprefix_) else ''3768 Beta_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Beta', pretty_print=pretty_print)3769 def exportLiteral(self, outfile, level, name_='BetasType'):3770 level += 13771 already_processed = set()3772 self._exportLiteralAttributes(outfile, level, already_processed, name_)3773 if self._hasContent():3774 self._exportLiteralChildren(outfile, level, name_)3775 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):3776 pass3777 def _exportLiteralChildren(self, outfile, level, name_):3778 if self.Number is not None:3779 showIndent(outfile, level)3780 outfile.write('Number=%d,\n' % self.Number)3781 showIndent(outfile, level)3782 outfile.write('Beta=[\n')3783 level += 13784 for Beta_ in self.Beta:3785 showIndent(outfile, level)3786 outfile.write('model_.BetaType(\n')3787 Beta_.exportLiteral(outfile, level, name_='BetaType')3788 showIndent(outfile, level)3789 outfile.write('),\n')3790 level -= 13791 showIndent(outfile, level)3792 outfile.write('],\n')3793 def build(self, node, gds_collector_=None):3794 self.gds_collector_ = gds_collector_3795 if SaveElementTreeNode:3796 self.gds_elementtree_node_ = node3797 already_processed = set()3798 self.ns_prefix_ = node.prefix3799 self._buildAttributes(node, node.attrib, already_processed)3800 for child in node:3801 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3802 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)3803 return self3804 def _buildAttributes(self, node, attrs, already_processed):3805 pass3806 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):3807 if nodeName_ == 'Number' and child_.text:3808 sval_ = child_.text3809 ival_ = self.gds_parse_integer(sval_, node, 'Number')3810 ival_ = self.gds_validate_integer(ival_, node, 'Number')3811 self.Number = ival_3812 self.Number_nsprefix_ = child_.prefix3813 elif nodeName_ == 'Beta':3814 obj_ = BetaType.factory(parent_object_=self)3815 obj_.build(child_, gds_collector_=gds_collector_)3816 self.Beta.append(obj_)3817 obj_.original_tagname_ = 'Beta'3818# end class BetasType3819class BetaType(GeneratedsSuper):3820 __hash__ = GeneratedsSuper.__hash__3821 subclass = None3822 superclass = None3823 def __init__(self, Position=None, Label=None, I=None, J=None, Value=None, FlowRef=None, OpZeroOrOne=None, gds_collector_=None, **kwargs_):3824 self.gds_collector_ = gds_collector_3825 self.gds_elementtree_node_ = None3826 self.original_tagname_ = None3827 self.parent_object_ = kwargs_.get('parent_object_')3828 self.ns_prefix_ = None3829 self.Position = _cast(int, Position)3830 self.Position_nsprefix_ = None3831 self.Label = Label3832 self.Label_nsprefix_ = None3833 self.I = I3834 self.I_nsprefix_ = None3835 self.J = J3836 self.J_nsprefix_ = None3837 self.Value = Value3838 self.Value_nsprefix_ = None3839 self.FlowRef = FlowRef3840 self.FlowRef_nsprefix_ = None3841 self.OpZeroOrOne = OpZeroOrOne3842 self.OpZeroOrOne_nsprefix_ = None3843 def factory(*args_, **kwargs_):3844 if CurrentSubclassModule_ is not None:3845 subclass = getSubclassFromModule_(3846 CurrentSubclassModule_, BetaType)3847 if subclass is not None:3848 return subclass(*args_, **kwargs_)3849 if BetaType.subclass:3850 return BetaType.subclass(*args_, **kwargs_)3851 else:3852 return BetaType(*args_, **kwargs_)3853 factory = staticmethod(factory)3854 def get_ns_prefix_(self):3855 return self.ns_prefix_3856 def set_ns_prefix_(self, ns_prefix):3857 self.ns_prefix_ = ns_prefix3858 def get_Label(self):3859 return self.Label3860 def set_Label(self, Label):3861 self.Label = Label3862 def get_I(self):3863 return self.I3864 def set_I(self, I):3865 self.I = I3866 def get_J(self):3867 return self.J3868 def set_J(self, J):3869 self.J = J3870 def get_Value(self):3871 return self.Value3872 def set_Value(self, Value):3873 self.Value = Value3874 def get_FlowRef(self):3875 return self.FlowRef3876 def set_FlowRef(self, FlowRef):3877 self.FlowRef = FlowRef3878 def get_OpZeroOrOne(self):3879 return self.OpZeroOrOne3880 def set_OpZeroOrOne(self, OpZeroOrOne):3881 self.OpZeroOrOne = OpZeroOrOne3882 def get_Position(self):3883 return self.Position3884 def set_Position(self, Position):3885 self.Position = Position3886 def _hasContent(self):3887 if (3888 self.Label is not None or3889 self.I is not None or3890 self.J is not None or3891 self.Value is not None or3892 self.FlowRef is not None or3893 self.OpZeroOrOne is not None3894 ):3895 return True3896 else:3897 return False3898 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetaType', pretty_print=True):3899 imported_ns_def_ = GenerateDSNamespaceDefs_.get('BetaType')3900 if imported_ns_def_ is not None:3901 namespacedef_ = imported_ns_def_3902 if pretty_print:3903 eol_ = '\n'3904 else:3905 eol_ = ''3906 if self.original_tagname_ is not None and name_ == 'BetaType':3907 name_ = self.original_tagname_3908 if UseCapturedNS_ and self.ns_prefix_:3909 namespaceprefix_ = self.ns_prefix_ + ':'3910 showIndent(outfile, level, pretty_print)3911 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3912 already_processed = set()3913 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BetaType')3914 if self._hasContent():3915 outfile.write('>%s' % (eol_, ))3916 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='BetaType', pretty_print=pretty_print)3917 showIndent(outfile, level, pretty_print)3918 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))3919 else:3920 outfile.write('/>%s' % (eol_, ))3921 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BetaType'):3922 if self.Position is not None and 'Position' not in already_processed:3923 already_processed.add('Position')3924 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))3925 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='BetaType', fromsubclass_=False, pretty_print=True):3926 if pretty_print:3927 eol_ = '\n'3928 else:3929 eol_ = ''3930 if self.Label is not None:3931 namespaceprefix_ = self.Label_nsprefix_ + ':' if (UseCapturedNS_ and self.Label_nsprefix_) else ''3932 showIndent(outfile, level, pretty_print)3933 outfile.write('<%sLabel>%s</%sLabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Label), input_name='Label')), namespaceprefix_ , eol_))3934 if self.I is not None:3935 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''3936 showIndent(outfile, level, pretty_print)3937 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))3938 if self.J is not None:3939 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''3940 showIndent(outfile, level, pretty_print)3941 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))3942 if self.Value is not None:3943 namespaceprefix_ = self.Value_nsprefix_ + ':' if (UseCapturedNS_ and self.Value_nsprefix_) else ''3944 showIndent(outfile, level, pretty_print)3945 outfile.write('<%sValue>%s</%sValue>%s' % (namespaceprefix_ , self.gds_format_double(self.Value, input_name='Value'), namespaceprefix_ , eol_))3946 if self.FlowRef is not None:3947 namespaceprefix_ = self.FlowRef_nsprefix_ + ':' if (UseCapturedNS_ and self.FlowRef_nsprefix_) else ''3948 showIndent(outfile, level, pretty_print)3949 outfile.write('<%sFlowRef>%s</%sFlowRef>%s' % (namespaceprefix_ , self.gds_format_integer(self.FlowRef, input_name='FlowRef'), namespaceprefix_ , eol_))3950 if self.OpZeroOrOne is not None:3951 namespaceprefix_ = self.OpZeroOrOne_nsprefix_ + ':' if (UseCapturedNS_ and self.OpZeroOrOne_nsprefix_) else ''3952 showIndent(outfile, level, pretty_print)3953 outfile.write('<%sOpZeroOrOne>%s</%sOpZeroOrOne>%s' % (namespaceprefix_ , self.gds_format_integer(self.OpZeroOrOne, input_name='OpZeroOrOne'), namespaceprefix_ , eol_))3954 def exportLiteral(self, outfile, level, name_='BetaType'):3955 level += 13956 already_processed = set()3957 self._exportLiteralAttributes(outfile, level, already_processed, name_)3958 if self._hasContent():3959 self._exportLiteralChildren(outfile, level, name_)3960 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):3961 if self.Position is not None and 'Position' not in already_processed:3962 already_processed.add('Position')3963 showIndent(outfile, level)3964 outfile.write('Position=%d,\n' % (self.Position,))3965 def _exportLiteralChildren(self, outfile, level, name_):3966 if self.Label is not None:3967 showIndent(outfile, level)3968 outfile.write('Label=%s,\n' % self.gds_encode(quote_python(self.Label)))3969 if self.I is not None:3970 showIndent(outfile, level)3971 outfile.write('I=%d,\n' % self.I)3972 if self.J is not None:3973 showIndent(outfile, level)3974 outfile.write('J=%d,\n' % self.J)3975 if self.Value is not None:3976 showIndent(outfile, level)3977 outfile.write(Value=self.gds_format_double(self.Value))3978 if self.FlowRef is not None:3979 showIndent(outfile, level)3980 outfile.write('FlowRef=%d,\n' % self.FlowRef)3981 if self.OpZeroOrOne is not None:3982 showIndent(outfile, level)3983 outfile.write('OpZeroOrOne=%d,\n' % self.OpZeroOrOne)3984 def build(self, node, gds_collector_=None):3985 self.gds_collector_ = gds_collector_3986 if SaveElementTreeNode:3987 self.gds_elementtree_node_ = node3988 already_processed = set()3989 self.ns_prefix_ = node.prefix3990 self._buildAttributes(node, node.attrib, already_processed)3991 for child in node:3992 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3993 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)3994 return self3995 def _buildAttributes(self, node, attrs, already_processed):3996 value = find_attr_value_('Position', node)3997 if value is not None and 'Position' not in already_processed:3998 already_processed.add('Position')3999 self.Position = self.gds_parse_integer(value, node, 'Position')4000 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4001 if nodeName_ == 'Label':4002 value_ = child_.text4003 value_ = self.gds_parse_string(value_, node, 'Label')4004 value_ = self.gds_validate_string(value_, node, 'Label')4005 self.Label = value_4006 self.Label_nsprefix_ = child_.prefix4007 elif nodeName_ == 'I' and child_.text:4008 sval_ = child_.text4009 ival_ = self.gds_parse_integer(sval_, node, 'I')4010 ival_ = self.gds_validate_integer(ival_, node, 'I')4011 self.I = ival_4012 self.I_nsprefix_ = child_.prefix4013 elif nodeName_ == 'J' and child_.text:4014 sval_ = child_.text4015 ival_ = self.gds_parse_integer(sval_, node, 'J')4016 ival_ = self.gds_validate_integer(ival_, node, 'J')4017 self.J = ival_4018 self.J_nsprefix_ = child_.prefix4019 elif nodeName_ == 'Value' and child_.text:4020 sval_ = child_.text4021 fval_ = self.gds_parse_double(sval_, node, 'Value')4022 fval_ = self.gds_validate_double(fval_, node, 'Value')4023 self.Value = fval_4024 self.Value_nsprefix_ = child_.prefix4025 elif nodeName_ == 'FlowRef' and child_.text:4026 sval_ = child_.text4027 ival_ = self.gds_parse_integer(sval_, node, 'FlowRef')4028 ival_ = self.gds_validate_integer(ival_, node, 'FlowRef')4029 self.FlowRef = ival_4030 self.FlowRef_nsprefix_ = child_.prefix4031 elif nodeName_ == 'OpZeroOrOne' and child_.text:4032 sval_ = child_.text4033 ival_ = self.gds_parse_integer(sval_, node, 'OpZeroOrOne')4034 ival_ = self.gds_validate_integer(ival_, node, 'OpZeroOrOne')4035 self.OpZeroOrOne = ival_4036 self.OpZeroOrOne_nsprefix_ = child_.prefix4037# end class BetaType4038class FunctionalInputsType(GeneratedsSuper):4039 __hash__ = GeneratedsSuper.__hash__4040 subclass = None4041 superclass = None4042 def __init__(self, Number=None, FunctionInput=None, gds_collector_=None, **kwargs_):4043 self.gds_collector_ = gds_collector_4044 self.gds_elementtree_node_ = None4045 self.original_tagname_ = None4046 self.parent_object_ = kwargs_.get('parent_object_')4047 self.ns_prefix_ = None4048 self.Number = Number4049 self.Number_nsprefix_ = None4050 if FunctionInput is None:4051 self.FunctionInput = []4052 else:4053 self.FunctionInput = FunctionInput4054 self.FunctionInput_nsprefix_ = None4055 def factory(*args_, **kwargs_):4056 if CurrentSubclassModule_ is not None:4057 subclass = getSubclassFromModule_(4058 CurrentSubclassModule_, FunctionalInputsType)4059 if subclass is not None:4060 return subclass(*args_, **kwargs_)4061 if FunctionalInputsType.subclass:4062 return FunctionalInputsType.subclass(*args_, **kwargs_)4063 else:4064 return FunctionalInputsType(*args_, **kwargs_)4065 factory = staticmethod(factory)4066 def get_ns_prefix_(self):4067 return self.ns_prefix_4068 def set_ns_prefix_(self, ns_prefix):4069 self.ns_prefix_ = ns_prefix4070 def get_Number(self):4071 return self.Number4072 def set_Number(self, Number):4073 self.Number = Number4074 def get_FunctionInput(self):4075 return self.FunctionInput4076 def set_FunctionInput(self, FunctionInput):4077 self.FunctionInput = FunctionInput4078 def add_FunctionInput(self, value):4079 self.FunctionInput.append(value)4080 def insert_FunctionInput_at(self, index, value):4081 self.FunctionInput.insert(index, value)4082 def replace_FunctionInput_at(self, index, value):4083 self.FunctionInput[index] = value4084 def _hasContent(self):4085 if (4086 self.Number is not None or4087 self.FunctionInput4088 ):4089 return True4090 else:4091 return False4092 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionalInputsType', pretty_print=True):4093 imported_ns_def_ = GenerateDSNamespaceDefs_.get('FunctionalInputsType')4094 if imported_ns_def_ is not None:4095 namespacedef_ = imported_ns_def_4096 if pretty_print:4097 eol_ = '\n'4098 else:4099 eol_ = ''4100 if self.original_tagname_ is not None and name_ == 'FunctionalInputsType':4101 name_ = self.original_tagname_4102 if UseCapturedNS_ and self.ns_prefix_:4103 namespaceprefix_ = self.ns_prefix_ + ':'4104 showIndent(outfile, level, pretty_print)4105 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4106 already_processed = set()4107 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FunctionalInputsType')4108 if self._hasContent():4109 outfile.write('>%s' % (eol_, ))4110 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='FunctionalInputsType', pretty_print=pretty_print)4111 showIndent(outfile, level, pretty_print)4112 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4113 else:4114 outfile.write('/>%s' % (eol_, ))4115 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='FunctionalInputsType'):4116 pass4117 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionalInputsType', fromsubclass_=False, pretty_print=True):4118 if pretty_print:4119 eol_ = '\n'4120 else:4121 eol_ = ''4122 if self.Number is not None:4123 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''4124 showIndent(outfile, level, pretty_print)4125 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))4126 for FunctionInput_ in self.FunctionInput:4127 namespaceprefix_ = self.FunctionInput_nsprefix_ + ':' if (UseCapturedNS_ and self.FunctionInput_nsprefix_) else ''4128 FunctionInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='FunctionInput', pretty_print=pretty_print)4129 def exportLiteral(self, outfile, level, name_='FunctionalInputsType'):4130 level += 14131 already_processed = set()4132 self._exportLiteralAttributes(outfile, level, already_processed, name_)4133 if self._hasContent():4134 self._exportLiteralChildren(outfile, level, name_)4135 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):4136 pass4137 def _exportLiteralChildren(self, outfile, level, name_):4138 if self.Number is not None:4139 showIndent(outfile, level)4140 outfile.write('Number=%d,\n' % self.Number)4141 showIndent(outfile, level)4142 outfile.write('FunctionInput=[\n')4143 level += 14144 for FunctionInput_ in self.FunctionInput:4145 showIndent(outfile, level)4146 outfile.write('model_.FunctionInputType(\n')4147 FunctionInput_.exportLiteral(outfile, level, name_='FunctionInputType')4148 showIndent(outfile, level)4149 outfile.write('),\n')4150 level -= 14151 showIndent(outfile, level)4152 outfile.write('],\n')4153 def build(self, node, gds_collector_=None):4154 self.gds_collector_ = gds_collector_4155 if SaveElementTreeNode:4156 self.gds_elementtree_node_ = node4157 already_processed = set()4158 self.ns_prefix_ = node.prefix4159 self._buildAttributes(node, node.attrib, already_processed)4160 for child in node:4161 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4162 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)4163 return self4164 def _buildAttributes(self, node, attrs, already_processed):4165 pass4166 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4167 if nodeName_ == 'Number' and child_.text:4168 sval_ = child_.text4169 ival_ = self.gds_parse_integer(sval_, node, 'Number')4170 ival_ = self.gds_validate_integer(ival_, node, 'Number')4171 self.Number = ival_4172 self.Number_nsprefix_ = child_.prefix4173 elif nodeName_ == 'FunctionInput':4174 obj_ = FunctionInputType.factory(parent_object_=self)4175 obj_.build(child_, gds_collector_=gds_collector_)4176 self.FunctionInput.append(obj_)4177 obj_.original_tagname_ = 'FunctionInput'4178# end class FunctionalInputsType4179class FunctionInputType(GeneratedsSuper):4180 __hash__ = GeneratedsSuper.__hash__4181 subclass = None4182 superclass = None4183 def __init__(self, Position=None, Label=None, I=None, J=None, Value=None, FlowRef=None, OpZeroOrOne=None, BaseSetInd=None, Script=None, InputReference=None, gds_collector_=None, **kwargs_):4184 self.gds_collector_ = gds_collector_4185 self.gds_elementtree_node_ = None4186 self.original_tagname_ = None4187 self.parent_object_ = kwargs_.get('parent_object_')4188 self.ns_prefix_ = None4189 self.Position = _cast(int, Position)4190 self.Position_nsprefix_ = None4191 self.Label = Label4192 self.Label_nsprefix_ = None4193 self.I = I4194 self.I_nsprefix_ = None4195 self.J = J4196 self.J_nsprefix_ = None4197 self.Value = Value4198 self.Value_nsprefix_ = None4199 self.FlowRef = FlowRef4200 self.FlowRef_nsprefix_ = None4201 self.OpZeroOrOne = OpZeroOrOne4202 self.OpZeroOrOne_nsprefix_ = None4203 self.BaseSetInd = BaseSetInd4204 self.BaseSetInd_nsprefix_ = None4205 self.Script = Script4206 self.Script_nsprefix_ = None4207 self.InputReference = InputReference4208 self.InputReference_nsprefix_ = None4209 def factory(*args_, **kwargs_):4210 if CurrentSubclassModule_ is not None:4211 subclass = getSubclassFromModule_(4212 CurrentSubclassModule_, FunctionInputType)4213 if subclass is not None:4214 return subclass(*args_, **kwargs_)4215 if FunctionInputType.subclass:4216 return FunctionInputType.subclass(*args_, **kwargs_)4217 else:4218 return FunctionInputType(*args_, **kwargs_)4219 factory = staticmethod(factory)4220 def get_ns_prefix_(self):4221 return self.ns_prefix_4222 def set_ns_prefix_(self, ns_prefix):4223 self.ns_prefix_ = ns_prefix4224 def get_Label(self):4225 return self.Label4226 def set_Label(self, Label):4227 self.Label = Label4228 def get_I(self):4229 return self.I4230 def set_I(self, I):4231 self.I = I4232 def get_J(self):4233 return self.J4234 def set_J(self, J):4235 self.J = J4236 def get_Value(self):4237 return self.Value4238 def set_Value(self, Value):4239 self.Value = Value4240 def get_FlowRef(self):4241 return self.FlowRef4242 def set_FlowRef(self, FlowRef):4243 self.FlowRef = FlowRef4244 def get_OpZeroOrOne(self):4245 return self.OpZeroOrOne4246 def set_OpZeroOrOne(self, OpZeroOrOne):4247 self.OpZeroOrOne = OpZeroOrOne4248 def get_BaseSetInd(self):4249 return self.BaseSetInd4250 def set_BaseSetInd(self, BaseSetInd):4251 self.BaseSetInd = BaseSetInd4252 def get_Script(self):4253 return self.Script4254 def set_Script(self, Script):4255 self.Script = Script4256 def get_InputReference(self):4257 return self.InputReference4258 def set_InputReference(self, InputReference):4259 self.InputReference = InputReference4260 def get_Position(self):4261 return self.Position4262 def set_Position(self, Position):4263 self.Position = Position4264 def _hasContent(self):4265 if (4266 self.Label is not None or4267 self.I is not None or4268 self.J is not None or4269 self.Value is not None or4270 self.FlowRef is not None or4271 self.OpZeroOrOne is not None or4272 self.BaseSetInd is not None or4273 self.Script is not None or4274 self.InputReference is not None4275 ):4276 return True4277 else:4278 return False4279 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType', pretty_print=True):4280 imported_ns_def_ = GenerateDSNamespaceDefs_.get('FunctionInputType')4281 if imported_ns_def_ is not None:4282 namespacedef_ = imported_ns_def_4283 if pretty_print:4284 eol_ = '\n'4285 else:4286 eol_ = ''4287 if self.original_tagname_ is not None and name_ == 'FunctionInputType':4288 name_ = self.original_tagname_4289 if UseCapturedNS_ and self.ns_prefix_:4290 namespaceprefix_ = self.ns_prefix_ + ':'4291 showIndent(outfile, level, pretty_print)4292 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4293 already_processed = set()4294 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FunctionInputType')4295 if self._hasContent():4296 outfile.write('>%s' % (eol_, ))4297 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='FunctionInputType', pretty_print=pretty_print)4298 showIndent(outfile, level, pretty_print)4299 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4300 else:4301 outfile.write('/>%s' % (eol_, ))4302 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='FunctionInputType'):4303 if self.Position is not None and 'Position' not in already_processed:4304 already_processed.add('Position')4305 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))4306 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType', fromsubclass_=False, pretty_print=True):4307 if pretty_print:4308 eol_ = '\n'4309 else:4310 eol_ = ''4311 if self.Label is not None:4312 namespaceprefix_ = self.Label_nsprefix_ + ':' if (UseCapturedNS_ and self.Label_nsprefix_) else ''4313 showIndent(outfile, level, pretty_print)4314 outfile.write('<%sLabel>%s</%sLabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Label), input_name='Label')), namespaceprefix_ , eol_))4315 if self.I is not None:4316 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''4317 showIndent(outfile, level, pretty_print)4318 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))4319 if self.J is not None:4320 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''4321 showIndent(outfile, level, pretty_print)4322 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))4323 if self.Value is not None:4324 namespaceprefix_ = self.Value_nsprefix_ + ':' if (UseCapturedNS_ and self.Value_nsprefix_) else ''4325 showIndent(outfile, level, pretty_print)4326 outfile.write('<%sValue>%s</%sValue>%s' % (namespaceprefix_ , self.gds_format_double(self.Value, input_name='Value'), namespaceprefix_ , eol_))4327 if self.FlowRef is not None:4328 namespaceprefix_ = self.FlowRef_nsprefix_ + ':' if (UseCapturedNS_ and self.FlowRef_nsprefix_) else ''4329 showIndent(outfile, level, pretty_print)4330 outfile.write('<%sFlowRef>%s</%sFlowRef>%s' % (namespaceprefix_ , self.gds_format_integer(self.FlowRef, input_name='FlowRef'), namespaceprefix_ , eol_))4331 if self.OpZeroOrOne is not None:4332 namespaceprefix_ = self.OpZeroOrOne_nsprefix_ + ':' if (UseCapturedNS_ and self.OpZeroOrOne_nsprefix_) else ''4333 showIndent(outfile, level, pretty_print)4334 outfile.write('<%sOpZeroOrOne>%s</%sOpZeroOrOne>%s' % (namespaceprefix_ , self.gds_format_integer(self.OpZeroOrOne, input_name='OpZeroOrOne'), namespaceprefix_ , eol_))4335 if self.BaseSetInd is not None:4336 namespaceprefix_ = self.BaseSetInd_nsprefix_ + ':' if (UseCapturedNS_ and self.BaseSetInd_nsprefix_) else ''4337 showIndent(outfile, level, pretty_print)4338 outfile.write('<%sBaseSetInd>%s</%sBaseSetInd>%s' % (namespaceprefix_ , self.gds_format_integer(self.BaseSetInd, input_name='BaseSetInd'), namespaceprefix_ , eol_))4339 if self.Script is not None:4340 namespaceprefix_ = self.Script_nsprefix_ + ':' if (UseCapturedNS_ and self.Script_nsprefix_) else ''4341 showIndent(outfile, level, pretty_print)4342 outfile.write('<%sScript>%s</%sScript>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Script), input_name='Script')), namespaceprefix_ , eol_))4343 if self.InputReference is not None:4344 namespaceprefix_ = self.InputReference_nsprefix_ + ':' if (UseCapturedNS_ and self.InputReference_nsprefix_) else ''4345 showIndent(outfile, level, pretty_print)4346 outfile.write('<%sInputReference>%s</%sInputReference>%s' % (namespaceprefix_ , self.gds_format_integer(self.InputReference, input_name='InputReference'), namespaceprefix_ , eol_))4347 def exportLiteral(self, outfile, level, name_='FunctionInputType'):4348 level += 14349 already_processed = set()4350 self._exportLiteralAttributes(outfile, level, already_processed, name_)4351 if self._hasContent():4352 self._exportLiteralChildren(outfile, level, name_)4353 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):4354 if self.Position is not None and 'Position' not in already_processed:4355 already_processed.add('Position')4356 showIndent(outfile, level)4357 outfile.write('Position=%d,\n' % (self.Position,))4358 def _exportLiteralChildren(self, outfile, level, name_):4359 if self.Label is not None:4360 showIndent(outfile, level)4361 outfile.write('Label=%s,\n' % self.gds_encode(quote_python(self.Label)))4362 if self.I is not None:4363 showIndent(outfile, level)4364 outfile.write('I=%d,\n' % self.I)4365 if self.J is not None:4366 showIndent(outfile, level)4367 outfile.write('J=%d,\n' % self.J)4368 if self.Value is not None:4369 showIndent(outfile, level)4370 outfile.write(Value=self.gds_format_double(self.Value))4371 if self.FlowRef is not None:4372 showIndent(outfile, level)4373 outfile.write('FlowRef=%d,\n' % self.FlowRef)4374 if self.OpZeroOrOne is not None:4375 showIndent(outfile, level)4376 outfile.write('OpZeroOrOne=%d,\n' % self.OpZeroOrOne)4377 if self.BaseSetInd is not None:4378 showIndent(outfile, level)4379 outfile.write('BaseSetInd=%d,\n' % self.BaseSetInd)4380 if self.Script is not None:4381 showIndent(outfile, level)4382 outfile.write('Script=%s,\n' % self.gds_encode(quote_python(self.Script)))4383 if self.InputReference is not None:4384 showIndent(outfile, level)4385 outfile.write('InputReference=%d,\n' % self.InputReference)4386 def build(self, node, gds_collector_=None):4387 self.gds_collector_ = gds_collector_4388 if SaveElementTreeNode:4389 self.gds_elementtree_node_ = node4390 already_processed = set()4391 self.ns_prefix_ = node.prefix4392 self._buildAttributes(node, node.attrib, already_processed)4393 for child in node:4394 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4395 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)4396 return self4397 def _buildAttributes(self, node, attrs, already_processed):4398 value = find_attr_value_('Position', node)4399 if value is not None and 'Position' not in already_processed:4400 already_processed.add('Position')4401 self.Position = self.gds_parse_integer(value, node, 'Position')4402 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4403 if nodeName_ == 'Label':4404 value_ = child_.text4405 value_ = self.gds_parse_string(value_, node, 'Label')4406 value_ = self.gds_validate_string(value_, node, 'Label')4407 self.Label = value_4408 self.Label_nsprefix_ = child_.prefix4409 elif nodeName_ == 'I' and child_.text:4410 sval_ = child_.text4411 ival_ = self.gds_parse_integer(sval_, node, 'I')4412 ival_ = self.gds_validate_integer(ival_, node, 'I')4413 self.I = ival_4414 self.I_nsprefix_ = child_.prefix4415 elif nodeName_ == 'J' and child_.text:4416 sval_ = child_.text4417 ival_ = self.gds_parse_integer(sval_, node, 'J')4418 ival_ = self.gds_validate_integer(ival_, node, 'J')4419 self.J = ival_4420 self.J_nsprefix_ = child_.prefix4421 elif nodeName_ == 'Value' and child_.text:4422 sval_ = child_.text4423 fval_ = self.gds_parse_double(sval_, node, 'Value')4424 fval_ = self.gds_validate_double(fval_, node, 'Value')4425 self.Value = fval_4426 self.Value_nsprefix_ = child_.prefix4427 elif nodeName_ == 'FlowRef' and child_.text:4428 sval_ = child_.text4429 ival_ = self.gds_parse_integer(sval_, node, 'FlowRef')4430 ival_ = self.gds_validate_integer(ival_, node, 'FlowRef')4431 self.FlowRef = ival_4432 self.FlowRef_nsprefix_ = child_.prefix4433 elif nodeName_ == 'OpZeroOrOne' and child_.text:4434 sval_ = child_.text4435 ival_ = self.gds_parse_integer(sval_, node, 'OpZeroOrOne')4436 ival_ = self.gds_validate_integer(ival_, node, 'OpZeroOrOne')4437 self.OpZeroOrOne = ival_4438 self.OpZeroOrOne_nsprefix_ = child_.prefix4439 elif nodeName_ == 'BaseSetInd' and child_.text:4440 sval_ = child_.text4441 ival_ = self.gds_parse_integer(sval_, node, 'BaseSetInd')4442 ival_ = self.gds_validate_integer(ival_, node, 'BaseSetInd')4443 self.BaseSetInd = ival_4444 self.BaseSetInd_nsprefix_ = child_.prefix4445 elif nodeName_ == 'Script':4446 value_ = child_.text4447 value_ = self.gds_parse_string(value_, node, 'Script')4448 value_ = self.gds_validate_string(value_, node, 'Script')4449 self.Script = value_4450 self.Script_nsprefix_ = child_.prefix4451 elif nodeName_ == 'InputReference' and child_.text:4452 sval_ = child_.text4453 ival_ = self.gds_parse_integer(sval_, node, 'InputReference')4454 ival_ = self.gds_validate_integer(ival_, node, 'InputReference')4455 self.InputReference = ival_4456 self.InputReference_nsprefix_ = child_.prefix4457# end class FunctionInputType4458class RedundantFunctionalInputsType(GeneratedsSuper):4459 __hash__ = GeneratedsSuper.__hash__4460 subclass = None4461 superclass = None4462 def __init__(self, Number=None, FunctionInput=None, gds_collector_=None, **kwargs_):4463 self.gds_collector_ = gds_collector_4464 self.gds_elementtree_node_ = None4465 self.original_tagname_ = None4466 self.parent_object_ = kwargs_.get('parent_object_')4467 self.ns_prefix_ = None4468 self.Number = Number4469 self.Number_nsprefix_ = None4470 if FunctionInput is None:4471 self.FunctionInput = []4472 else:4473 self.FunctionInput = FunctionInput4474 self.FunctionInput_nsprefix_ = None4475 def factory(*args_, **kwargs_):4476 if CurrentSubclassModule_ is not None:4477 subclass = getSubclassFromModule_(4478 CurrentSubclassModule_, RedundantFunctionalInputsType)4479 if subclass is not None:4480 return subclass(*args_, **kwargs_)4481 if RedundantFunctionalInputsType.subclass:4482 return RedundantFunctionalInputsType.subclass(*args_, **kwargs_)4483 else:4484 return RedundantFunctionalInputsType(*args_, **kwargs_)4485 factory = staticmethod(factory)4486 def get_ns_prefix_(self):4487 return self.ns_prefix_4488 def set_ns_prefix_(self, ns_prefix):4489 self.ns_prefix_ = ns_prefix4490 def get_Number(self):4491 return self.Number4492 def set_Number(self, Number):4493 self.Number = Number4494 def get_FunctionInput(self):4495 return self.FunctionInput4496 def set_FunctionInput(self, FunctionInput):4497 self.FunctionInput = FunctionInput4498 def add_FunctionInput(self, value):4499 self.FunctionInput.append(value)4500 def insert_FunctionInput_at(self, index, value):4501 self.FunctionInput.insert(index, value)4502 def replace_FunctionInput_at(self, index, value):4503 self.FunctionInput[index] = value4504 def _hasContent(self):4505 if (4506 self.Number is not None or4507 self.FunctionInput4508 ):4509 return True4510 else:4511 return False4512 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='RedundantFunctionalInputsType', pretty_print=True):4513 imported_ns_def_ = GenerateDSNamespaceDefs_.get('RedundantFunctionalInputsType')4514 if imported_ns_def_ is not None:4515 namespacedef_ = imported_ns_def_4516 if pretty_print:4517 eol_ = '\n'4518 else:4519 eol_ = ''4520 if self.original_tagname_ is not None and name_ == 'RedundantFunctionalInputsType':4521 name_ = self.original_tagname_4522 if UseCapturedNS_ and self.ns_prefix_:4523 namespaceprefix_ = self.ns_prefix_ + ':'4524 showIndent(outfile, level, pretty_print)4525 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4526 already_processed = set()4527 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='RedundantFunctionalInputsType')4528 if self._hasContent():4529 outfile.write('>%s' % (eol_, ))4530 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='RedundantFunctionalInputsType', pretty_print=pretty_print)4531 showIndent(outfile, level, pretty_print)4532 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4533 else:4534 outfile.write('/>%s' % (eol_, ))4535 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='RedundantFunctionalInputsType'):4536 pass4537 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='RedundantFunctionalInputsType', fromsubclass_=False, pretty_print=True):4538 if pretty_print:4539 eol_ = '\n'4540 else:4541 eol_ = ''4542 if self.Number is not None:4543 namespaceprefix_ = self.Number_nsprefix_ + ':' if (UseCapturedNS_ and self.Number_nsprefix_) else ''4544 showIndent(outfile, level, pretty_print)4545 outfile.write('<%sNumber>%s</%sNumber>%s' % (namespaceprefix_ , self.gds_format_integer(self.Number, input_name='Number'), namespaceprefix_ , eol_))4546 for FunctionInput_ in self.FunctionInput:4547 namespaceprefix_ = self.FunctionInput_nsprefix_ + ':' if (UseCapturedNS_ and self.FunctionInput_nsprefix_) else ''4548 FunctionInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='FunctionInput', pretty_print=pretty_print)4549 def exportLiteral(self, outfile, level, name_='RedundantFunctionalInputsType'):4550 level += 14551 already_processed = set()4552 self._exportLiteralAttributes(outfile, level, already_processed, name_)4553 if self._hasContent():4554 self._exportLiteralChildren(outfile, level, name_)4555 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):4556 pass4557 def _exportLiteralChildren(self, outfile, level, name_):4558 if self.Number is not None:4559 showIndent(outfile, level)4560 outfile.write('Number=%d,\n' % self.Number)4561 showIndent(outfile, level)4562 outfile.write('FunctionInput=[\n')4563 level += 14564 for FunctionInput_ in self.FunctionInput:4565 showIndent(outfile, level)4566 outfile.write('model_.FunctionInputType1(\n')4567 FunctionInput_.exportLiteral(outfile, level, name_='FunctionInputType1')4568 showIndent(outfile, level)4569 outfile.write('),\n')4570 level -= 14571 showIndent(outfile, level)4572 outfile.write('],\n')4573 def build(self, node, gds_collector_=None):4574 self.gds_collector_ = gds_collector_4575 if SaveElementTreeNode:4576 self.gds_elementtree_node_ = node4577 already_processed = set()4578 self.ns_prefix_ = node.prefix4579 self._buildAttributes(node, node.attrib, already_processed)4580 for child in node:4581 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4582 self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)4583 return self4584 def _buildAttributes(self, node, attrs, already_processed):4585 pass4586 def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):4587 if nodeName_ == 'Number' and child_.text:4588 sval_ = child_.text4589 ival_ = self.gds_parse_integer(sval_, node, 'Number')4590 ival_ = self.gds_validate_integer(ival_, node, 'Number')4591 self.Number = ival_4592 self.Number_nsprefix_ = child_.prefix4593 elif nodeName_ == 'FunctionInput':4594 obj_ = FunctionInputType1.factory(parent_object_=self)4595 obj_.build(child_, gds_collector_=gds_collector_)4596 self.FunctionInput.append(obj_)4597 obj_.original_tagname_ = 'FunctionInput'4598# end class RedundantFunctionalInputsType4599class FunctionInputType1(GeneratedsSuper):4600 __hash__ = GeneratedsSuper.__hash__4601 subclass = None4602 superclass = None4603 def __init__(self, Position=None, Label=None, I=None, J=None, Value=None, FlowRef=None, OpZeroOrOne=None, BaseSetInd=None, Script=None, InputReference=None, gds_collector_=None, **kwargs_):4604 self.gds_collector_ = gds_collector_4605 self.gds_elementtree_node_ = None4606 self.original_tagname_ = None4607 self.parent_object_ = kwargs_.get('parent_object_')4608 self.ns_prefix_ = None4609 self.Position = _cast(int, Position)4610 self.Position_nsprefix_ = None4611 self.Label = Label4612 self.Label_nsprefix_ = None4613 self.I = I4614 self.I_nsprefix_ = None4615 self.J = J4616 self.J_nsprefix_ = None4617 self.Value = Value4618 self.Value_nsprefix_ = None4619 self.FlowRef = FlowRef4620 self.FlowRef_nsprefix_ = None4621 self.OpZeroOrOne = OpZeroOrOne4622 self.OpZeroOrOne_nsprefix_ = None4623 self.BaseSetInd = BaseSetInd4624 self.BaseSetInd_nsprefix_ = None4625 self.Script = Script4626 self.Script_nsprefix_ = None4627 self.InputReference = InputReference4628 self.InputReference_nsprefix_ = None4629 def factory(*args_, **kwargs_):4630 if CurrentSubclassModule_ is not None:4631 subclass = getSubclassFromModule_(4632 CurrentSubclassModule_, FunctionInputType1)4633 if subclass is not None:4634 return subclass(*args_, **kwargs_)4635 if FunctionInputType1.subclass:4636 return FunctionInputType1.subclass(*args_, **kwargs_)4637 else:4638 return FunctionInputType1(*args_, **kwargs_)4639 factory = staticmethod(factory)4640 def get_ns_prefix_(self):4641 return self.ns_prefix_4642 def set_ns_prefix_(self, ns_prefix):4643 self.ns_prefix_ = ns_prefix4644 def get_Label(self):4645 return self.Label4646 def set_Label(self, Label):4647 self.Label = Label4648 def get_I(self):4649 return self.I4650 def set_I(self, I):4651 self.I = I4652 def get_J(self):4653 return self.J4654 def set_J(self, J):4655 self.J = J4656 def get_Value(self):4657 return self.Value4658 def set_Value(self, Value):4659 self.Value = Value4660 def get_FlowRef(self):4661 return self.FlowRef4662 def set_FlowRef(self, FlowRef):4663 self.FlowRef = FlowRef4664 def get_OpZeroOrOne(self):4665 return self.OpZeroOrOne4666 def set_OpZeroOrOne(self, OpZeroOrOne):4667 self.OpZeroOrOne = OpZeroOrOne4668 def get_BaseSetInd(self):4669 return self.BaseSetInd4670 def set_BaseSetInd(self, BaseSetInd):4671 self.BaseSetInd = BaseSetInd4672 def get_Script(self):4673 return self.Script4674 def set_Script(self, Script):4675 self.Script = Script4676 def get_InputReference(self):4677 return self.InputReference4678 def set_InputReference(self, InputReference):4679 self.InputReference = InputReference4680 def get_Position(self):4681 return self.Position4682 def set_Position(self, Position):4683 self.Position = Position4684 def _hasContent(self):4685 if (4686 self.Label is not None or4687 self.I is not None or4688 self.J is not None or4689 self.Value is not None or4690 self.FlowRef is not None or4691 self.OpZeroOrOne is not None or4692 self.BaseSetInd is not None or4693 self.Script is not None or4694 self.InputReference is not None4695 ):4696 return True4697 else:4698 return False4699 def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType1', pretty_print=True):4700 imported_ns_def_ = GenerateDSNamespaceDefs_.get('FunctionInputType1')4701 if imported_ns_def_ is not None:4702 namespacedef_ = imported_ns_def_4703 if pretty_print:4704 eol_ = '\n'4705 else:4706 eol_ = ''4707 if self.original_tagname_ is not None and name_ == 'FunctionInputType1':4708 name_ = self.original_tagname_4709 if UseCapturedNS_ and self.ns_prefix_:4710 namespaceprefix_ = self.ns_prefix_ + ':'4711 showIndent(outfile, level, pretty_print)4712 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4713 already_processed = set()4714 self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FunctionInputType1')4715 if self._hasContent():4716 outfile.write('>%s' % (eol_, ))4717 self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='FunctionInputType1', pretty_print=pretty_print)4718 showIndent(outfile, level, pretty_print)4719 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))4720 else:4721 outfile.write('/>%s' % (eol_, ))4722 def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='FunctionInputType1'):4723 if self.Position is not None and 'Position' not in already_processed:4724 already_processed.add('Position')4725 outfile.write(' Position="%s"' % self.gds_format_integer(self.Position, input_name='Position'))4726 def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:wds="https://github.com/wdatasci/WDS-ModelSpec"', name_='FunctionInputType1', fromsubclass_=False, pretty_print=True):4727 if pretty_print:4728 eol_ = '\n'4729 else:4730 eol_ = ''4731 if self.Label is not None:4732 namespaceprefix_ = self.Label_nsprefix_ + ':' if (UseCapturedNS_ and self.Label_nsprefix_) else ''4733 showIndent(outfile, level, pretty_print)4734 outfile.write('<%sLabel>%s</%sLabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Label), input_name='Label')), namespaceprefix_ , eol_))4735 if self.I is not None:4736 namespaceprefix_ = self.I_nsprefix_ + ':' if (UseCapturedNS_ and self.I_nsprefix_) else ''4737 showIndent(outfile, level, pretty_print)4738 outfile.write('<%sI>%s</%sI>%s' % (namespaceprefix_ , self.gds_format_integer(self.I, input_name='I'), namespaceprefix_ , eol_))4739 if self.J is not None:4740 namespaceprefix_ = self.J_nsprefix_ + ':' if (UseCapturedNS_ and self.J_nsprefix_) else ''4741 showIndent(outfile, level, pretty_print)4742 outfile.write('<%sJ>%s</%sJ>%s' % (namespaceprefix_ , self.gds_format_integer(self.J, input_name='J'), namespaceprefix_ , eol_))4743 if self.Value is not None:4744 namespaceprefix_ = self.Value_nsprefix_ + ':' if (UseCapturedNS_ and self.Value_nsprefix_) else ''4745 showIndent(outfile, level, pretty_print)4746 outfile.write('<%sValue>%s</%sValue>%s' % (namespaceprefix_ , self.gds_format_double(self.Value, input_name='Value'), namespaceprefix_ , eol_))4747 if self.FlowRef is not None:4748 namespaceprefix_ = self.FlowRef_nsprefix_ + ':' if (UseCapturedNS_ and self.FlowRef_nsprefix_) else ''4749 showIndent(outfile, level, pretty_print)4750 outfile.write('<%sFlowRef>%s</%sFlowRef>%s' % (namespaceprefix_ , self.gds_format_integer(self.FlowRef, input_name='FlowRef'), namespaceprefix_ , eol_))4751 if self.OpZeroOrOne is not None:4752 namespaceprefix_ = self.OpZeroOrOne_nsprefix_ + ':' if (UseCapturedNS_ and self.OpZeroOrOne_nsprefix_) else ''4753 showIndent(outfile, level, pretty_print)4754 outfile.write('<%sOpZeroOrOne>%s</%sOpZeroOrOne>%s' % (namespaceprefix_ , self.gds_format_integer(self.OpZeroOrOne, input_name='OpZeroOrOne'), namespaceprefix_ , eol_))4755 if self.BaseSetInd is not None:4756 namespaceprefix_ = self.BaseSetInd_nsprefix_ + ':' if (UseCapturedNS_ and self.BaseSetInd_nsprefix_) else ''4757 showIndent(outfile, level, pretty_print)4758 outfile.write('<%sBaseSetInd>%s</%sBaseSetInd>%s' % (namespaceprefix_ , self.gds_format_integer(self.BaseSetInd, input_name='BaseSetInd'), namespaceprefix_ , eol_))4759 if self.Script is not None:4760 namespaceprefix_ = self.Script_nsprefix_ + ':' if (UseCapturedNS_ and self.Script_nsprefix_) else ''4761 showIndent(outfile, level, pretty_print)4762 outfile.write('<%sScript>%s</%sScript>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.Script), input_name='Script')), namespaceprefix_ , eol_))4763 if self.InputReference is not None:4764 namespaceprefix_ = self.InputReference_nsprefix_ + ':' if (UseCapturedNS_ and self.InputReference_nsprefix_) else ''4765 showIndent(outfile, level, pretty_print)4766 outfile.write('<%sInputReference>%s</%sInputReference>%s' % (namespaceprefix_ , self.gds_format_integer(self.InputReference, input_name='InputReference'), namespaceprefix_ , eol_))4767 def exportLiteral(self, outfile, level, name_='FunctionInputType1'):4768 level += 14769 already_processed = set()4770 self._exportLiteralAttributes(outfile, level, already_processed, name_)4771 if self._hasContent():4772 self._exportLiteralChildren(outfile, level, name_)4773 def _exportLiteralAttributes(self, outfile, level, already_processed, name_):4774 if self.Position is not None and 'Position' not in already_processed:4775 already_processed.add('Position')4776 showIndent(outfile, level)4777 outfile.write('Position=%d,\n' % (self.Position,))4778 def _exportLiteralChildren(self, outfile, level, name_):4779 if self.Label is not None:4780 showIndent(outfile, level)4781 outfile.write('Label=%s,\n' % self.gds_encode(quote_python(self.Label)))4782 if self.I is not None:4783 showIndent(outfile, level)4784 outfile.write('I=%d,\n' % self.I)4785 if self.J is not None:4786 showIndent(outfile, level)4787 outfile.write('J=%d,\n' % self.J)4788 if self.Value is not None:4789 showIndent(outfile, level)4790 outfile.write(Value=self.gds_format_double(self.Value))4791 if self.FlowRef is not None:4792 showIndent(outfile, level)4793 outfile.write('FlowRef=%d,\n' % self.FlowRef)4794 if self.OpZeroOrOne is not None:4795 showIndent(outfile, level)4796 outfile.write('OpZeroOrOne=%d,\n' % self.OpZeroOrOne)4797 if self.BaseSetInd is not None:4798 showIndent(outfile, level)4799 outfile.write('BaseSetInd=%d,\n' % self.BaseSetInd)4800 if self.Script is not None:4801 showIndent(outfile, level)4802 outfile.write('Script=%s,\n' % self.gds_encode(quote_python(self.Script)))4803 if self.InputReference is not None:4804 showIndent(outfile, level)...
__init__.py
Source:__init__.py
...7# should be replaced by xs:ID before generateDS runs8# 2. the gds_format_double function should be9# replaced by the following one to output10# infinity in the correct format11# def gds_format_double(self, input_data, input_name=''):12# if math.isinf(input_data):13# if input_data > 0:14# return 'INF'15# else:16# return '-INF'17# return '%e' % input_data18# 3. All namespace_='t:' in the export functions in tpn_autogen should be replaced by19# namespace_=''.20# 4. All namespacedef_='xmlns:t="http://mers.csail.mit.edu/tpn"' in the export functions in tpn_autogen21# should be replaced by namespacedef_='', except for the one for tpns.22from tpn import tpn_autogen23# The only function remaining is parse24# It will return a25class Tpn(object):...
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!!