Best Python code snippet using autotest_python
sequence.py
Source:sequence.py
...164 float(value)165 except (TypeError, ValueError):166 raise_parse_error(node, 'Requires sequence of doubles')167 return values168 def gds_format_boolean(self, input_data, input_name=''):169 return ('%s' % input_data).lower()170 def gds_validate_boolean(self, input_data, node=None, input_name=''):171 return input_data172 def gds_format_boolean_list(self, input_data, input_name=''):173 return '%s' % ' '.join(input_data)174 def gds_validate_boolean_list(175 self, input_data, node=None, input_name=''):176 values = input_data.split()177 for value in values:178 if value not in ('true', '1', 'false', '0', ):179 raise_parse_error(180 node,181 'Requires sequence of booleans '182 '("true", "1", "false", "0")')183 return values184 def gds_validate_datetime(self, input_data, node=None, input_name=''):185 return input_data186 def gds_format_datetime(self, input_data, input_name=''):187 if input_data.microsecond == 0:188 _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (189 input_data.year,190 input_data.month,191 input_data.day,192 input_data.hour,193 input_data.minute,194 input_data.second,195 )196 else:197 _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (198 input_data.year,199 input_data.month,200 input_data.day,201 input_data.hour,202 input_data.minute,203 input_data.second,204 ('%f' % (float(input_data.microsecond) / 1000000))[2:],205 )206 if input_data.tzinfo is not None:207 tzoff = input_data.tzinfo.utcoffset(input_data)208 if tzoff is not None:209 total_seconds = tzoff.seconds + (86400 * tzoff.days)210 if total_seconds == 0:211 _svalue += 'Z'212 else:213 if total_seconds < 0:214 _svalue += '-'215 total_seconds *= -1216 else:217 _svalue += '+'218 hours = total_seconds // 3600219 minutes = (total_seconds - (hours * 3600)) // 60220 _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)221 return _svalue222 @classmethod223 def gds_parse_datetime(cls, input_data):224 tz = None225 if input_data[-1] == 'Z':226 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')227 input_data = input_data[:-1]228 else:229 results = GeneratedsSuper.tzoff_pattern.search(input_data)230 if results is not None:231 tzoff_parts = results.group(2).split(':')232 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])233 if results.group(1) == '-':234 tzoff *= -1235 tz = GeneratedsSuper._FixedOffsetTZ(236 tzoff, results.group(0))237 input_data = input_data[:-6]238 time_parts = input_data.split('.')239 if len(time_parts) > 1:240 micro_seconds = int(float('0.' + time_parts[1]) * 1000000)241 input_data = '%s.%s' % (242 time_parts[0], "{}".format(micro_seconds).rjust(6, "0"), )243 dt = datetime_.datetime.strptime(244 input_data, '%Y-%m-%dT%H:%M:%S.%f')245 else:246 dt = datetime_.datetime.strptime(247 input_data, '%Y-%m-%dT%H:%M:%S')248 dt = dt.replace(tzinfo=tz)249 return dt250 def gds_validate_date(self, input_data, node=None, input_name=''):251 return input_data252 def gds_format_date(self, input_data, input_name=''):253 _svalue = '%04d-%02d-%02d' % (254 input_data.year,255 input_data.month,256 input_data.day,257 )258 try:259 if input_data.tzinfo is not None:260 tzoff = input_data.tzinfo.utcoffset(input_data)261 if tzoff is not None:262 total_seconds = tzoff.seconds + (86400 * tzoff.days)263 if total_seconds == 0:264 _svalue += 'Z'265 else:266 if total_seconds < 0:267 _svalue += '-'268 total_seconds *= -1269 else:270 _svalue += '+'271 hours = total_seconds // 3600272 minutes = (total_seconds - (hours * 3600)) // 60273 _svalue += '{0:02d}:{1:02d}'.format(274 hours, minutes)275 except AttributeError:276 pass277 return _svalue278 @classmethod279 def gds_parse_date(cls, input_data):280 tz = None281 if input_data[-1] == 'Z':282 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')283 input_data = input_data[:-1]284 else:285 results = GeneratedsSuper.tzoff_pattern.search(input_data)286 if results is not None:287 tzoff_parts = results.group(2).split(':')288 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])289 if results.group(1) == '-':290 tzoff *= -1291 tz = GeneratedsSuper._FixedOffsetTZ(292 tzoff, results.group(0))293 input_data = input_data[:-6]294 dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')295 dt = dt.replace(tzinfo=tz)296 return dt.date()297 def gds_validate_time(self, input_data, node=None, input_name=''):298 return input_data299 def gds_format_time(self, input_data, input_name=''):300 if input_data.microsecond == 0:301 _svalue = '%02d:%02d:%02d' % (302 input_data.hour,303 input_data.minute,304 input_data.second,305 )306 else:307 _svalue = '%02d:%02d:%02d.%s' % (308 input_data.hour,309 input_data.minute,310 input_data.second,311 ('%f' % (float(input_data.microsecond) / 1000000))[2:],312 )313 if input_data.tzinfo is not None:314 tzoff = input_data.tzinfo.utcoffset(input_data)315 if tzoff is not None:316 total_seconds = tzoff.seconds + (86400 * tzoff.days)317 if total_seconds == 0:318 _svalue += 'Z'319 else:320 if total_seconds < 0:321 _svalue += '-'322 total_seconds *= -1323 else:324 _svalue += '+'325 hours = total_seconds // 3600326 minutes = (total_seconds - (hours * 3600)) // 60327 _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)328 return _svalue329 def gds_validate_simple_patterns(self, patterns, target):330 # pat is a list of lists of strings/patterns.331 # The target value must match at least one of the patterns332 # in order for the test to succeed.333 found1 = True334 for patterns1 in patterns:335 found2 = False336 for patterns2 in patterns1:337 mo = re_.search(patterns2, target)338 if mo is not None and len(mo.group(0)) == len(target):339 found2 = True340 break341 if not found2:342 found1 = False343 break344 return found1345 @classmethod346 def gds_parse_time(cls, input_data):347 tz = None348 if input_data[-1] == 'Z':349 tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')350 input_data = input_data[:-1]351 else:352 results = GeneratedsSuper.tzoff_pattern.search(input_data)353 if results is not None:354 tzoff_parts = results.group(2).split(':')355 tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])356 if results.group(1) == '-':357 tzoff *= -1358 tz = GeneratedsSuper._FixedOffsetTZ(359 tzoff, results.group(0))360 input_data = input_data[:-6]361 if len(input_data.split('.')) > 1:362 dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')363 else:364 dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')365 dt = dt.replace(tzinfo=tz)366 return dt.time()367 def gds_str_lower(self, instring):368 return instring.lower()369 def get_path_(self, node):370 path_list = []371 self.get_path_list_(node, path_list)372 path_list.reverse()373 path = '/'.join(path_list)374 return path375 Tag_strip_pattern_ = re_.compile(r'\{.*\}')376 def get_path_list_(self, node, path_list):377 if node is None:378 return379 tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)380 if tag:381 path_list.append(tag)382 self.get_path_list_(node.getparent(), path_list)383 def get_class_obj_(self, node, default_class=None):384 class_obj1 = default_class385 if 'xsi' in node.nsmap:386 classname = node.get('{%s}type' % node.nsmap['xsi'])387 if classname is not None:388 names = classname.split(':')389 if len(names) == 2:390 classname = names[1]391 class_obj2 = globals().get(classname)392 if class_obj2 is not None:393 class_obj1 = class_obj2394 return class_obj1395 def gds_build_any(self, node, type_name=None):396 return None397 @classmethod398 def gds_reverse_node_mapping(cls, mapping):399 return dict(((v, k) for k, v in mapping.items()))400 @staticmethod401 def gds_encode(instring):402 if sys.version_info.major == 2:403 if ExternalEncoding:404 encoding = ExternalEncoding405 else:406 encoding = 'utf-8'407 return instring.encode(encoding)408 else:409 return instring410 @staticmethod411 def convert_unicode(instring):412 if isinstance(instring, str):413 result = quote_xml(instring)414 elif sys.version_info.major == 2 and isinstance(instring, unicode):415 result = quote_xml(instring).encode('utf8')416 else:417 result = GeneratedsSuper.gds_encode(str(instring))418 return result419 def __eq__(self, other):420 if type(self) != type(other):421 return False422 return self.__dict__ == other.__dict__423 def __ne__(self, other):424 return not self.__eq__(other)425 426 def getSubclassFromModule_(module, class_):427 '''Get the subclass of a class from a specific module.'''428 name = class_.__name__ + 'Sub'429 if hasattr(module, name):430 return getattr(module, name)431 else:432 return None433#434# If you have installed IPython you can uncomment and use the following.435# IPython is available from http://ipython.scipy.org/.436#437## from IPython.Shell import IPShellEmbed438## args = ''439## ipshell = IPShellEmbed(args,440## banner = 'Dropping into IPython',441## exit_msg = 'Leaving Interpreter, back to program.')442# Then use the following line where and when you want to drop into the443# IPython shell:444# ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')445#446# Globals447#448ExternalEncoding = ''449Tag_pattern_ = re_.compile(r'({.*})?(.*)')450String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")451Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')452CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)453# Change this to redirect the generated superclass module to use a454# specific subclass module.455CurrentSubclassModule_ = None456#457# Support/utility functions.458#459def checkclass(value, cl):460 if isinstance(value, list):461 for v in value:462 if not isinstance(v, cl):463 raise ValueError("invalid class")464 else:465 if not isinstance(value, cl):466 raise ValueError("invalid class")467def showIndent(outfile, level, pretty_print=True):468 if pretty_print:469 for idx in range(level):470 outfile.write(' ')471def quote_xml(inStr):472 "Escape markup chars, but do not modify CDATA sections."473 if not inStr:474 return ''475 s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)476 s2 = ''477 pos = 0478 matchobjects = CDATA_pattern_.finditer(s1)479 for mo in matchobjects:480 s3 = s1[pos:mo.start()]481 s2 += quote_xml_aux(s3)482 s2 += s1[mo.start():mo.end()]483 pos = mo.end()484 s3 = s1[pos:]485 s2 += quote_xml_aux(s3)486 return s2487def quote_xml_aux(inStr):488 s1 = inStr.replace('&', '&')489 s1 = s1.replace('<', '<')490 s1 = s1.replace('>', '>')491 return s1492def quote_attrib(inStr):493 s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)494 s1 = s1.replace('&', '&')495 s1 = s1.replace('<', '<')496 s1 = s1.replace('>', '>')497 if '"' in s1:498 if "'" in s1:499 s1 = '"%s"' % s1.replace('"', """)500 else:501 s1 = "'%s'" % s1502 else:503 s1 = '"%s"' % s1504 return s1505def quote_python(inStr):506 s1 = inStr507 if s1.find("'") == -1:508 if s1.find('\n') == -1:509 return "'%s'" % s1510 else:511 return "'''%s'''" % s1512 else:513 if s1.find('"') != -1:514 s1 = s1.replace('"', '\\"')515 if s1.find('\n') == -1:516 return '"%s"' % s1517 else:518 return '"""%s"""' % s1519def get_all_text_(node):520 if node.text is not None:521 text = node.text522 else:523 text = ''524 for child in node:525 if child.tail is not None:526 text += child.tail527 return text528def find_attr_value_(attr_name, node):529 attrs = node.attrib530 attr_parts = attr_name.split(':')531 value = None532 if len(attr_parts) == 1:533 value = attrs.get(attr_name)534 elif len(attr_parts) == 2:535 prefix, name = attr_parts536 namespace = node.nsmap.get(prefix)537 if namespace is not None:538 value = attrs.get('{%s}%s' % (namespace, name, ))539 return value540class GDSParseError(Exception):541 pass542def raise_parse_error(node, msg):543 msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )544 raise GDSParseError(msg)545class MixedContainer:546 # Constants for category:547 CategoryNone = 0548 CategoryText = 1549 CategorySimple = 2550 CategoryComplex = 3551 # Constants for content_type:552 TypeNone = 0553 TypeText = 1554 TypeString = 2555 TypeInteger = 3556 TypeFloat = 4557 TypeDecimal = 5558 TypeDouble = 6559 TypeBoolean = 7560 TypeBase64 = 8561 def __init__(self, category, content_type, name, value):562 self.category = category563 self.content_type = content_type564 self.name = name565 self.value = value566 def getCategory(self):567 return self.category568 def getContenttype(self, content_type):569 return self.content_type570 def getValue(self):571 return self.value572 def getName(self):573 return self.name574 def export(self, outfile, level, name, namespace,575 pretty_print=True):576 if self.category == MixedContainer.CategoryText:577 # Prevent exporting empty content as empty lines.578 if self.value.strip():579 outfile.write(self.value)580 elif self.category == MixedContainer.CategorySimple:581 self.exportSimple(outfile, level, name)582 else: # category == MixedContainer.CategoryComplex583 self.value.export(584 outfile, level, namespace, name,585 pretty_print=pretty_print)586 def exportSimple(self, outfile, level, name):587 if self.content_type == MixedContainer.TypeString:588 outfile.write('<%s>%s</%s>' % (589 self.name, self.value, self.name))590 elif self.content_type == MixedContainer.TypeInteger or \591 self.content_type == MixedContainer.TypeBoolean:592 outfile.write('<%s>%d</%s>' % (593 self.name, self.value, self.name))594 elif self.content_type == MixedContainer.TypeFloat or \595 self.content_type == MixedContainer.TypeDecimal:596 outfile.write('<%s>%f</%s>' % (597 self.name, self.value, self.name))598 elif self.content_type == MixedContainer.TypeDouble:599 outfile.write('<%s>%g</%s>' % (600 self.name, self.value, self.name))601 elif self.content_type == MixedContainer.TypeBase64:602 outfile.write('<%s>%s</%s>' % (603 self.name,604 base64.b64encode(self.value),605 self.name))606 def to_etree(self, element):607 if self.category == MixedContainer.CategoryText:608 # Prevent exporting empty content as empty lines.609 if self.value.strip():610 if len(element) > 0:611 if element[-1].tail is None:612 element[-1].tail = self.value613 else:614 element[-1].tail += self.value615 else:616 if element.text is None:617 element.text = self.value618 else:619 element.text += self.value620 elif self.category == MixedContainer.CategorySimple:621 subelement = etree_.SubElement(622 element, '%s' % self.name)623 subelement.text = self.to_etree_simple()624 else: # category == MixedContainer.CategoryComplex625 self.value.to_etree(element)626 def to_etree_simple(self):627 if self.content_type == MixedContainer.TypeString:628 text = self.value629 elif (self.content_type == MixedContainer.TypeInteger or630 self.content_type == MixedContainer.TypeBoolean):631 text = '%d' % self.value632 elif (self.content_type == MixedContainer.TypeFloat or633 self.content_type == MixedContainer.TypeDecimal):634 text = '%f' % self.value635 elif self.content_type == MixedContainer.TypeDouble:636 text = '%g' % self.value637 elif self.content_type == MixedContainer.TypeBase64:638 text = '%s' % base64.b64encode(self.value)639 return text640 def exportLiteral(self, outfile, level, name):641 if self.category == MixedContainer.CategoryText:642 showIndent(outfile, level)643 outfile.write(644 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (645 self.category, self.content_type,646 self.name, self.value))647 elif self.category == MixedContainer.CategorySimple:648 showIndent(outfile, level)649 outfile.write(650 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (651 self.category, self.content_type,652 self.name, self.value))653 else: # category == MixedContainer.CategoryComplex654 showIndent(outfile, level)655 outfile.write(656 'model_.MixedContainer(%d, %d, "%s",\n' % (657 self.category, self.content_type, self.name,))658 self.value.exportLiteral(outfile, level + 1)659 showIndent(outfile, level)660 outfile.write(')\n')661class MemberSpec_(object):662 def __init__(self, name='', data_type='', container=0,663 optional=0, child_attrs=None, choice=None):664 self.name = name665 self.data_type = data_type666 self.container = container667 self.child_attrs = child_attrs668 self.choice = choice669 self.optional = optional670 def set_name(self, name): self.name = name671 def get_name(self): return self.name672 def set_data_type(self, data_type): self.data_type = data_type673 def get_data_type_chain(self): return self.data_type674 def get_data_type(self):675 if isinstance(self.data_type, list):676 if len(self.data_type) > 0:677 return self.data_type[-1]678 else:679 return 'xs:string'680 else:681 return self.data_type682 def set_container(self, container): self.container = container683 def get_container(self): return self.container684 def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs685 def get_child_attrs(self): return self.child_attrs686 def set_choice(self, choice): self.choice = choice687 def get_choice(self): return self.choice688 def set_optional(self, optional): self.optional = optional689 def get_optional(self): return self.optional690def _cast(typ, value):691 if typ is None or value is None:692 return value693 return typ(value)694#695# Data representation classes.696#697class create_DartSequencerDescriptorEntry(GeneratedsSuper):698 member_data_items_ = [699 MemberSpec_('args', 'xs:string', 0, 1, {'use': 'optional'}),700 MemberSpec_('propertyName', 'xs:string', 0, 1, {'use': 'optional'}),701 MemberSpec_('type_', 'xs:string', 0, 1, {'use': 'optional'}),702 ]703 subclass = None704 superclass = None705 def __init__(self, args=None, propertyName=None, type_=None):706 self.original_tagname_ = None707 self.troot=get_gs_troot('sequence','_DartSequencerDescriptorEntry')708 self.attrib = ['args', 'propertyName', 'type_']709 self.children = []710 self.parent = None711 self._args = _cast(None, args)712 self._propertyName = _cast(None, propertyName)713 self._type_ = _cast(None, type_)714 update_node(self,self.troot,'sequence')715 def factory(*args_, **kwargs_):716 if CurrentSubclassModule_ is not None:717 subclass = getSubclassFromModule_(718 CurrentSubclassModule_, create_DartSequencerDescriptorEntry)719 if subclass is not None:720 return subclass(*args_, **kwargs_)721 if create_DartSequencerDescriptorEntry.subclass:722 return create_DartSequencerDescriptorEntry.subclass(*args_, **kwargs_)723 else:724 return create_DartSequencerDescriptorEntry(*args_, **kwargs_)725 factory = staticmethod(factory)726 def get_args(self): return self._args727 def set_args(self, value):728 self._args = value729 update_node(self,self.troot,'sequence')730 args = property(get_args, set_args)731 def get_propertyName(self): return self._propertyName732 def set_propertyName(self, value):733 self._propertyName = value734 update_node(self,self.troot,'sequence')735 propertyName = property(get_propertyName, set_propertyName)736 def get_type(self): return self._type_737 def set_type(self, value):738 self._type_ = value739 update_node(self,self.troot,'sequence')740 type_ = property(get_type, set_type)741 def copy(self):742 obj_ = self.factory()743 return(obj_.build(self.to_etree()))744 def hasContent_(self):745 if (746 ):747 return True748 else:749 return False750 def export(self, outfile, level, namespaceprefix_='', name_='_DartSequencerDescriptorEntry', namespacedef_='', pretty_print=True):751 imported_ns_def_ = GenerateDSNamespaceDefs_.get('_DartSequencerDescriptorEntry')752 if imported_ns_def_ is not None:753 namespacedef_ = imported_ns_def_754 if pretty_print:755 eol_ = '\n'756 else:757 eol_ = ''758 if self.original_tagname_ is not None:759 name_ = self.original_tagname_760 showIndent(outfile, level, pretty_print)761 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))762 already_processed = set()763 self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='_DartSequencerDescriptorEntry')764 if self.hasContent_():765 outfile.write('>%s' % (eol_, ))766 self.exportChildren(outfile, level + 1, namespaceprefix_='', name_='_DartSequencerDescriptorEntry', pretty_print=pretty_print)767 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))768 else:769 outfile.write('/>%s' % (eol_, ))770 def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='_DartSequencerDescriptorEntry'):771 if self.args is not None and 'args' not in already_processed:772 already_processed.add('args')773 outfile.write(' args=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.args), input_name='args')), ))774 if self.propertyName is not None and 'propertyName' not in already_processed:775 already_processed.add('propertyName')776 outfile.write(' propertyName=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.propertyName), input_name='propertyName')), ))777 if self.type_ is not None and 'type_' not in already_processed:778 already_processed.add('type_')779 outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), ))780 def exportChildren(self, outfile, level, namespaceprefix_='', name_='_DartSequencerDescriptorEntry', fromsubclass_=False, pretty_print=True):781 pass782 def to_etree(self, parent_element=None, name_='_DartSequencerDescriptorEntry', mapping_=None):783 if parent_element is None:784 element = etree_.Element('{}' + name_)785 else:786 element = etree_.SubElement(parent_element, '{}' + name_)787 if self.args is not None:788 element.set('args', self.gds_format_string(self.args))789 if self.propertyName is not None:790 element.set('propertyName', self.gds_format_string(self.propertyName))791 if self.type_ is not None:792 element.set('type', self.gds_format_string(self.type_))793 if mapping_ is not None:794 mapping_[id(self)] = element795 return element796 def exportLiteral(self, outfile, level, name_='_DartSequencerDescriptorEntry'):797 level += 1798 already_processed = set()799 self.exportLiteralAttributes(outfile, level, already_processed, name_)800 if self.hasContent_():801 self.exportLiteralChildren(outfile, level, name_)802 def exportLiteralAttributes(self, outfile, level, already_processed, name_):803 if self.args is not None and 'args' not in already_processed:804 already_processed.add('args')805 showIndent(outfile, level)806 outfile.write('args="%s",\n' % (self.args,))807 if self.propertyName is not None and 'propertyName' not in already_processed:808 already_processed.add('propertyName')809 showIndent(outfile, level)810 outfile.write('propertyName="%s",\n' % (self.propertyName,))811 if self.type_ is not None and 'type_' not in already_processed:812 already_processed.add('type_')813 showIndent(outfile, level)814 outfile.write('type_="%s",\n' % (self.type_,))815 def exportLiteralChildren(self, outfile, level, name_):816 pass817 def build(self, node):818 already_processed = set()819 self.buildAttributes(node, node.attrib, already_processed)820 for child in node:821 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]822 self.buildChildren(child, node, nodeName_)823 return self824 def buildAttributes(self, node, attrs, already_processed):825 value = find_attr_value_('args', node)826 if value is not None and 'args' not in already_processed:827 already_processed.add('args')828 self.args = value829 value = find_attr_value_('propertyName', node)830 if value is not None and 'propertyName' not in already_processed:831 already_processed.add('propertyName')832 self.propertyName = value833 value = find_attr_value_('type', node)834 if value is not None and 'type' not in already_processed:835 already_processed.add('type')836 self.type_ = value837 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):838 pass839 840 def to_string(self, pretty_print=True):841 return etree_.tostring(self.to_etree(), pretty_print=pretty_print)842 843 844 def path(self, index=True):845 """846 Get the dartnode path of the corenode847 Parameters848 ----------849 corenode: object850 a core object851 852 index: bool853 854 If True gets the dartnode path with index if list,855 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction[0]'856 857 If False gets the dartnode path without index,858 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction'859 860 Returns861 -------862 str863 """864 return get_path(self, index=index)865 866 867 def findpaths(self, pat, case=False, regex=True):868 return findpaths(self, pat=pat, case=case, regex=regex)869 870 871 def subpaths(self):872 return subpaths(self)873 874 def set_nodes(self, **kwargs):875 return set_nodes(self, **kwargs)876 # end class create_DartSequencerDescriptorEntry877class create_DartSequencerDescriptorGroup(GeneratedsSuper):878 member_data_items_ = [879 MemberSpec_('groupName', 'xs:string', 0, 1, {'use': 'optional'}),880 MemberSpec_('DartSequencerDescriptorEntry', '_DartSequencerDescriptorEntry', 1, 1, {'type': '_DartSequencerDescriptorEntry', 'name': 'DartSequencerDescriptorEntry', 'maxOccurs': 'unbounded', 'minOccurs': '0'}, None),881 ]882 subclass = None883 superclass = None884 def __init__(self, groupName='group', DartSequencerDescriptorEntry=None):885 self.original_tagname_ = None886 self.troot=get_gs_troot('sequence','_DartSequencerDescriptorGroup')887 self.attrib = ['groupName']888 self.children = ['DartSequencerDescriptorEntry']889 self.parent = None890 self._groupName = _cast(None, groupName)891 if DartSequencerDescriptorEntry is None:892 self._DartSequencerDescriptorEntry = []893 else:894 self._DartSequencerDescriptorEntry = DartSequencerDescriptorEntry895 update_node(self,self.troot,'sequence')896 def factory(*args_, **kwargs_):897 if CurrentSubclassModule_ is not None:898 subclass = getSubclassFromModule_(899 CurrentSubclassModule_, create_DartSequencerDescriptorGroup)900 if subclass is not None:901 return subclass(*args_, **kwargs_)902 if create_DartSequencerDescriptorGroup.subclass:903 return create_DartSequencerDescriptorGroup.subclass(*args_, **kwargs_)904 else:905 return create_DartSequencerDescriptorGroup(*args_, **kwargs_)906 factory = staticmethod(factory)907 def get_DartSequencerDescriptorEntry(self): return self._DartSequencerDescriptorEntry908 def set_DartSequencerDescriptorEntry(self, value):909 if value is not None:910 checkclass(value, create_DartSequencerDescriptorEntry)911 for v in value:912 v.parent = self913 self._DartSequencerDescriptorEntry = value914 def add_DartSequencerDescriptorEntry(self, value):915 value.parent = self916 self._DartSequencerDescriptorEntry.append(value)917 def insert_DartSequencerDescriptorEntry_at(self, index, value):918 value.parent = self919 self.DartSequencerDescriptorEntry.insert(index, value)920 def replace_DartSequencerDescriptorEntry_at(self, index, value):921 value.parent = self922 self.DartSequencerDescriptorEntry[index] = value923 DartSequencerDescriptorEntry = property(get_DartSequencerDescriptorEntry, set_DartSequencerDescriptorEntry)924 def get_groupName(self): return self._groupName925 def set_groupName(self, value):926 self._groupName = value927 update_node(self,self.troot,'sequence')928 groupName = property(get_groupName, set_groupName)929 def copy(self):930 obj_ = self.factory()931 return(obj_.build(self.to_etree()))932 def hasContent_(self):933 if (934 self.DartSequencerDescriptorEntry935 ):936 return True937 else:938 return False939 def export(self, outfile, level, namespaceprefix_='', name_='_DartSequencerDescriptorGroup', namespacedef_='', pretty_print=True):940 imported_ns_def_ = GenerateDSNamespaceDefs_.get('_DartSequencerDescriptorGroup')941 if imported_ns_def_ is not None:942 namespacedef_ = imported_ns_def_943 if pretty_print:944 eol_ = '\n'945 else:946 eol_ = ''947 if self.original_tagname_ is not None:948 name_ = self.original_tagname_949 showIndent(outfile, level, pretty_print)950 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))951 already_processed = set()952 self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='_DartSequencerDescriptorGroup')953 if self.hasContent_():954 outfile.write('>%s' % (eol_, ))955 self.exportChildren(outfile, level + 1, namespaceprefix_='', name_='_DartSequencerDescriptorGroup', pretty_print=pretty_print)956 showIndent(outfile, level, pretty_print)957 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))958 else:959 outfile.write('/>%s' % (eol_, ))960 def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='_DartSequencerDescriptorGroup'):961 if self.groupName is not None and 'groupName' not in already_processed:962 already_processed.add('groupName')963 outfile.write(' groupName=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.groupName), input_name='groupName')), ))964 def exportChildren(self, outfile, level, namespaceprefix_='', name_='_DartSequencerDescriptorGroup', fromsubclass_=False, pretty_print=True):965 if pretty_print:966 eol_ = '\n'967 else:968 eol_ = ''969 for DartSequencerDescriptorEntry_ in self.DartSequencerDescriptorEntry:970 DartSequencerDescriptorEntry_.export(outfile, level, namespaceprefix_, name_='DartSequencerDescriptorEntry', pretty_print=pretty_print)971 def to_etree(self, parent_element=None, name_='_DartSequencerDescriptorGroup', mapping_=None):972 if parent_element is None:973 element = etree_.Element('{}' + name_)974 else:975 element = etree_.SubElement(parent_element, '{}' + name_)976 if self.groupName is not None:977 element.set('groupName', self.gds_format_string(self.groupName))978 for DartSequencerDescriptorEntry_ in self.DartSequencerDescriptorEntry:979 DartSequencerDescriptorEntry_.to_etree(element, name_='DartSequencerDescriptorEntry', mapping_=mapping_)980 if mapping_ is not None:981 mapping_[id(self)] = element982 return element983 def exportLiteral(self, outfile, level, name_='_DartSequencerDescriptorGroup'):984 level += 1985 already_processed = set()986 self.exportLiteralAttributes(outfile, level, already_processed, name_)987 if self.hasContent_():988 self.exportLiteralChildren(outfile, level, name_)989 def exportLiteralAttributes(self, outfile, level, already_processed, name_):990 if self.groupName is not None and 'groupName' not in already_processed:991 already_processed.add('groupName')992 showIndent(outfile, level)993 outfile.write('groupName="%s",\n' % (self.groupName,))994 def exportLiteralChildren(self, outfile, level, name_):995 showIndent(outfile, level)996 outfile.write('DartSequencerDescriptorEntry=[\n')997 level += 1998 for DartSequencerDescriptorEntry_ in self.DartSequencerDescriptorEntry:999 showIndent(outfile, level)1000 outfile.write('model_._DartSequencerDescriptorEntry(\n')1001 DartSequencerDescriptorEntry_.exportLiteral(outfile, level, name_='_DartSequencerDescriptorEntry')1002 showIndent(outfile, level)1003 outfile.write('),\n')1004 level -= 11005 showIndent(outfile, level)1006 outfile.write('],\n')1007 def build(self, node):1008 already_processed = set()1009 self.buildAttributes(node, node.attrib, already_processed)1010 self.DartSequencerDescriptorEntry = []1011 for child in node:1012 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1013 self.buildChildren(child, node, nodeName_)1014 return self1015 def buildAttributes(self, node, attrs, already_processed):1016 value = find_attr_value_('groupName', node)1017 if value is not None and 'groupName' not in already_processed:1018 already_processed.add('groupName')1019 self.groupName = value1020 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1021 if nodeName_ == 'DartSequencerDescriptorEntry':1022 obj_ = create_DartSequencerDescriptorEntry.factory()1023 obj_.build(child_)1024 self.add_DartSequencerDescriptorEntry(obj_)1025 obj_.original_tagname_ = 'DartSequencerDescriptorEntry'1026 1027 def to_string(self, pretty_print=True):1028 return etree_.tostring(self.to_etree(), pretty_print=pretty_print)1029 1030 1031 def path(self, index=True):1032 """1033 Get the dartnode path of the corenode1034 Parameters1035 ----------1036 corenode: object1037 a core object1038 1039 index: bool1040 1041 If True gets the dartnode path with index if list,1042 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction[0]'1043 1044 If False gets the dartnode path without index,1045 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction'1046 1047 Returns1048 -------1049 str1050 """1051 return get_path(self, index=index)1052 1053 1054 def findpaths(self, pat, case=False, regex=True):1055 return findpaths(self, pat=pat, case=case, regex=regex)1056 1057 1058 def subpaths(self):1059 return subpaths(self)1060 1061 def set_nodes(self, **kwargs):1062 return set_nodes(self, **kwargs)1063 # end class create_DartSequencerDescriptorGroup1064class create_DartSequencerDescriptorEntries(GeneratedsSuper):1065 member_data_items_ = [1066 MemberSpec_('DartSequencerDescriptorGroup', '_DartSequencerDescriptorGroup', 1, 1, {'type': '_DartSequencerDescriptorGroup', 'name': 'DartSequencerDescriptorGroup', 'maxOccurs': 'unbounded', 'minOccurs': '0'}, None),1067 ]1068 subclass = None1069 superclass = None1070 def __init__(self, DartSequencerDescriptorGroup=None):1071 self.original_tagname_ = None1072 self.troot=get_gs_troot('sequence','_DartSequencerDescriptorEntries')1073 self.attrib = ['']1074 self.children = ['DartSequencerDescriptorGroup']1075 self.parent = None1076 if DartSequencerDescriptorGroup is None:1077 self._DartSequencerDescriptorGroup = []1078 else:1079 self._DartSequencerDescriptorGroup = DartSequencerDescriptorGroup1080 update_node(self,self.troot,'sequence')1081 def factory(*args_, **kwargs_):1082 if CurrentSubclassModule_ is not None:1083 subclass = getSubclassFromModule_(1084 CurrentSubclassModule_, create_DartSequencerDescriptorEntries)1085 if subclass is not None:1086 return subclass(*args_, **kwargs_)1087 if create_DartSequencerDescriptorEntries.subclass:1088 return create_DartSequencerDescriptorEntries.subclass(*args_, **kwargs_)1089 else:1090 return create_DartSequencerDescriptorEntries(*args_, **kwargs_)1091 factory = staticmethod(factory)1092 def get_DartSequencerDescriptorGroup(self): return self._DartSequencerDescriptorGroup1093 def set_DartSequencerDescriptorGroup(self, value):1094 if value is not None:1095 checkclass(value, create_DartSequencerDescriptorGroup)1096 for v in value:1097 v.parent = self1098 self._DartSequencerDescriptorGroup = value1099 def add_DartSequencerDescriptorGroup(self, value):1100 value.parent = self1101 self._DartSequencerDescriptorGroup.append(value)1102 def insert_DartSequencerDescriptorGroup_at(self, index, value):1103 value.parent = self1104 self.DartSequencerDescriptorGroup.insert(index, value)1105 def replace_DartSequencerDescriptorGroup_at(self, index, value):1106 value.parent = self1107 self.DartSequencerDescriptorGroup[index] = value1108 DartSequencerDescriptorGroup = property(get_DartSequencerDescriptorGroup, set_DartSequencerDescriptorGroup)1109 def copy(self):1110 obj_ = self.factory()1111 return(obj_.build(self.to_etree()))1112 def hasContent_(self):1113 if (1114 self.DartSequencerDescriptorGroup1115 ):1116 return True1117 else:1118 return False1119 def export(self, outfile, level, namespaceprefix_='', name_='_DartSequencerDescriptorEntries', namespacedef_='', pretty_print=True):1120 imported_ns_def_ = GenerateDSNamespaceDefs_.get('_DartSequencerDescriptorEntries')1121 if imported_ns_def_ is not None:1122 namespacedef_ = imported_ns_def_1123 if pretty_print:1124 eol_ = '\n'1125 else:1126 eol_ = ''1127 if self.original_tagname_ is not None:1128 name_ = self.original_tagname_1129 showIndent(outfile, level, pretty_print)1130 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1131 already_processed = set()1132 self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='_DartSequencerDescriptorEntries')1133 if self.hasContent_():1134 outfile.write('>%s' % (eol_, ))1135 self.exportChildren(outfile, level + 1, namespaceprefix_='', name_='_DartSequencerDescriptorEntries', pretty_print=pretty_print)1136 showIndent(outfile, level, pretty_print)1137 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1138 else:1139 outfile.write('/>%s' % (eol_, ))1140 def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='_DartSequencerDescriptorEntries'):1141 pass1142 def exportChildren(self, outfile, level, namespaceprefix_='', name_='_DartSequencerDescriptorEntries', fromsubclass_=False, pretty_print=True):1143 if pretty_print:1144 eol_ = '\n'1145 else:1146 eol_ = ''1147 for DartSequencerDescriptorGroup_ in self.DartSequencerDescriptorGroup:1148 DartSequencerDescriptorGroup_.export(outfile, level, namespaceprefix_, name_='DartSequencerDescriptorGroup', pretty_print=pretty_print)1149 def to_etree(self, parent_element=None, name_='_DartSequencerDescriptorEntries', mapping_=None):1150 if parent_element is None:1151 element = etree_.Element('{}' + name_)1152 else:1153 element = etree_.SubElement(parent_element, '{}' + name_)1154 for DartSequencerDescriptorGroup_ in self.DartSequencerDescriptorGroup:1155 DartSequencerDescriptorGroup_.to_etree(element, name_='DartSequencerDescriptorGroup', mapping_=mapping_)1156 if mapping_ is not None:1157 mapping_[id(self)] = element1158 return element1159 def exportLiteral(self, outfile, level, name_='_DartSequencerDescriptorEntries'):1160 level += 11161 already_processed = set()1162 self.exportLiteralAttributes(outfile, level, already_processed, name_)1163 if self.hasContent_():1164 self.exportLiteralChildren(outfile, level, name_)1165 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1166 pass1167 def exportLiteralChildren(self, outfile, level, name_):1168 showIndent(outfile, level)1169 outfile.write('DartSequencerDescriptorGroup=[\n')1170 level += 11171 for DartSequencerDescriptorGroup_ in self.DartSequencerDescriptorGroup:1172 showIndent(outfile, level)1173 outfile.write('model_._DartSequencerDescriptorGroup(\n')1174 DartSequencerDescriptorGroup_.exportLiteral(outfile, level, name_='_DartSequencerDescriptorGroup')1175 showIndent(outfile, level)1176 outfile.write('),\n')1177 level -= 11178 showIndent(outfile, level)1179 outfile.write('],\n')1180 def build(self, node):1181 already_processed = set()1182 self.buildAttributes(node, node.attrib, already_processed)1183 self.DartSequencerDescriptorGroup = []1184 for child in node:1185 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1186 self.buildChildren(child, node, nodeName_)1187 return self1188 def buildAttributes(self, node, attrs, already_processed):1189 pass1190 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):1191 if nodeName_ == 'DartSequencerDescriptorGroup':1192 obj_ = create_DartSequencerDescriptorGroup.factory()1193 obj_.build(child_)1194 self.add_DartSequencerDescriptorGroup(obj_)1195 obj_.original_tagname_ = 'DartSequencerDescriptorGroup'1196 1197 def to_string(self, pretty_print=True):1198 return etree_.tostring(self.to_etree(), pretty_print=pretty_print)1199 1200 1201 def path(self, index=True):1202 """1203 Get the dartnode path of the corenode1204 Parameters1205 ----------1206 corenode: object1207 a core object1208 1209 index: bool1210 1211 If True gets the dartnode path with index if list,1212 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction[0]'1213 1214 If False gets the dartnode path without index,1215 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction'1216 1217 Returns1218 -------1219 str1220 """1221 return get_path(self, index=index)1222 1223 1224 def findpaths(self, pat, case=False, regex=True):1225 return findpaths(self, pat=pat, case=case, regex=regex)1226 1227 1228 def subpaths(self):1229 return subpaths(self)1230 1231 def set_nodes(self, **kwargs):1232 return set_nodes(self, **kwargs)1233 # end class create_DartSequencerDescriptorEntries1234class create_DartSequencerPreferences(GeneratedsSuper):1235 member_data_items_ = [1236 MemberSpec_('atmosphereMaketLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1237 MemberSpec_('dartLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1238 MemberSpec_('deleteAll', 'xs:boolean', 0, 1, {'use': 'optional'}),1239 MemberSpec_('deleteAtmosphere', 'xs:boolean', 0, 1, {'use': 'optional'}),1240 MemberSpec_('deleteAtmosphereMaket', 'xs:boolean', 0, 1, {'use': 'optional'}),1241 MemberSpec_('deleteDartLut', 'xs:boolean', 0, 1, {'use': 'optional'}),1242 MemberSpec_('deleteDartSequenceur', 'xs:boolean', 0, 1, {'use': 'optional'}),1243 MemberSpec_('deleteDartTxt', 'xs:boolean', 0, 1, {'use': 'optional'}),1244 MemberSpec_('deleteDirection', 'xs:boolean', 0, 1, {'use': 'optional'}),1245 MemberSpec_('deleteInputs', 'xs:boolean', 0, 1, {'use': 'optional'}),1246 MemberSpec_('deleteLibPhase', 'xs:boolean', 0, 1, {'use': 'optional'}),1247 MemberSpec_('deleteMaket', 'xs:boolean', 0, 1, {'use': 'optional'}),1248 MemberSpec_('deleteMaketTreeResults', 'xs:boolean', 0, 1, {'use': 'optional'}),1249 MemberSpec_('deleteTreePosition', 'xs:boolean', 0, 1, {'use': 'optional'}),1250 MemberSpec_('deleteTriangles', 'xs:boolean', 0, 1, {'use': 'optional'}),1251 MemberSpec_('demGeneratorLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1252 MemberSpec_('directionLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1253 MemberSpec_('displayEnabled', 'xs:boolean', 0, 1, {'use': 'optional'}),1254 MemberSpec_('genMode', 'xs:string', 0, 1, {'use': 'optional'}),1255 MemberSpec_('hapkeLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1256 MemberSpec_('individualDisplayEnabled', 'xs:boolean', 0, 1, {'use': 'optional'}),1257 MemberSpec_('maketLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1258 MemberSpec_('numberParallelThreads', 'xs:unsignedByte', 0, 1, {'use': 'optional'}),1259 MemberSpec_('phaseLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1260 MemberSpec_('prospectLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1261 MemberSpec_('triangleFileProcessorLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1262 MemberSpec_('useBroadBand', 'xs:boolean', 0, 1, {'use': 'optional'}),1263 MemberSpec_('useSceneSpectra', 'xs:boolean', 0, 1, {'use': 'optional'}),1264 MemberSpec_('vegetationLaunched', 'xs:boolean', 0, 1, {'use': 'optional'}),1265 MemberSpec_('zippedResults', 'xs:boolean', 0, 1, {'use': 'optional'}),1266 ]1267 subclass = None1268 superclass = None1269 def __init__(self, atmosphereMaketLaunched=True, dartLaunched=True, deleteAll=False, deleteAtmosphere=False, deleteAtmosphereMaket=True, deleteDartLut=True, deleteDartSequenceur=True, deleteDartTxt=True, deleteDirection=False, deleteInputs=False, deleteLibPhase=True, deleteMaket=True, deleteMaketTreeResults=True, deleteTreePosition=True, deleteTriangles=True, demGeneratorLaunched=True, directionLaunched=True, displayEnabled=True, genMode='XML', hapkeLaunched=True, individualDisplayEnabled=False, maketLaunched=True, numberParallelThreads=4, phaseLaunched=True, prospectLaunched=False, triangleFileProcessorLaunched=True, useBroadBand=True, useSceneSpectra=True, vegetationLaunched=True, zippedResults=False):1270 self.original_tagname_ = None1271 self.troot=get_gs_troot('sequence','_DartSequencerPreferences')1272 self.attrib = ['atmosphereMaketLaunched', 'dartLaunched', 'deleteAll', 'deleteAtmosphere', 'deleteAtmosphereMaket', 'deleteDartLut', 'deleteDartSequenceur', 'deleteDartTxt', 'deleteDirection', 'deleteInputs', 'deleteLibPhase', 'deleteMaket', 'deleteMaketTreeResults', 'deleteTreePosition', 'deleteTriangles', 'demGeneratorLaunched', 'directionLaunched', 'displayEnabled', 'genMode', 'hapkeLaunched', 'individualDisplayEnabled', 'maketLaunched', 'numberParallelThreads', 'phaseLaunched', 'prospectLaunched', 'triangleFileProcessorLaunched', 'useBroadBand', 'useSceneSpectra', 'vegetationLaunched', 'zippedResults']1273 self.children = []1274 self.parent = None1275 self._atmosphereMaketLaunched = _cast(bool, atmosphereMaketLaunched)1276 self._dartLaunched = _cast(bool, dartLaunched)1277 self._deleteAll = _cast(bool, deleteAll)1278 self._deleteAtmosphere = _cast(bool, deleteAtmosphere)1279 self._deleteAtmosphereMaket = _cast(bool, deleteAtmosphereMaket)1280 self._deleteDartLut = _cast(bool, deleteDartLut)1281 self._deleteDartSequenceur = _cast(bool, deleteDartSequenceur)1282 self._deleteDartTxt = _cast(bool, deleteDartTxt)1283 self._deleteDirection = _cast(bool, deleteDirection)1284 self._deleteInputs = _cast(bool, deleteInputs)1285 self._deleteLibPhase = _cast(bool, deleteLibPhase)1286 self._deleteMaket = _cast(bool, deleteMaket)1287 self._deleteMaketTreeResults = _cast(bool, deleteMaketTreeResults)1288 self._deleteTreePosition = _cast(bool, deleteTreePosition)1289 self._deleteTriangles = _cast(bool, deleteTriangles)1290 self._demGeneratorLaunched = _cast(bool, demGeneratorLaunched)1291 self._directionLaunched = _cast(bool, directionLaunched)1292 self._displayEnabled = _cast(bool, displayEnabled)1293 self._genMode = _cast(None, genMode)1294 self._hapkeLaunched = _cast(bool, hapkeLaunched)1295 self._individualDisplayEnabled = _cast(bool, individualDisplayEnabled)1296 self._maketLaunched = _cast(bool, maketLaunched)1297 self._numberParallelThreads = _cast(int, numberParallelThreads)1298 self._phaseLaunched = _cast(bool, phaseLaunched)1299 self._prospectLaunched = _cast(bool, prospectLaunched)1300 self._triangleFileProcessorLaunched = _cast(bool, triangleFileProcessorLaunched)1301 self._useBroadBand = _cast(bool, useBroadBand)1302 self._useSceneSpectra = _cast(bool, useSceneSpectra)1303 self._vegetationLaunched = _cast(bool, vegetationLaunched)1304 self._zippedResults = _cast(bool, zippedResults)1305 update_node(self,self.troot,'sequence')1306 def factory(*args_, **kwargs_):1307 if CurrentSubclassModule_ is not None:1308 subclass = getSubclassFromModule_(1309 CurrentSubclassModule_, create_DartSequencerPreferences)1310 if subclass is not None:1311 return subclass(*args_, **kwargs_)1312 if create_DartSequencerPreferences.subclass:1313 return create_DartSequencerPreferences.subclass(*args_, **kwargs_)1314 else:1315 return create_DartSequencerPreferences(*args_, **kwargs_)1316 factory = staticmethod(factory)1317 def get_atmosphereMaketLaunched(self): return self._atmosphereMaketLaunched1318 def set_atmosphereMaketLaunched(self, value):1319 self._atmosphereMaketLaunched = value1320 update_node(self,self.troot,'sequence')1321 atmosphereMaketLaunched = property(get_atmosphereMaketLaunched, set_atmosphereMaketLaunched)1322 def get_dartLaunched(self): return self._dartLaunched1323 def set_dartLaunched(self, value):1324 self._dartLaunched = value1325 update_node(self,self.troot,'sequence')1326 dartLaunched = property(get_dartLaunched, set_dartLaunched)1327 def get_deleteAll(self): return self._deleteAll1328 def set_deleteAll(self, value):1329 self._deleteAll = value1330 update_node(self,self.troot,'sequence')1331 deleteAll = property(get_deleteAll, set_deleteAll)1332 def get_deleteAtmosphere(self): return self._deleteAtmosphere1333 def set_deleteAtmosphere(self, value):1334 self._deleteAtmosphere = value1335 update_node(self,self.troot,'sequence')1336 deleteAtmosphere = property(get_deleteAtmosphere, set_deleteAtmosphere)1337 def get_deleteAtmosphereMaket(self): return self._deleteAtmosphereMaket1338 def set_deleteAtmosphereMaket(self, value):1339 self._deleteAtmosphereMaket = value1340 update_node(self,self.troot,'sequence')1341 deleteAtmosphereMaket = property(get_deleteAtmosphereMaket, set_deleteAtmosphereMaket)1342 def get_deleteDartLut(self): return self._deleteDartLut1343 def set_deleteDartLut(self, value):1344 self._deleteDartLut = value1345 update_node(self,self.troot,'sequence')1346 deleteDartLut = property(get_deleteDartLut, set_deleteDartLut)1347 def get_deleteDartSequenceur(self): return self._deleteDartSequenceur1348 def set_deleteDartSequenceur(self, value):1349 self._deleteDartSequenceur = value1350 update_node(self,self.troot,'sequence')1351 deleteDartSequenceur = property(get_deleteDartSequenceur, set_deleteDartSequenceur)1352 def get_deleteDartTxt(self): return self._deleteDartTxt1353 def set_deleteDartTxt(self, value):1354 self._deleteDartTxt = value1355 update_node(self,self.troot,'sequence')1356 deleteDartTxt = property(get_deleteDartTxt, set_deleteDartTxt)1357 def get_deleteDirection(self): return self._deleteDirection1358 def set_deleteDirection(self, value):1359 self._deleteDirection = value1360 update_node(self,self.troot,'sequence')1361 deleteDirection = property(get_deleteDirection, set_deleteDirection)1362 def get_deleteInputs(self): return self._deleteInputs1363 def set_deleteInputs(self, value):1364 self._deleteInputs = value1365 update_node(self,self.troot,'sequence')1366 deleteInputs = property(get_deleteInputs, set_deleteInputs)1367 def get_deleteLibPhase(self): return self._deleteLibPhase1368 def set_deleteLibPhase(self, value):1369 self._deleteLibPhase = value1370 update_node(self,self.troot,'sequence')1371 deleteLibPhase = property(get_deleteLibPhase, set_deleteLibPhase)1372 def get_deleteMaket(self): return self._deleteMaket1373 def set_deleteMaket(self, value):1374 self._deleteMaket = value1375 update_node(self,self.troot,'sequence')1376 deleteMaket = property(get_deleteMaket, set_deleteMaket)1377 def get_deleteMaketTreeResults(self): return self._deleteMaketTreeResults1378 def set_deleteMaketTreeResults(self, value):1379 self._deleteMaketTreeResults = value1380 update_node(self,self.troot,'sequence')1381 deleteMaketTreeResults = property(get_deleteMaketTreeResults, set_deleteMaketTreeResults)1382 def get_deleteTreePosition(self): return self._deleteTreePosition1383 def set_deleteTreePosition(self, value):1384 self._deleteTreePosition = value1385 update_node(self,self.troot,'sequence')1386 deleteTreePosition = property(get_deleteTreePosition, set_deleteTreePosition)1387 def get_deleteTriangles(self): return self._deleteTriangles1388 def set_deleteTriangles(self, value):1389 self._deleteTriangles = value1390 update_node(self,self.troot,'sequence')1391 deleteTriangles = property(get_deleteTriangles, set_deleteTriangles)1392 def get_demGeneratorLaunched(self): return self._demGeneratorLaunched1393 def set_demGeneratorLaunched(self, value):1394 self._demGeneratorLaunched = value1395 update_node(self,self.troot,'sequence')1396 demGeneratorLaunched = property(get_demGeneratorLaunched, set_demGeneratorLaunched)1397 def get_directionLaunched(self): return self._directionLaunched1398 def set_directionLaunched(self, value):1399 self._directionLaunched = value1400 update_node(self,self.troot,'sequence')1401 directionLaunched = property(get_directionLaunched, set_directionLaunched)1402 def get_displayEnabled(self): return self._displayEnabled1403 def set_displayEnabled(self, value):1404 self._displayEnabled = value1405 update_node(self,self.troot,'sequence')1406 displayEnabled = property(get_displayEnabled, set_displayEnabled)1407 def get_genMode(self): return self._genMode1408 def set_genMode(self, value):1409 self._genMode = value1410 update_node(self,self.troot,'sequence')1411 genMode = property(get_genMode, set_genMode)1412 def get_hapkeLaunched(self): return self._hapkeLaunched1413 def set_hapkeLaunched(self, value):1414 self._hapkeLaunched = value1415 update_node(self,self.troot,'sequence')1416 hapkeLaunched = property(get_hapkeLaunched, set_hapkeLaunched)1417 def get_individualDisplayEnabled(self): return self._individualDisplayEnabled1418 def set_individualDisplayEnabled(self, value):1419 self._individualDisplayEnabled = value1420 update_node(self,self.troot,'sequence')1421 individualDisplayEnabled = property(get_individualDisplayEnabled, set_individualDisplayEnabled)1422 def get_maketLaunched(self): return self._maketLaunched1423 def set_maketLaunched(self, value):1424 self._maketLaunched = value1425 update_node(self,self.troot,'sequence')1426 maketLaunched = property(get_maketLaunched, set_maketLaunched)1427 def get_numberParallelThreads(self): return self._numberParallelThreads1428 def set_numberParallelThreads(self, value):1429 self._numberParallelThreads = value1430 update_node(self,self.troot,'sequence')1431 numberParallelThreads = property(get_numberParallelThreads, set_numberParallelThreads)1432 def get_phaseLaunched(self): return self._phaseLaunched1433 def set_phaseLaunched(self, value):1434 self._phaseLaunched = value1435 update_node(self,self.troot,'sequence')1436 phaseLaunched = property(get_phaseLaunched, set_phaseLaunched)1437 def get_prospectLaunched(self): return self._prospectLaunched1438 def set_prospectLaunched(self, value):1439 self._prospectLaunched = value1440 update_node(self,self.troot,'sequence')1441 prospectLaunched = property(get_prospectLaunched, set_prospectLaunched)1442 def get_triangleFileProcessorLaunched(self): return self._triangleFileProcessorLaunched1443 def set_triangleFileProcessorLaunched(self, value):1444 self._triangleFileProcessorLaunched = value1445 update_node(self,self.troot,'sequence')1446 triangleFileProcessorLaunched = property(get_triangleFileProcessorLaunched, set_triangleFileProcessorLaunched)1447 def get_useBroadBand(self): return self._useBroadBand1448 def set_useBroadBand(self, value):1449 self._useBroadBand = value1450 update_node(self,self.troot,'sequence')1451 useBroadBand = property(get_useBroadBand, set_useBroadBand)1452 def get_useSceneSpectra(self): return self._useSceneSpectra1453 def set_useSceneSpectra(self, value):1454 self._useSceneSpectra = value1455 update_node(self,self.troot,'sequence')1456 useSceneSpectra = property(get_useSceneSpectra, set_useSceneSpectra)1457 def get_vegetationLaunched(self): return self._vegetationLaunched1458 def set_vegetationLaunched(self, value):1459 self._vegetationLaunched = value1460 update_node(self,self.troot,'sequence')1461 vegetationLaunched = property(get_vegetationLaunched, set_vegetationLaunched)1462 def get_zippedResults(self): return self._zippedResults1463 def set_zippedResults(self, value):1464 self._zippedResults = value1465 update_node(self,self.troot,'sequence')1466 zippedResults = property(get_zippedResults, set_zippedResults)1467 def copy(self):1468 obj_ = self.factory()1469 return(obj_.build(self.to_etree()))1470 def hasContent_(self):1471 if (1472 ):1473 return True1474 else:1475 return False1476 def export(self, outfile, level, namespaceprefix_='', name_='_DartSequencerPreferences', namespacedef_='', pretty_print=True):1477 imported_ns_def_ = GenerateDSNamespaceDefs_.get('_DartSequencerPreferences')1478 if imported_ns_def_ is not None:1479 namespacedef_ = imported_ns_def_1480 if pretty_print:1481 eol_ = '\n'1482 else:1483 eol_ = ''1484 if self.original_tagname_ is not None:1485 name_ = self.original_tagname_1486 showIndent(outfile, level, pretty_print)1487 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1488 already_processed = set()1489 self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='_DartSequencerPreferences')1490 if self.hasContent_():1491 outfile.write('>%s' % (eol_, ))1492 self.exportChildren(outfile, level + 1, namespaceprefix_='', name_='_DartSequencerPreferences', pretty_print=pretty_print)1493 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))1494 else:1495 outfile.write('/>%s' % (eol_, ))1496 def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='_DartSequencerPreferences'):1497 if self.atmosphereMaketLaunched is not None and 'atmosphereMaketLaunched' not in already_processed:1498 already_processed.add('atmosphereMaketLaunched')1499 outfile.write(' atmosphereMaketLaunched="%s"' % self.gds_format_boolean(self.atmosphereMaketLaunched, input_name='atmosphereMaketLaunched'))1500 if self.dartLaunched is not None and 'dartLaunched' not in already_processed:1501 already_processed.add('dartLaunched')1502 outfile.write(' dartLaunched="%s"' % self.gds_format_boolean(self.dartLaunched, input_name='dartLaunched'))1503 if self.deleteAll is not None and 'deleteAll' not in already_processed:1504 already_processed.add('deleteAll')1505 outfile.write(' deleteAll="%s"' % self.gds_format_boolean(self.deleteAll, input_name='deleteAll'))1506 if self.deleteAtmosphere is not None and 'deleteAtmosphere' not in already_processed:1507 already_processed.add('deleteAtmosphere')1508 outfile.write(' deleteAtmosphere="%s"' % self.gds_format_boolean(self.deleteAtmosphere, input_name='deleteAtmosphere'))1509 if self.deleteAtmosphereMaket is not None and 'deleteAtmosphereMaket' not in already_processed:1510 already_processed.add('deleteAtmosphereMaket')1511 outfile.write(' deleteAtmosphereMaket="%s"' % self.gds_format_boolean(self.deleteAtmosphereMaket, input_name='deleteAtmosphereMaket'))1512 if self.deleteDartLut is not None and 'deleteDartLut' not in already_processed:1513 already_processed.add('deleteDartLut')1514 outfile.write(' deleteDartLut="%s"' % self.gds_format_boolean(self.deleteDartLut, input_name='deleteDartLut'))1515 if self.deleteDartSequenceur is not None and 'deleteDartSequenceur' not in already_processed:1516 already_processed.add('deleteDartSequenceur')1517 outfile.write(' deleteDartSequenceur="%s"' % self.gds_format_boolean(self.deleteDartSequenceur, input_name='deleteDartSequenceur'))1518 if self.deleteDartTxt is not None and 'deleteDartTxt' not in already_processed:1519 already_processed.add('deleteDartTxt')1520 outfile.write(' deleteDartTxt="%s"' % self.gds_format_boolean(self.deleteDartTxt, input_name='deleteDartTxt'))1521 if self.deleteDirection is not None and 'deleteDirection' not in already_processed:1522 already_processed.add('deleteDirection')1523 outfile.write(' deleteDirection="%s"' % self.gds_format_boolean(self.deleteDirection, input_name='deleteDirection'))1524 if self.deleteInputs is not None and 'deleteInputs' not in already_processed:1525 already_processed.add('deleteInputs')1526 outfile.write(' deleteInputs="%s"' % self.gds_format_boolean(self.deleteInputs, input_name='deleteInputs'))1527 if self.deleteLibPhase is not None and 'deleteLibPhase' not in already_processed:1528 already_processed.add('deleteLibPhase')1529 outfile.write(' deleteLibPhase="%s"' % self.gds_format_boolean(self.deleteLibPhase, input_name='deleteLibPhase'))1530 if self.deleteMaket is not None and 'deleteMaket' not in already_processed:1531 already_processed.add('deleteMaket')1532 outfile.write(' deleteMaket="%s"' % self.gds_format_boolean(self.deleteMaket, input_name='deleteMaket'))1533 if self.deleteMaketTreeResults is not None and 'deleteMaketTreeResults' not in already_processed:1534 already_processed.add('deleteMaketTreeResults')1535 outfile.write(' deleteMaketTreeResults="%s"' % self.gds_format_boolean(self.deleteMaketTreeResults, input_name='deleteMaketTreeResults'))1536 if self.deleteTreePosition is not None and 'deleteTreePosition' not in already_processed:1537 already_processed.add('deleteTreePosition')1538 outfile.write(' deleteTreePosition="%s"' % self.gds_format_boolean(self.deleteTreePosition, input_name='deleteTreePosition'))1539 if self.deleteTriangles is not None and 'deleteTriangles' not in already_processed:1540 already_processed.add('deleteTriangles')1541 outfile.write(' deleteTriangles="%s"' % self.gds_format_boolean(self.deleteTriangles, input_name='deleteTriangles'))1542 if self.demGeneratorLaunched is not None and 'demGeneratorLaunched' not in already_processed:1543 already_processed.add('demGeneratorLaunched')1544 outfile.write(' demGeneratorLaunched="%s"' % self.gds_format_boolean(self.demGeneratorLaunched, input_name='demGeneratorLaunched'))1545 if self.directionLaunched is not None and 'directionLaunched' not in already_processed:1546 already_processed.add('directionLaunched')1547 outfile.write(' directionLaunched="%s"' % self.gds_format_boolean(self.directionLaunched, input_name='directionLaunched'))1548 if self.displayEnabled is not None and 'displayEnabled' not in already_processed:1549 already_processed.add('displayEnabled')1550 outfile.write(' displayEnabled="%s"' % self.gds_format_boolean(self.displayEnabled, input_name='displayEnabled'))1551 if self.genMode is not None and 'genMode' not in already_processed:1552 already_processed.add('genMode')1553 outfile.write(' genMode=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.genMode), input_name='genMode')), ))1554 if self.hapkeLaunched is not None and 'hapkeLaunched' not in already_processed:1555 already_processed.add('hapkeLaunched')1556 outfile.write(' hapkeLaunched="%s"' % self.gds_format_boolean(self.hapkeLaunched, input_name='hapkeLaunched'))1557 if self.individualDisplayEnabled is not None and 'individualDisplayEnabled' not in already_processed:1558 already_processed.add('individualDisplayEnabled')1559 outfile.write(' individualDisplayEnabled="%s"' % self.gds_format_boolean(self.individualDisplayEnabled, input_name='individualDisplayEnabled'))1560 if self.maketLaunched is not None and 'maketLaunched' not in already_processed:1561 already_processed.add('maketLaunched')1562 outfile.write(' maketLaunched="%s"' % self.gds_format_boolean(self.maketLaunched, input_name='maketLaunched'))1563 if self.numberParallelThreads is not None and 'numberParallelThreads' not in already_processed:1564 already_processed.add('numberParallelThreads')1565 outfile.write(' numberParallelThreads="%s"' % self.gds_format_integer(self.numberParallelThreads, input_name='numberParallelThreads'))1566 if self.phaseLaunched is not None and 'phaseLaunched' not in already_processed:1567 already_processed.add('phaseLaunched')1568 outfile.write(' phaseLaunched="%s"' % self.gds_format_boolean(self.phaseLaunched, input_name='phaseLaunched'))1569 if self.prospectLaunched is not None and 'prospectLaunched' not in already_processed:1570 already_processed.add('prospectLaunched')1571 outfile.write(' prospectLaunched="%s"' % self.gds_format_boolean(self.prospectLaunched, input_name='prospectLaunched'))1572 if self.triangleFileProcessorLaunched is not None and 'triangleFileProcessorLaunched' not in already_processed:1573 already_processed.add('triangleFileProcessorLaunched')1574 outfile.write(' triangleFileProcessorLaunched="%s"' % self.gds_format_boolean(self.triangleFileProcessorLaunched, input_name='triangleFileProcessorLaunched'))1575 if self.useBroadBand is not None and 'useBroadBand' not in already_processed:1576 already_processed.add('useBroadBand')1577 outfile.write(' useBroadBand="%s"' % self.gds_format_boolean(self.useBroadBand, input_name='useBroadBand'))1578 if self.useSceneSpectra is not None and 'useSceneSpectra' not in already_processed:1579 already_processed.add('useSceneSpectra')1580 outfile.write(' useSceneSpectra="%s"' % self.gds_format_boolean(self.useSceneSpectra, input_name='useSceneSpectra'))1581 if self.vegetationLaunched is not None and 'vegetationLaunched' not in already_processed:1582 already_processed.add('vegetationLaunched')1583 outfile.write(' vegetationLaunched="%s"' % self.gds_format_boolean(self.vegetationLaunched, input_name='vegetationLaunched'))1584 if self.zippedResults is not None and 'zippedResults' not in already_processed:1585 already_processed.add('zippedResults')1586 outfile.write(' zippedResults="%s"' % self.gds_format_boolean(self.zippedResults, input_name='zippedResults'))1587 def exportChildren(self, outfile, level, namespaceprefix_='', name_='_DartSequencerPreferences', fromsubclass_=False, pretty_print=True):1588 pass1589 def to_etree(self, parent_element=None, name_='_DartSequencerPreferences', mapping_=None):1590 if parent_element is None:1591 element = etree_.Element('{}' + name_)1592 else:1593 element = etree_.SubElement(parent_element, '{}' + name_)1594 if self.atmosphereMaketLaunched is not None:1595 element.set('atmosphereMaketLaunched', self.gds_format_boolean(self.atmosphereMaketLaunched))1596 if self.dartLaunched is not None:1597 element.set('dartLaunched', self.gds_format_boolean(self.dartLaunched))1598 if self.deleteAll is not None:1599 element.set('deleteAll', self.gds_format_boolean(self.deleteAll))1600 if self.deleteAtmosphere is not None:1601 element.set('deleteAtmosphere', self.gds_format_boolean(self.deleteAtmosphere))1602 if self.deleteAtmosphereMaket is not None:1603 element.set('deleteAtmosphereMaket', self.gds_format_boolean(self.deleteAtmosphereMaket))1604 if self.deleteDartLut is not None:1605 element.set('deleteDartLut', self.gds_format_boolean(self.deleteDartLut))1606 if self.deleteDartSequenceur is not None:1607 element.set('deleteDartSequenceur', self.gds_format_boolean(self.deleteDartSequenceur))1608 if self.deleteDartTxt is not None:1609 element.set('deleteDartTxt', self.gds_format_boolean(self.deleteDartTxt))1610 if self.deleteDirection is not None:1611 element.set('deleteDirection', self.gds_format_boolean(self.deleteDirection))1612 if self.deleteInputs is not None:1613 element.set('deleteInputs', self.gds_format_boolean(self.deleteInputs))1614 if self.deleteLibPhase is not None:1615 element.set('deleteLibPhase', self.gds_format_boolean(self.deleteLibPhase))1616 if self.deleteMaket is not None:1617 element.set('deleteMaket', self.gds_format_boolean(self.deleteMaket))1618 if self.deleteMaketTreeResults is not None:1619 element.set('deleteMaketTreeResults', self.gds_format_boolean(self.deleteMaketTreeResults))1620 if self.deleteTreePosition is not None:1621 element.set('deleteTreePosition', self.gds_format_boolean(self.deleteTreePosition))1622 if self.deleteTriangles is not None:1623 element.set('deleteTriangles', self.gds_format_boolean(self.deleteTriangles))1624 if self.demGeneratorLaunched is not None:1625 element.set('demGeneratorLaunched', self.gds_format_boolean(self.demGeneratorLaunched))1626 if self.directionLaunched is not None:1627 element.set('directionLaunched', self.gds_format_boolean(self.directionLaunched))1628 if self.displayEnabled is not None:1629 element.set('displayEnabled', self.gds_format_boolean(self.displayEnabled))1630 if self.genMode is not None:1631 element.set('genMode', self.gds_format_string(self.genMode))1632 if self.hapkeLaunched is not None:1633 element.set('hapkeLaunched', self.gds_format_boolean(self.hapkeLaunched))1634 if self.individualDisplayEnabled is not None:1635 element.set('individualDisplayEnabled', self.gds_format_boolean(self.individualDisplayEnabled))1636 if self.maketLaunched is not None:1637 element.set('maketLaunched', self.gds_format_boolean(self.maketLaunched))1638 if self.numberParallelThreads is not None:1639 element.set('numberParallelThreads', self.gds_format_integer(self.numberParallelThreads))1640 if self.phaseLaunched is not None:1641 element.set('phaseLaunched', self.gds_format_boolean(self.phaseLaunched))1642 if self.prospectLaunched is not None:1643 element.set('prospectLaunched', self.gds_format_boolean(self.prospectLaunched))1644 if self.triangleFileProcessorLaunched is not None:1645 element.set('triangleFileProcessorLaunched', self.gds_format_boolean(self.triangleFileProcessorLaunched))1646 if self.useBroadBand is not None:1647 element.set('useBroadBand', self.gds_format_boolean(self.useBroadBand))1648 if self.useSceneSpectra is not None:1649 element.set('useSceneSpectra', self.gds_format_boolean(self.useSceneSpectra))1650 if self.vegetationLaunched is not None:1651 element.set('vegetationLaunched', self.gds_format_boolean(self.vegetationLaunched))1652 if self.zippedResults is not None:1653 element.set('zippedResults', self.gds_format_boolean(self.zippedResults))1654 if mapping_ is not None:1655 mapping_[id(self)] = element1656 return element1657 def exportLiteral(self, outfile, level, name_='_DartSequencerPreferences'):1658 level += 11659 already_processed = set()1660 self.exportLiteralAttributes(outfile, level, already_processed, name_)1661 if self.hasContent_():1662 self.exportLiteralChildren(outfile, level, name_)1663 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1664 if self.atmosphereMaketLaunched is not None and 'atmosphereMaketLaunched' not in already_processed:1665 already_processed.add('atmosphereMaketLaunched')1666 showIndent(outfile, level)1667 outfile.write('atmosphereMaketLaunched=%s,\n' % (self.atmosphereMaketLaunched,))1668 if self.dartLaunched is not None and 'dartLaunched' not in already_processed:1669 already_processed.add('dartLaunched')1670 showIndent(outfile, level)1671 outfile.write('dartLaunched=%s,\n' % (self.dartLaunched,))1672 if self.deleteAll is not None and 'deleteAll' not in already_processed:1673 already_processed.add('deleteAll')1674 showIndent(outfile, level)1675 outfile.write('deleteAll=%s,\n' % (self.deleteAll,))1676 if self.deleteAtmosphere is not None and 'deleteAtmosphere' not in already_processed:1677 already_processed.add('deleteAtmosphere')1678 showIndent(outfile, level)1679 outfile.write('deleteAtmosphere=%s,\n' % (self.deleteAtmosphere,))1680 if self.deleteAtmosphereMaket is not None and 'deleteAtmosphereMaket' not in already_processed:1681 already_processed.add('deleteAtmosphereMaket')1682 showIndent(outfile, level)1683 outfile.write('deleteAtmosphereMaket=%s,\n' % (self.deleteAtmosphereMaket,))1684 if self.deleteDartLut is not None and 'deleteDartLut' not in already_processed:1685 already_processed.add('deleteDartLut')1686 showIndent(outfile, level)1687 outfile.write('deleteDartLut=%s,\n' % (self.deleteDartLut,))1688 if self.deleteDartSequenceur is not None and 'deleteDartSequenceur' not in already_processed:1689 already_processed.add('deleteDartSequenceur')1690 showIndent(outfile, level)1691 outfile.write('deleteDartSequenceur=%s,\n' % (self.deleteDartSequenceur,))1692 if self.deleteDartTxt is not None and 'deleteDartTxt' not in already_processed:1693 already_processed.add('deleteDartTxt')1694 showIndent(outfile, level)1695 outfile.write('deleteDartTxt=%s,\n' % (self.deleteDartTxt,))1696 if self.deleteDirection is not None and 'deleteDirection' not in already_processed:1697 already_processed.add('deleteDirection')1698 showIndent(outfile, level)1699 outfile.write('deleteDirection=%s,\n' % (self.deleteDirection,))1700 if self.deleteInputs is not None and 'deleteInputs' not in already_processed:1701 already_processed.add('deleteInputs')1702 showIndent(outfile, level)1703 outfile.write('deleteInputs=%s,\n' % (self.deleteInputs,))1704 if self.deleteLibPhase is not None and 'deleteLibPhase' not in already_processed:1705 already_processed.add('deleteLibPhase')1706 showIndent(outfile, level)1707 outfile.write('deleteLibPhase=%s,\n' % (self.deleteLibPhase,))1708 if self.deleteMaket is not None and 'deleteMaket' not in already_processed:1709 already_processed.add('deleteMaket')1710 showIndent(outfile, level)1711 outfile.write('deleteMaket=%s,\n' % (self.deleteMaket,))1712 if self.deleteMaketTreeResults is not None and 'deleteMaketTreeResults' not in already_processed:1713 already_processed.add('deleteMaketTreeResults')1714 showIndent(outfile, level)1715 outfile.write('deleteMaketTreeResults=%s,\n' % (self.deleteMaketTreeResults,))1716 if self.deleteTreePosition is not None and 'deleteTreePosition' not in already_processed:1717 already_processed.add('deleteTreePosition')1718 showIndent(outfile, level)1719 outfile.write('deleteTreePosition=%s,\n' % (self.deleteTreePosition,))1720 if self.deleteTriangles is not None and 'deleteTriangles' not in already_processed:1721 already_processed.add('deleteTriangles')1722 showIndent(outfile, level)1723 outfile.write('deleteTriangles=%s,\n' % (self.deleteTriangles,))1724 if self.demGeneratorLaunched is not None and 'demGeneratorLaunched' not in already_processed:1725 already_processed.add('demGeneratorLaunched')1726 showIndent(outfile, level)1727 outfile.write('demGeneratorLaunched=%s,\n' % (self.demGeneratorLaunched,))1728 if self.directionLaunched is not None and 'directionLaunched' not in already_processed:1729 already_processed.add('directionLaunched')1730 showIndent(outfile, level)1731 outfile.write('directionLaunched=%s,\n' % (self.directionLaunched,))1732 if self.displayEnabled is not None and 'displayEnabled' not in already_processed:1733 already_processed.add('displayEnabled')1734 showIndent(outfile, level)1735 outfile.write('displayEnabled=%s,\n' % (self.displayEnabled,))1736 if self.genMode is not None and 'genMode' not in already_processed:1737 already_processed.add('genMode')1738 showIndent(outfile, level)1739 outfile.write('genMode="%s",\n' % (self.genMode,))1740 if self.hapkeLaunched is not None and 'hapkeLaunched' not in already_processed:1741 already_processed.add('hapkeLaunched')1742 showIndent(outfile, level)1743 outfile.write('hapkeLaunched=%s,\n' % (self.hapkeLaunched,))1744 if self.individualDisplayEnabled is not None and 'individualDisplayEnabled' not in already_processed:1745 already_processed.add('individualDisplayEnabled')1746 showIndent(outfile, level)1747 outfile.write('individualDisplayEnabled=%s,\n' % (self.individualDisplayEnabled,))1748 if self.maketLaunched is not None and 'maketLaunched' not in already_processed:1749 already_processed.add('maketLaunched')1750 showIndent(outfile, level)1751 outfile.write('maketLaunched=%s,\n' % (self.maketLaunched,))1752 if self.numberParallelThreads is not None and 'numberParallelThreads' not in already_processed:1753 already_processed.add('numberParallelThreads')1754 showIndent(outfile, level)1755 outfile.write('numberParallelThreads=%d,\n' % (self.numberParallelThreads,))1756 if self.phaseLaunched is not None and 'phaseLaunched' not in already_processed:1757 already_processed.add('phaseLaunched')1758 showIndent(outfile, level)1759 outfile.write('phaseLaunched=%s,\n' % (self.phaseLaunched,))1760 if self.prospectLaunched is not None and 'prospectLaunched' not in already_processed:1761 already_processed.add('prospectLaunched')1762 showIndent(outfile, level)1763 outfile.write('prospectLaunched=%s,\n' % (self.prospectLaunched,))1764 if self.triangleFileProcessorLaunched is not None and 'triangleFileProcessorLaunched' not in already_processed:1765 already_processed.add('triangleFileProcessorLaunched')1766 showIndent(outfile, level)1767 outfile.write('triangleFileProcessorLaunched=%s,\n' % (self.triangleFileProcessorLaunched,))1768 if self.useBroadBand is not None and 'useBroadBand' not in already_processed:1769 already_processed.add('useBroadBand')1770 showIndent(outfile, level)1771 outfile.write('useBroadBand=%s,\n' % (self.useBroadBand,))1772 if self.useSceneSpectra is not None and 'useSceneSpectra' not in already_processed:1773 already_processed.add('useSceneSpectra')1774 showIndent(outfile, level)1775 outfile.write('useSceneSpectra=%s,\n' % (self.useSceneSpectra,))1776 if self.vegetationLaunched is not None and 'vegetationLaunched' not in already_processed:1777 already_processed.add('vegetationLaunched')1778 showIndent(outfile, level)1779 outfile.write('vegetationLaunched=%s,\n' % (self.vegetationLaunched,))1780 if self.zippedResults is not None and 'zippedResults' not in already_processed:1781 already_processed.add('zippedResults')1782 showIndent(outfile, level)1783 outfile.write('zippedResults=%s,\n' % (self.zippedResults,))1784 def exportLiteralChildren(self, outfile, level, name_):1785 pass1786 def build(self, node):1787 already_processed = set()1788 self.buildAttributes(node, node.attrib, already_processed)1789 for child in node:1790 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1791 self.buildChildren(child, node, nodeName_)1792 return self1793 def buildAttributes(self, node, attrs, already_processed):1794 value = find_attr_value_('atmosphereMaketLaunched', node)1795 if value is not None and 'atmosphereMaketLaunched' not in already_processed:1796 already_processed.add('atmosphereMaketLaunched')1797 if value in ('true', '1'):1798 self.atmosphereMaketLaunched = True1799 elif value in ('false', '0'):1800 self.atmosphereMaketLaunched = False1801 else:1802 raise_parse_error(node, 'Bad boolean attribute')1803 value = find_attr_value_('dartLaunched', node)1804 if value is not None and 'dartLaunched' not in already_processed:1805 already_processed.add('dartLaunched')1806 if value in ('true', '1'):1807 self.dartLaunched = True1808 elif value in ('false', '0'):1809 self.dartLaunched = False1810 else:1811 raise_parse_error(node, 'Bad boolean attribute')1812 value = find_attr_value_('deleteAll', node)1813 if value is not None and 'deleteAll' not in already_processed:1814 already_processed.add('deleteAll')1815 if value in ('true', '1'):1816 self.deleteAll = True1817 elif value in ('false', '0'):1818 self.deleteAll = False1819 else:1820 raise_parse_error(node, 'Bad boolean attribute')1821 value = find_attr_value_('deleteAtmosphere', node)1822 if value is not None and 'deleteAtmosphere' not in already_processed:1823 already_processed.add('deleteAtmosphere')1824 if value in ('true', '1'):1825 self.deleteAtmosphere = True1826 elif value in ('false', '0'):1827 self.deleteAtmosphere = False1828 else:1829 raise_parse_error(node, 'Bad boolean attribute')1830 value = find_attr_value_('deleteAtmosphereMaket', node)1831 if value is not None and 'deleteAtmosphereMaket' not in already_processed:1832 already_processed.add('deleteAtmosphereMaket')1833 if value in ('true', '1'):1834 self.deleteAtmosphereMaket = True1835 elif value in ('false', '0'):1836 self.deleteAtmosphereMaket = False1837 else:1838 raise_parse_error(node, 'Bad boolean attribute')1839 value = find_attr_value_('deleteDartLut', node)1840 if value is not None and 'deleteDartLut' not in already_processed:1841 already_processed.add('deleteDartLut')1842 if value in ('true', '1'):1843 self.deleteDartLut = True1844 elif value in ('false', '0'):1845 self.deleteDartLut = False1846 else:1847 raise_parse_error(node, 'Bad boolean attribute')1848 value = find_attr_value_('deleteDartSequenceur', node)1849 if value is not None and 'deleteDartSequenceur' not in already_processed:1850 already_processed.add('deleteDartSequenceur')1851 if value in ('true', '1'):1852 self.deleteDartSequenceur = True1853 elif value in ('false', '0'):1854 self.deleteDartSequenceur = False1855 else:1856 raise_parse_error(node, 'Bad boolean attribute')1857 value = find_attr_value_('deleteDartTxt', node)1858 if value is not None and 'deleteDartTxt' not in already_processed:1859 already_processed.add('deleteDartTxt')1860 if value in ('true', '1'):1861 self.deleteDartTxt = True1862 elif value in ('false', '0'):1863 self.deleteDartTxt = False1864 else:1865 raise_parse_error(node, 'Bad boolean attribute')1866 value = find_attr_value_('deleteDirection', node)1867 if value is not None and 'deleteDirection' not in already_processed:1868 already_processed.add('deleteDirection')1869 if value in ('true', '1'):1870 self.deleteDirection = True1871 elif value in ('false', '0'):1872 self.deleteDirection = False1873 else:1874 raise_parse_error(node, 'Bad boolean attribute')1875 value = find_attr_value_('deleteInputs', node)1876 if value is not None and 'deleteInputs' not in already_processed:1877 already_processed.add('deleteInputs')1878 if value in ('true', '1'):1879 self.deleteInputs = True1880 elif value in ('false', '0'):1881 self.deleteInputs = False1882 else:1883 raise_parse_error(node, 'Bad boolean attribute')1884 value = find_attr_value_('deleteLibPhase', node)1885 if value is not None and 'deleteLibPhase' not in already_processed:1886 already_processed.add('deleteLibPhase')1887 if value in ('true', '1'):1888 self.deleteLibPhase = True1889 elif value in ('false', '0'):1890 self.deleteLibPhase = False1891 else:1892 raise_parse_error(node, 'Bad boolean attribute')1893 value = find_attr_value_('deleteMaket', node)1894 if value is not None and 'deleteMaket' not in already_processed:1895 already_processed.add('deleteMaket')1896 if value in ('true', '1'):1897 self.deleteMaket = True1898 elif value in ('false', '0'):1899 self.deleteMaket = False1900 else:1901 raise_parse_error(node, 'Bad boolean attribute')1902 value = find_attr_value_('deleteMaketTreeResults', node)1903 if value is not None and 'deleteMaketTreeResults' not in already_processed:1904 already_processed.add('deleteMaketTreeResults')1905 if value in ('true', '1'):1906 self.deleteMaketTreeResults = True1907 elif value in ('false', '0'):1908 self.deleteMaketTreeResults = False1909 else:1910 raise_parse_error(node, 'Bad boolean attribute')1911 value = find_attr_value_('deleteTreePosition', node)1912 if value is not None and 'deleteTreePosition' not in already_processed:1913 already_processed.add('deleteTreePosition')1914 if value in ('true', '1'):1915 self.deleteTreePosition = True1916 elif value in ('false', '0'):1917 self.deleteTreePosition = False1918 else:1919 raise_parse_error(node, 'Bad boolean attribute')1920 value = find_attr_value_('deleteTriangles', node)1921 if value is not None and 'deleteTriangles' not in already_processed:1922 already_processed.add('deleteTriangles')1923 if value in ('true', '1'):1924 self.deleteTriangles = True1925 elif value in ('false', '0'):1926 self.deleteTriangles = False1927 else:1928 raise_parse_error(node, 'Bad boolean attribute')1929 value = find_attr_value_('demGeneratorLaunched', node)1930 if value is not None and 'demGeneratorLaunched' not in already_processed:1931 already_processed.add('demGeneratorLaunched')1932 if value in ('true', '1'):1933 self.demGeneratorLaunched = True1934 elif value in ('false', '0'):1935 self.demGeneratorLaunched = False1936 else:1937 raise_parse_error(node, 'Bad boolean attribute')1938 value = find_attr_value_('directionLaunched', node)1939 if value is not None and 'directionLaunched' not in already_processed:1940 already_processed.add('directionLaunched')1941 if value in ('true', '1'):1942 self.directionLaunched = True1943 elif value in ('false', '0'):1944 self.directionLaunched = False1945 else:1946 raise_parse_error(node, 'Bad boolean attribute')1947 value = find_attr_value_('displayEnabled', node)1948 if value is not None and 'displayEnabled' not in already_processed:1949 already_processed.add('displayEnabled')1950 if value in ('true', '1'):1951 self.displayEnabled = True1952 elif value in ('false', '0'):1953 self.displayEnabled = False1954 else:1955 raise_parse_error(node, 'Bad boolean attribute')1956 value = find_attr_value_('genMode', node)1957 if value is not None and 'genMode' not in already_processed:1958 already_processed.add('genMode')1959 self.genMode = value1960 value = find_attr_value_('hapkeLaunched', node)1961 if value is not None and 'hapkeLaunched' not in already_processed:1962 already_processed.add('hapkeLaunched')1963 if value in ('true', '1'):1964 self.hapkeLaunched = True1965 elif value in ('false', '0'):1966 self.hapkeLaunched = False1967 else:1968 raise_parse_error(node, 'Bad boolean attribute')1969 value = find_attr_value_('individualDisplayEnabled', node)1970 if value is not None and 'individualDisplayEnabled' not in already_processed:1971 already_processed.add('individualDisplayEnabled')1972 if value in ('true', '1'):1973 self.individualDisplayEnabled = True1974 elif value in ('false', '0'):1975 self.individualDisplayEnabled = False1976 else:1977 raise_parse_error(node, 'Bad boolean attribute')1978 value = find_attr_value_('maketLaunched', node)1979 if value is not None and 'maketLaunched' not in already_processed:1980 already_processed.add('maketLaunched')1981 if value in ('true', '1'):1982 self.maketLaunched = True1983 elif value in ('false', '0'):1984 self.maketLaunched = False1985 else:1986 raise_parse_error(node, 'Bad boolean attribute')1987 value = find_attr_value_('numberParallelThreads', node)1988 if value is not None and 'numberParallelThreads' not in already_processed:1989 already_processed.add('numberParallelThreads')1990 try:1991 self.numberParallelThreads = int(value)1992 except ValueError as exp:1993 raise_parse_error(node, 'Bad integer attribute: %s' % exp)1994 value = find_attr_value_('phaseLaunched', node)1995 if value is not None and 'phaseLaunched' not in already_processed:1996 already_processed.add('phaseLaunched')1997 if value in ('true', '1'):1998 self.phaseLaunched = True1999 elif value in ('false', '0'):2000 self.phaseLaunched = False2001 else:2002 raise_parse_error(node, 'Bad boolean attribute')2003 value = find_attr_value_('prospectLaunched', node)2004 if value is not None and 'prospectLaunched' not in already_processed:2005 already_processed.add('prospectLaunched')2006 if value in ('true', '1'):2007 self.prospectLaunched = True2008 elif value in ('false', '0'):2009 self.prospectLaunched = False2010 else:2011 raise_parse_error(node, 'Bad boolean attribute')2012 value = find_attr_value_('triangleFileProcessorLaunched', node)2013 if value is not None and 'triangleFileProcessorLaunched' not in already_processed:2014 already_processed.add('triangleFileProcessorLaunched')2015 if value in ('true', '1'):2016 self.triangleFileProcessorLaunched = True2017 elif value in ('false', '0'):2018 self.triangleFileProcessorLaunched = False2019 else:2020 raise_parse_error(node, 'Bad boolean attribute')2021 value = find_attr_value_('useBroadBand', node)2022 if value is not None and 'useBroadBand' not in already_processed:2023 already_processed.add('useBroadBand')2024 if value in ('true', '1'):2025 self.useBroadBand = True2026 elif value in ('false', '0'):2027 self.useBroadBand = False2028 else:2029 raise_parse_error(node, 'Bad boolean attribute')2030 value = find_attr_value_('useSceneSpectra', node)2031 if value is not None and 'useSceneSpectra' not in already_processed:2032 already_processed.add('useSceneSpectra')2033 if value in ('true', '1'):2034 self.useSceneSpectra = True2035 elif value in ('false', '0'):2036 self.useSceneSpectra = False2037 else:2038 raise_parse_error(node, 'Bad boolean attribute')2039 value = find_attr_value_('vegetationLaunched', node)2040 if value is not None and 'vegetationLaunched' not in already_processed:2041 already_processed.add('vegetationLaunched')2042 if value in ('true', '1'):2043 self.vegetationLaunched = True2044 elif value in ('false', '0'):2045 self.vegetationLaunched = False2046 else:2047 raise_parse_error(node, 'Bad boolean attribute')2048 value = find_attr_value_('zippedResults', node)2049 if value is not None and 'zippedResults' not in already_processed:2050 already_processed.add('zippedResults')2051 if value in ('true', '1'):2052 self.zippedResults = True2053 elif value in ('false', '0'):2054 self.zippedResults = False2055 else:2056 raise_parse_error(node, 'Bad boolean attribute')2057 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):2058 pass2059 2060 def to_string(self, pretty_print=True):2061 return etree_.tostring(self.to_etree(), pretty_print=pretty_print)2062 2063 2064 def path(self, index=True):2065 """2066 Get the dartnode path of the corenode2067 Parameters2068 ----------2069 corenode: object2070 a core object2071 2072 index: bool2073 2074 If True gets the dartnode path with index if list,2075 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction[0]'2076 2077 If False gets the dartnode path without index,2078 e.g. 'Coeff_diff.AirMultiFunctions.AirFunction'2079 2080 Returns2081 -------2082 str2083 """2084 return get_path(self, index=index)2085 2086 2087 def findpaths(self, pat, case=False, regex=True):2088 return findpaths(self, pat=pat, case=case, regex=regex)2089 2090 2091 def subpaths(self):2092 return subpaths(self)2093 2094 def set_nodes(self, **kwargs):2095 return set_nodes(self, **kwargs)2096 # end class create_DartSequencerPreferences2097class create_DartLutPreferences(GeneratedsSuper):2098 member_data_items_ = [2099 MemberSpec_('addedDirection', 'xs:boolean', 0, 1, {'use': 'optional'}),2100 MemberSpec_('atmosToa', 'xs:boolean', 0, 1, {'use': 'optional'}),2101 MemberSpec_('atmosToaOrdre', 'xs:boolean', 0, 1, {'use': 'optional'}),2102 MemberSpec_('coupl', 'xs:boolean', 0, 1, {'use': 'optional'}),2103 MemberSpec_('fluorescence', 'xs:boolean', 0, 1, {'use': 'optional'}),2104 MemberSpec_('generateLUT', 'xs:boolean', 0, 1, {'use': 'optional'}),2105 MemberSpec_('iterx', 'xs:boolean', 0, 1, {'use': 'optional'}),2106 MemberSpec_('luminance', 'xs:boolean', 0, 1, {'use': 'optional'}),2107 MemberSpec_('maketCoverage', 'xs:boolean', 0, 1, {'use': 'optional'}),2108 MemberSpec_('ordre', 'xs:boolean', 0, 1, {'use': 'optional'}),2109 MemberSpec_('otherIter', 'xs:boolean', 0, 1, {'use': 'optional'}),2110 MemberSpec_('phiMax', 'xs:float', 0, 1, {'use': 'optional'}),2111 MemberSpec_('phiMin', 'xs:float', 0, 1, {'use': 'optional'}),2112 MemberSpec_('productsPerType', 'xs:boolean', 0, 1, {'use': 'optional'}),2113 MemberSpec_('reflectance', 'xs:boolean', 0, 1, {'use': 'optional'}),2114 MemberSpec_('sensor', 'xs:boolean', 0, 1, {'use': 'optional'}),2115 MemberSpec_('storeIndirect', 'xs:boolean', 0, 1, {'use': 'optional'}),2116 MemberSpec_('thetaMax', 'xs:decimal', 0, 1, {'use': 'optional'}),2117 MemberSpec_('thetaMin', 'xs:decimal', 0, 1, {'use': 'optional'}),2118 MemberSpec_('toa', 'xs:boolean', 0, 1, {'use': 'optional'}),2119 ]2120 subclass = None2121 superclass = None2122 def __init__(self, addedDirection=False, atmosToa=True, atmosToaOrdre=False, coupl=False, fluorescence=False, generateLUT=True, iterx=True, luminance=True, maketCoverage=False, ordre=False, otherIter=False, phiMax=None, phiMin=None, productsPerType=False, reflectance=True, sensor=True, storeIndirect=False, thetaMax=None, thetaMin=None, toa=True):2123 self.original_tagname_ = None2124 self.troot=get_gs_troot('sequence','_DartLutPreferences')2125 self.attrib = ['addedDirection', 'atmosToa', 'atmosToaOrdre', 'coupl', 'fluorescence', 'generateLUT', 'iterx', 'luminance', 'maketCoverage', 'ordre', 'otherIter', 'phiMax', 'phiMin', 'productsPerType', 'reflectance', 'sensor', 'storeIndirect', 'thetaMax', 'thetaMin', 'toa']2126 self.children = []2127 self.parent = None2128 self._addedDirection = _cast(bool, addedDirection)2129 self._atmosToa = _cast(bool, atmosToa)2130 self._atmosToaOrdre = _cast(bool, atmosToaOrdre)2131 self._coupl = _cast(bool, coupl)2132 self._fluorescence = _cast(bool, fluorescence)2133 self._generateLUT = _cast(bool, generateLUT)2134 self._iterx = _cast(bool, iterx)2135 self._luminance = _cast(bool, luminance)2136 self._maketCoverage = _cast(bool, maketCoverage)2137 self._ordre = _cast(bool, ordre)2138 self._otherIter = _cast(bool, otherIter)2139 self._phiMax = _cast(float, phiMax)2140 self._phiMin = _cast(float, phiMin)2141 self._productsPerType = _cast(bool, productsPerType)2142 self._reflectance = _cast(bool, reflectance)2143 self._sensor = _cast(bool, sensor)2144 self._storeIndirect = _cast(bool, storeIndirect)2145 self._thetaMax = _cast(float, thetaMax)2146 self._thetaMin = _cast(float, thetaMin)2147 self._toa = _cast(bool, toa)2148 update_node(self,self.troot,'sequence')2149 def factory(*args_, **kwargs_):2150 if CurrentSubclassModule_ is not None:2151 subclass = getSubclassFromModule_(2152 CurrentSubclassModule_, create_DartLutPreferences)2153 if subclass is not None:2154 return subclass(*args_, **kwargs_)2155 if create_DartLutPreferences.subclass:2156 return create_DartLutPreferences.subclass(*args_, **kwargs_)2157 else:2158 return create_DartLutPreferences(*args_, **kwargs_)2159 factory = staticmethod(factory)2160 def get_addedDirection(self): return self._addedDirection2161 def set_addedDirection(self, value):2162 self._addedDirection = value2163 update_node(self,self.troot,'sequence')2164 addedDirection = property(get_addedDirection, set_addedDirection)2165 def get_atmosToa(self): return self._atmosToa2166 def set_atmosToa(self, value):2167 self._atmosToa = value2168 update_node(self,self.troot,'sequence')2169 atmosToa = property(get_atmosToa, set_atmosToa)2170 def get_atmosToaOrdre(self): return self._atmosToaOrdre2171 def set_atmosToaOrdre(self, value):2172 self._atmosToaOrdre = value2173 update_node(self,self.troot,'sequence')2174 atmosToaOrdre = property(get_atmosToaOrdre, set_atmosToaOrdre)2175 def get_coupl(self): return self._coupl2176 def set_coupl(self, value):2177 self._coupl = value2178 update_node(self,self.troot,'sequence')2179 coupl = property(get_coupl, set_coupl)2180 def get_fluorescence(self): return self._fluorescence2181 def set_fluorescence(self, value):2182 self._fluorescence = value2183 update_node(self,self.troot,'sequence')2184 fluorescence = property(get_fluorescence, set_fluorescence)2185 def get_generateLUT(self): return self._generateLUT2186 def set_generateLUT(self, value):2187 self._generateLUT = value2188 update_node(self,self.troot,'sequence')2189 generateLUT = property(get_generateLUT, set_generateLUT)2190 def get_iterx(self): return self._iterx2191 def set_iterx(self, value):2192 self._iterx = value2193 update_node(self,self.troot,'sequence')2194 iterx = property(get_iterx, set_iterx)2195 def get_luminance(self): return self._luminance2196 def set_luminance(self, value):2197 self._luminance = value2198 update_node(self,self.troot,'sequence')2199 luminance = property(get_luminance, set_luminance)2200 def get_maketCoverage(self): return self._maketCoverage2201 def set_maketCoverage(self, value):2202 self._maketCoverage = value2203 update_node(self,self.troot,'sequence')2204 maketCoverage = property(get_maketCoverage, set_maketCoverage)2205 def get_ordre(self): return self._ordre2206 def set_ordre(self, value):2207 self._ordre = value2208 update_node(self,self.troot,'sequence')2209 ordre = property(get_ordre, set_ordre)2210 def get_otherIter(self): return self._otherIter2211 def set_otherIter(self, value):2212 self._otherIter = value2213 update_node(self,self.troot,'sequence')2214 otherIter = property(get_otherIter, set_otherIter)2215 def get_phiMax(self): return self._phiMax2216 def set_phiMax(self, value):2217 self._phiMax = value2218 update_node(self,self.troot,'sequence')2219 phiMax = property(get_phiMax, set_phiMax)2220 def get_phiMin(self): return self._phiMin2221 def set_phiMin(self, value):2222 self._phiMin = value2223 update_node(self,self.troot,'sequence')2224 phiMin = property(get_phiMin, set_phiMin)2225 def get_productsPerType(self): return self._productsPerType2226 def set_productsPerType(self, value):2227 self._productsPerType = value2228 update_node(self,self.troot,'sequence')2229 productsPerType = property(get_productsPerType, set_productsPerType)2230 def get_reflectance(self): return self._reflectance2231 def set_reflectance(self, value):2232 self._reflectance = value2233 update_node(self,self.troot,'sequence')2234 reflectance = property(get_reflectance, set_reflectance)2235 def get_sensor(self): return self._sensor2236 def set_sensor(self, value):2237 self._sensor = value2238 update_node(self,self.troot,'sequence')2239 sensor = property(get_sensor, set_sensor)2240 def get_storeIndirect(self): return self._storeIndirect2241 def set_storeIndirect(self, value):2242 self._storeIndirect = value2243 update_node(self,self.troot,'sequence')2244 storeIndirect = property(get_storeIndirect, set_storeIndirect)2245 def get_thetaMax(self): return self._thetaMax2246 def set_thetaMax(self, value):2247 self._thetaMax = value2248 update_node(self,self.troot,'sequence')2249 thetaMax = property(get_thetaMax, set_thetaMax)2250 def get_thetaMin(self): return self._thetaMin2251 def set_thetaMin(self, value):2252 self._thetaMin = value2253 update_node(self,self.troot,'sequence')2254 thetaMin = property(get_thetaMin, set_thetaMin)2255 def get_toa(self): return self._toa2256 def set_toa(self, value):2257 self._toa = value2258 update_node(self,self.troot,'sequence')2259 toa = property(get_toa, set_toa)2260 def copy(self):2261 obj_ = self.factory()2262 return(obj_.build(self.to_etree()))2263 def hasContent_(self):2264 if (2265 ):2266 return True2267 else:2268 return False2269 def export(self, outfile, level, namespaceprefix_='', name_='_DartLutPreferences', namespacedef_='', pretty_print=True):2270 imported_ns_def_ = GenerateDSNamespaceDefs_.get('_DartLutPreferences')2271 if imported_ns_def_ is not None:2272 namespacedef_ = imported_ns_def_2273 if pretty_print:2274 eol_ = '\n'2275 else:2276 eol_ = ''2277 if self.original_tagname_ is not None:2278 name_ = self.original_tagname_2279 showIndent(outfile, level, pretty_print)2280 outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2281 already_processed = set()2282 self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='_DartLutPreferences')2283 if self.hasContent_():2284 outfile.write('>%s' % (eol_, ))2285 self.exportChildren(outfile, level + 1, namespaceprefix_='', name_='_DartLutPreferences', pretty_print=pretty_print)2286 outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))2287 else:2288 outfile.write('/>%s' % (eol_, ))2289 def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='_DartLutPreferences'):2290 if self.addedDirection is not None and 'addedDirection' not in already_processed:2291 already_processed.add('addedDirection')2292 outfile.write(' addedDirection="%s"' % self.gds_format_boolean(self.addedDirection, input_name='addedDirection'))2293 if self.atmosToa is not None and 'atmosToa' not in already_processed:2294 already_processed.add('atmosToa')2295 outfile.write(' atmosToa="%s"' % self.gds_format_boolean(self.atmosToa, input_name='atmosToa'))2296 if self.atmosToaOrdre is not None and 'atmosToaOrdre' not in already_processed:2297 already_processed.add('atmosToaOrdre')2298 outfile.write(' atmosToaOrdre="%s"' % self.gds_format_boolean(self.atmosToaOrdre, input_name='atmosToaOrdre'))2299 if self.coupl is not None and 'coupl' not in already_processed:2300 already_processed.add('coupl')2301 outfile.write(' coupl="%s"' % self.gds_format_boolean(self.coupl, input_name='coupl'))2302 if self.fluorescence is not None and 'fluorescence' not in already_processed:2303 already_processed.add('fluorescence')2304 outfile.write(' fluorescence="%s"' % self.gds_format_boolean(self.fluorescence, input_name='fluorescence'))2305 if self.generateLUT is not None and 'generateLUT' not in already_processed:2306 already_processed.add('generateLUT')2307 outfile.write(' generateLUT="%s"' % self.gds_format_boolean(self.generateLUT, input_name='generateLUT'))2308 if self.iterx is not None and 'iterx' not in already_processed:2309 already_processed.add('iterx')2310 outfile.write(' iterx="%s"' % self.gds_format_boolean(self.iterx, input_name='iterx'))2311 if self.luminance is not None and 'luminance' not in already_processed:2312 already_processed.add('luminance')2313 outfile.write(' luminance="%s"' % self.gds_format_boolean(self.luminance, input_name='luminance'))2314 if self.maketCoverage is not None and 'maketCoverage' not in already_processed:2315 already_processed.add('maketCoverage')2316 outfile.write(' maketCoverage="%s"' % self.gds_format_boolean(self.maketCoverage, input_name='maketCoverage'))2317 if self.ordre is not None and 'ordre' not in already_processed:2318 already_processed.add('ordre')2319 outfile.write(' ordre="%s"' % self.gds_format_boolean(self.ordre, input_name='ordre'))2320 if self.otherIter is not None and 'otherIter' not in already_processed:2321 already_processed.add('otherIter')2322 outfile.write(' otherIter="%s"' % self.gds_format_boolean(self.otherIter, input_name='otherIter'))2323 if self.phiMax is not None and 'phiMax' not in already_processed:2324 already_processed.add('phiMax')2325 outfile.write(' phiMax="%s"' % self.gds_format_float(self.phiMax, input_name='phiMax'))2326 if self.phiMin is not None and 'phiMin' not in already_processed:2327 already_processed.add('phiMin')2328 outfile.write(' phiMin="%s"' % self.gds_format_float(self.phiMin, input_name='phiMin'))2329 if self.productsPerType is not None and 'productsPerType' not in already_processed:2330 already_processed.add('productsPerType')2331 outfile.write(' productsPerType="%s"' % self.gds_format_boolean(self.productsPerType, input_name='productsPerType'))2332 if self.reflectance is not None and 'reflectance' not in already_processed:2333 already_processed.add('reflectance')2334 outfile.write(' reflectance="%s"' % self.gds_format_boolean(self.reflectance, input_name='reflectance'))2335 if self.sensor is not None and 'sensor' not in already_processed:2336 already_processed.add('sensor')2337 outfile.write(' sensor="%s"' % self.gds_format_boolean(self.sensor, input_name='sensor'))2338 if self.storeIndirect is not None and 'storeIndirect' not in already_processed:2339 already_processed.add('storeIndirect')2340 outfile.write(' storeIndirect="%s"' % self.gds_format_boolean(self.storeIndirect, input_name='storeIndirect'))2341 if self.thetaMax is not None and 'thetaMax' not in already_processed:2342 already_processed.add('thetaMax')2343 outfile.write(' thetaMax="%s"' % self.gds_format_float(self.thetaMax, input_name='thetaMax'))2344 if self.thetaMin is not None and 'thetaMin' not in already_processed:2345 already_processed.add('thetaMin')2346 outfile.write(' thetaMin="%s"' % self.gds_format_float(self.thetaMin, input_name='thetaMin'))2347 if self.toa is not None and 'toa' not in already_processed:2348 already_processed.add('toa')2349 outfile.write(' toa="%s"' % self.gds_format_boolean(self.toa, input_name='toa'))2350 def exportChildren(self, outfile, level, namespaceprefix_='', name_='_DartLutPreferences', fromsubclass_=False, pretty_print=True):2351 pass2352 def to_etree(self, parent_element=None, name_='_DartLutPreferences', mapping_=None):2353 if parent_element is None:2354 element = etree_.Element('{}' + name_)2355 else:2356 element = etree_.SubElement(parent_element, '{}' + name_)2357 if self.addedDirection is not None:2358 element.set('addedDirection', self.gds_format_boolean(self.addedDirection))2359 if self.atmosToa is not None:2360 element.set('atmosToa', self.gds_format_boolean(self.atmosToa))2361 if self.atmosToaOrdre is not None:2362 element.set('atmosToaOrdre', self.gds_format_boolean(self.atmosToaOrdre))2363 if self.coupl is not None:2364 element.set('coupl', self.gds_format_boolean(self.coupl))2365 if self.fluorescence is not None:2366 element.set('fluorescence', self.gds_format_boolean(self.fluorescence))2367 if self.generateLUT is not None:2368 element.set('generateLUT', self.gds_format_boolean(self.generateLUT))2369 if self.iterx is not None:2370 element.set('iterx', self.gds_format_boolean(self.iterx))2371 if self.luminance is not None:2372 element.set('luminance', self.gds_format_boolean(self.luminance))2373 if self.maketCoverage is not None:2374 element.set('maketCoverage', self.gds_format_boolean(self.maketCoverage))2375 if self.ordre is not None:2376 element.set('ordre', self.gds_format_boolean(self.ordre))2377 if self.otherIter is not None:2378 element.set('otherIter', self.gds_format_boolean(self.otherIter))2379 if self.phiMax is not None:2380 element.set('phiMax', self.gds_format_float(self.phiMax))2381 if self.phiMin is not None:2382 element.set('phiMin', self.gds_format_float(self.phiMin))2383 if self.productsPerType is not None:2384 element.set('productsPerType', self.gds_format_boolean(self.productsPerType))2385 if self.reflectance is not None:2386 element.set('reflectance', self.gds_format_boolean(self.reflectance))2387 if self.sensor is not None:2388 element.set('sensor', self.gds_format_boolean(self.sensor))2389 if self.storeIndirect is not None:2390 element.set('storeIndirect', self.gds_format_boolean(self.storeIndirect))2391 if self.thetaMax is not None:2392 element.set('thetaMax', self.gds_format_float(self.thetaMax))2393 if self.thetaMin is not None:2394 element.set('thetaMin', self.gds_format_float(self.thetaMin))2395 if self.toa is not None:2396 element.set('toa', self.gds_format_boolean(self.toa))2397 if mapping_ is not None:2398 mapping_[id(self)] = element2399 return element2400 def exportLiteral(self, outfile, level, name_='_DartLutPreferences'):2401 level += 12402 already_processed = set()2403 self.exportLiteralAttributes(outfile, level, already_processed, name_)2404 if self.hasContent_():2405 self.exportLiteralChildren(outfile, level, name_)2406 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2407 if self.addedDirection is not None and 'addedDirection' not in already_processed:2408 already_processed.add('addedDirection')2409 showIndent(outfile, level)2410 outfile.write('addedDirection=%s,\n' % (self.addedDirection,))...
unix_file_object.py
Source:unix_file_object.py
...162 lwrite('/>%s' % (eol_, ))163 def exportAttributes(self, lwrite, level, already_processed, namespace_='UnixFileObj:', name_='UnixFilePermissionsType'):164 super(UnixFilePermissionsType, self).exportAttributes(lwrite, level, already_processed, namespace_, name_='UnixFilePermissionsType')165 if self.gwrite is not None:166 lwrite(' gwrite="%s"' % self.gds_format_boolean(self.gwrite, input_name='gwrite'))167 if self.suid is not None:168 lwrite(' suid="%s"' % self.gds_format_boolean(self.suid, input_name='suid'))169 if self.oexec is not None:170 lwrite(' oexec="%s"' % self.gds_format_boolean(self.oexec, input_name='oexec'))171 if self.owrite is not None:172 lwrite(' owrite="%s"' % self.gds_format_boolean(self.owrite, input_name='owrite'))173 if self.uwrite is not None:174 lwrite(' uwrite="%s"' % self.gds_format_boolean(self.uwrite, input_name='uwrite'))175 if self.gexec is not None:176 lwrite(' gexec="%s"' % self.gds_format_boolean(self.gexec, input_name='gexec'))177 if self.gread is not None:178 lwrite(' gread="%s"' % self.gds_format_boolean(self.gread, input_name='gread'))179 if self.uexec is not None:180 lwrite(' uexec="%s"' % self.gds_format_boolean(self.uexec, input_name='uexec'))181 if self.uread is not None:182 lwrite(' uread="%s"' % self.gds_format_boolean(self.uread, input_name='uread'))183 if self.sgid is not None:184 lwrite(' sgid="%s"' % self.gds_format_boolean(self.sgid, input_name='sgid'))185 if self.oread is not None:186 lwrite(' oread="%s"' % self.gds_format_boolean(self.oread, input_name='oread'))187 def exportChildren(self, lwrite, level, namespace_='UnixFileObj:', name_='UnixFilePermissionsType', fromsubclass_=False, pretty_print=True):188 super(UnixFilePermissionsType, self).exportChildren(lwrite, level, 'UnixFileObj:', name_, True, pretty_print=pretty_print)189 pass190 def build(self, node):191 already_processed = set()192 self.buildAttributes(node, node.attrib, already_processed)193 for child in node:194 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]195 self.buildChildren(child, node, nodeName_)196 def buildAttributes(self, node, attrs, already_processed):197 value = find_attr_value_('gwrite', node)198 if value is not None:199 if value in ('true', '1'):200 self.gwrite = True...
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!!