Best Python code snippet using autotest_python
cff.py
Source:cff.py
...200 if s1.find('\n') == -1:201 return '"%s"' % s1202 else:203 return '"""%s"""' % s1204def get_all_text_(node):205 if node.text is not None:206 text = node.text207 else:208 text = ''209 for child in node:210 if child.tail is not None:211 text += child.tail212 return text213class GDSParseError(Exception):214 pass215def raise_parse_error(node, msg):216 if XMLParser_import_library == XMLParser_import_lxml:217 msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )218 else:219 msg = '%s (element %s)' % (msg, node.tag, )220 raise GDSParseError(msg)221class MixedContainer:222 # Constants for category:223 CategoryNone = 0224 CategoryText = 1225 CategorySimple = 2226 CategoryComplex = 3227 # Constants for content_type:228 TypeNone = 0229 TypeText = 1230 TypeString = 2231 TypeInteger = 3232 TypeFloat = 4233 TypeDecimal = 5234 TypeDouble = 6235 TypeBoolean = 7236 def __init__(self, category, content_type, name, value):237 self.category = category238 self.content_type = content_type239 self.name = name240 self.value = value241 def getCategory(self):242 return self.category243 def getContenttype(self, content_type):244 return self.content_type245 def getValue(self):246 return self.value247 def getName(self):248 return self.name249 def export(self, outfile, level, name, namespace):250 if self.category == MixedContainer.CategoryText:251 # Prevent exporting empty content as empty lines.252 if self.value.strip(): 253 outfile.write(self.value)254 elif self.category == MixedContainer.CategorySimple:255 self.exportSimple(outfile, level, name)256 else: # category == MixedContainer.CategoryComplex257 self.value.export(outfile, level, namespace,name)258 def exportSimple(self, outfile, level, name):259 if self.content_type == MixedContainer.TypeString:260 outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name))261 elif self.content_type == MixedContainer.TypeInteger or \262 self.content_type == MixedContainer.TypeBoolean:263 outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name))264 elif self.content_type == MixedContainer.TypeFloat or \265 self.content_type == MixedContainer.TypeDecimal:266 outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name))267 elif self.content_type == MixedContainer.TypeDouble:268 outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name))269 def exportLiteral(self, outfile, level, name):270 if self.category == MixedContainer.CategoryText:271 showIndent(outfile, level)272 outfile.write('model_.MixedContainer(%d, %d, "%s", "%s"),\n' % \273 (self.category, self.content_type, self.name, self.value))274 elif self.category == MixedContainer.CategorySimple:275 showIndent(outfile, level)276 outfile.write('model_.MixedContainer(%d, %d, "%s", "%s"),\n' % \277 (self.category, self.content_type, self.name, self.value))278 else: # category == MixedContainer.CategoryComplex279 showIndent(outfile, level)280 outfile.write('model_.MixedContainer(%d, %d, "%s",\n' % \281 (self.category, self.content_type, self.name,))282 self.value.exportLiteral(outfile, level + 1)283 showIndent(outfile, level)284 outfile.write(')\n')285class MemberSpec_(object):286 def __init__(self, name='', data_type='', container=0):287 self.name = name288 self.data_type = data_type289 self.container = container290 def set_name(self, name): self.name = name291 def get_name(self): return self.name292 def set_data_type(self, data_type): self.data_type = data_type293 def get_data_type_chain(self): return self.data_type294 def get_data_type(self):295 if isinstance(self.data_type, list):296 if len(self.data_type) > 0:297 return self.data_type[-1]298 else:299 return 'xs:string'300 else:301 return self.data_type302 def set_container(self, container): self.container = container303 def get_container(self): return self.container304def _cast(typ, value):305 if typ is None or value is None:306 return value307 return typ(value)308#309# Data representation classes.310#311class property(GeneratedsSuper):312 subclass = None313 superclass = None314 def __init__(self, name=None, value=None, type_=None, uncertainty=None, unit=None):315 self.name = name316 self.value = value317 self.type_ = type_318 self.uncertainty = uncertainty319 self.unit = unit320 def factory(*args_, **kwargs_):321 if property.subclass:322 return property.subclass(*args_, **kwargs_)323 else:324 return property(*args_, **kwargs_)325 factory = staticmethod(factory)326 def get_name(self): return self.name327 def set_name(self, name): self.name = name328 def get_value(self): return self.value329 def set_value(self, value): self.value = value330 def get_type(self): return self.type_331 def set_type(self, type_): self.type_ = type_332 def get_uncertainty(self): return self.uncertainty333 def set_uncertainty(self, uncertainty): self.uncertainty = uncertainty334 def get_unit(self): return self.unit335 def set_unit(self, unit): self.unit = unit336 def export(self, outfile, level, namespace_='cml:', name_='property', namespacedef_=''):337 showIndent(outfile, level)338 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))339 self.exportAttributes(outfile, level, [], namespace_, name_='property')340 if self.hasContent_():341 outfile.write('>\n')342 self.exportChildren(outfile, level + 1, namespace_, name_)343 showIndent(outfile, level)344 outfile.write('</%s%s>\n' % (namespace_, name_))345 else:346 outfile.write('/>\n')347 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='property'):348 pass349 def exportChildren(self, outfile, level, namespace_='cml:', name_='property'):350 if self.name is not None:351 showIndent(outfile, level)352 outfile.write('<%sname>%s</%sname>\n' % (namespace_, self.gds_format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_))353 if self.value is not None:354 showIndent(outfile, level)355 outfile.write('<%svalue>%s</%svalue>\n' % (namespace_, self.gds_format_string(quote_xml(self.value).encode(ExternalEncoding), input_name='value'), namespace_))356 if self.type_ is not None:357 showIndent(outfile, level)358 outfile.write('<%stype>%s</%stype>\n' % (namespace_, self.gds_format_string(quote_xml(self.type_).encode(ExternalEncoding), input_name='type'), namespace_))359 if self.uncertainty is not None:360 showIndent(outfile, level)361 outfile.write('<%suncertainty>%s</%suncertainty>\n' % (namespace_, self.gds_format_string(quote_xml(self.uncertainty).encode(ExternalEncoding), input_name='uncertainty'), namespace_))362 if self.unit is not None:363 showIndent(outfile, level)364 outfile.write('<%sunit>%s</%sunit>\n' % (namespace_, self.gds_format_string(quote_xml(self.unit).encode(ExternalEncoding), input_name='unit'), namespace_))365 def hasContent_(self):366 if (367 self.name is not None or368 self.value is not None or369 self.type_ is not None or370 self.uncertainty is not None or371 self.unit is not None372 ):373 return True374 else:375 return False376 def exportLiteral(self, outfile, level, name_='property'):377 level += 1378 self.exportLiteralAttributes(outfile, level, [], name_)379 if self.hasContent_():380 self.exportLiteralChildren(outfile, level, name_)381 def exportLiteralAttributes(self, outfile, level, already_processed, name_):382 pass383 def exportLiteralChildren(self, outfile, level, name_):384 if self.name is not None:385 showIndent(outfile, level)386 outfile.write('name=%s,\n' % quote_python(self.name).encode(ExternalEncoding))387 if self.value is not None:388 showIndent(outfile, level)389 outfile.write('value=%s,\n' % quote_python(self.value).encode(ExternalEncoding))390 if self.type_ is not None:391 showIndent(outfile, level)392 outfile.write('type_=%s,\n' % quote_python(self.type_).encode(ExternalEncoding))393 if self.uncertainty is not None:394 showIndent(outfile, level)395 outfile.write('uncertainty=%s,\n' % quote_python(self.uncertainty).encode(ExternalEncoding))396 if self.unit is not None:397 showIndent(outfile, level)398 outfile.write('unit=%s,\n' % quote_python(self.unit).encode(ExternalEncoding))399 def build(self, node):400 self.buildAttributes(node, node.attrib, [])401 for child in node:402 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]403 self.buildChildren(child, node, nodeName_)404 def buildAttributes(self, node, attrs, already_processed):405 pass406 def buildChildren(self, child_, node, nodeName_, from_subclass=False):407 if nodeName_ == 'name':408 name_ = child_.text409 name_ = self.gds_validate_string(name_, node, 'name')410 self.name = name_411 elif nodeName_ == 'value':412 value_ = child_.text413 value_ = self.gds_validate_string(value_, node, 'value')414 self.value = value_415 elif nodeName_ == 'type':416 type_ = child_.text417 type_ = self.gds_validate_string(type_, node, 'type')418 self.type_ = type_419 elif nodeName_ == 'uncertainty':420 uncertainty_ = child_.text421 uncertainty_ = self.gds_validate_string(uncertainty_, node, 'uncertainty')422 self.uncertainty = uncertainty_423 elif nodeName_ == 'unit':424 unit_ = child_.text425 unit_ = self.gds_validate_string(unit_, node, 'unit')426 self.unit = unit_427# end class property428class section(GeneratedsSuper):429 subclass = None430 superclass = None431 def __init__(self, title=None, name=None, type_=None, property=None):432 self.title = _cast(None, title)433 self.name = name434 self.type_ = type_435 if property is None:436 self.property = []437 else:438 self.property = property439 def factory(*args_, **kwargs_):440 if section.subclass:441 return section.subclass(*args_, **kwargs_)442 else:443 return section(*args_, **kwargs_)444 factory = staticmethod(factory)445 def get_name(self): return self.name446 def set_name(self, name): self.name = name447 def get_type(self): return self.type_448 def set_type(self, type_): self.type_ = type_449 def get_property(self): return self.property450 def set_property(self, property): self.property = property451 def add_property(self, value): self.property.append(value)452 def insert_property(self, index, value): self.property[index] = value453 def get_title(self): return self.title454 def set_title(self, title): self.title = title455 def export(self, outfile, level, namespace_='cml:', name_='section', namespacedef_=''):456 showIndent(outfile, level)457 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))458 self.exportAttributes(outfile, level, [], namespace_, name_='section')459 if self.hasContent_():460 outfile.write('>\n')461 self.exportChildren(outfile, level + 1, namespace_, name_)462 showIndent(outfile, level)463 outfile.write('</%s%s>\n' % (namespace_, name_))464 else:465 outfile.write('/>\n')466 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='section'):467 if self.title is not None and 'title' not in already_processed:468 already_processed.append('title')469 outfile.write(' title=%s' % (self.gds_format_string(quote_attrib(self.title).encode(ExternalEncoding), input_name='title'), ))470 def exportChildren(self, outfile, level, namespace_='cml:', name_='section'):471 if self.name is not None:472 showIndent(outfile, level)473 outfile.write('<%sname>%s</%sname>\n' % (namespace_, self.gds_format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_))474 if self.type_ is not None:475 showIndent(outfile, level)476 outfile.write('<%stype>%s</%stype>\n' % (namespace_, self.gds_format_string(quote_xml(self.type_).encode(ExternalEncoding), input_name='type'), namespace_))477 for property_ in self.property:478 property_.export(outfile, level, namespace_, name_='property')479 def hasContent_(self):480 if (481 self.name is not None or482 self.type_ is not None or483 self.property484 ):485 return True486 else:487 return False488 def exportLiteral(self, outfile, level, name_='section'):489 level += 1490 self.exportLiteralAttributes(outfile, level, [], name_)491 if self.hasContent_():492 self.exportLiteralChildren(outfile, level, name_)493 def exportLiteralAttributes(self, outfile, level, already_processed, name_):494 if self.title is not None and 'title' not in already_processed:495 already_processed.append('title')496 showIndent(outfile, level)497 outfile.write('title = "%s",\n' % (self.title,))498 def exportLiteralChildren(self, outfile, level, name_):499 if self.name is not None:500 showIndent(outfile, level)501 outfile.write('name=%s,\n' % quote_python(self.name).encode(ExternalEncoding))502 if self.type_ is not None:503 showIndent(outfile, level)504 outfile.write('type_=%s,\n' % quote_python(self.type_).encode(ExternalEncoding))505 showIndent(outfile, level)506 outfile.write('property=[\n')507 level += 1508 for property_ in self.property:509 showIndent(outfile, level)510 outfile.write('model_.property(\n')511 property_.exportLiteral(outfile, level)512 showIndent(outfile, level)513 outfile.write('),\n')514 level -= 1515 showIndent(outfile, level)516 outfile.write('],\n')517 def build(self, node):518 self.buildAttributes(node, node.attrib, [])519 for child in node:520 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]521 self.buildChildren(child, node, nodeName_)522 def buildAttributes(self, node, attrs, already_processed):523 value = attrs.get('title')524 if value is not None and 'title' not in already_processed:525 already_processed.append('title')526 self.title = value527 def buildChildren(self, child_, node, nodeName_, from_subclass=False):528 if nodeName_ == 'name':529 name_ = child_.text530 name_ = self.gds_validate_string(name_, node, 'name')531 self.name = name_532 elif nodeName_ == 'type':533 type_ = child_.text534 type_ = self.gds_validate_string(type_, node, 'type')535 self.type_ = type_536 elif nodeName_ == 'property': 537 obj_ = property.factory()538 obj_.build(child_)539 self.property.append(obj_)540# end class section541class metadata(GeneratedsSuper):542 subclass = None543 superclass = None544 def __init__(self, tag=None, section=None):545 if tag is None:546 self.tag = []547 else:548 self.tag = tag549 if section is None:550 self.section = []551 else:552 self.section = section553 def factory(*args_, **kwargs_):554 if metadata.subclass:555 return metadata.subclass(*args_, **kwargs_)556 else:557 return metadata(*args_, **kwargs_)558 factory = staticmethod(factory)559 def get_tag(self): return self.tag560 def set_tag(self, tag): self.tag = tag561 def add_tag(self, value): self.tag.append(value)562 def insert_tag(self, index, value): self.tag[index] = value563 def get_section(self): return self.section564 def set_section(self, section): self.section = section565 def add_section(self, value): self.section.append(value)566 def insert_section(self, index, value): self.section[index] = value567 def export(self, outfile, level, namespace_='cml:', name_='metadata', namespacedef_=''):568 showIndent(outfile, level)569 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))570 self.exportAttributes(outfile, level, [], namespace_, name_='metadata')571 if self.hasContent_():572 outfile.write('>\n')573 self.exportChildren(outfile, level + 1, namespace_, name_)574 showIndent(outfile, level)575 outfile.write('</%s%s>\n' % (namespace_, name_))576 else:577 outfile.write('/>\n')578 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='metadata'):579 pass580 def exportChildren(self, outfile, level, namespace_='cml:', name_='metadata'):581 for tag_ in self.tag:582 tag_.export(outfile, level, namespace_, name_='tag')583 for section_ in self.section:584 section_.export(outfile, level, namespace_, name_='section')585 def hasContent_(self):586 if (587 self.tag or588 self.section589 ):590 return True591 else:592 return False593 def exportLiteral(self, outfile, level, name_='metadata'):594 level += 1595 self.exportLiteralAttributes(outfile, level, [], name_)596 if self.hasContent_():597 self.exportLiteralChildren(outfile, level, name_)598 def exportLiteralAttributes(self, outfile, level, already_processed, name_):599 pass600 def exportLiteralChildren(self, outfile, level, name_):601 showIndent(outfile, level)602 outfile.write('tag=[\n')603 level += 1604 for tag_ in self.tag:605 showIndent(outfile, level)606 outfile.write('model_.tag(\n')607 tag_.exportLiteral(outfile, level)608 showIndent(outfile, level)609 outfile.write('),\n')610 level -= 1611 showIndent(outfile, level)612 outfile.write('],\n')613 showIndent(outfile, level)614 outfile.write('section=[\n')615 level += 1616 for section_ in self.section:617 showIndent(outfile, level)618 outfile.write('model_.section(\n')619 section_.exportLiteral(outfile, level)620 showIndent(outfile, level)621 outfile.write('),\n')622 level -= 1623 showIndent(outfile, level)624 outfile.write('],\n')625 def build(self, node):626 self.buildAttributes(node, node.attrib, [])627 for child in node:628 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]629 self.buildChildren(child, node, nodeName_)630 def buildAttributes(self, node, attrs, already_processed):631 pass632 def buildChildren(self, child_, node, nodeName_, from_subclass=False):633 if nodeName_ == 'tag': 634 obj_ = tag.factory()635 obj_.build(child_)636 self.tag.append(obj_)637 elif nodeName_ == 'section': 638 obj_ = section.factory()639 obj_.build(child_)640 self.section.append(obj_)641# end class metadata642class tag(GeneratedsSuper):643 """A tag element contains a key attribute and the value The key to be644 used later in the dictionary"""645 subclass = None646 superclass = None647 def __init__(self, key=None, valueOf_=None):648 self.key = _cast(None, key)649 self.valueOf_ = valueOf_650 def factory(*args_, **kwargs_):651 if tag.subclass:652 return tag.subclass(*args_, **kwargs_)653 else:654 return tag(*args_, **kwargs_)655 factory = staticmethod(factory)656 def get_key(self): return self.key657 def set_key(self, key): self.key = key658 def get_valueOf_(self): return self.valueOf_659 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_660 def export(self, outfile, level, namespace_='cml:', name_='tag', namespacedef_=''):661 showIndent(outfile, level)662 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))663 self.exportAttributes(outfile, level, [], namespace_, name_='tag')664 if self.hasContent_():665 outfile.write('>')666 outfile.write(self.valueOf_)667 self.exportChildren(outfile, level + 1, namespace_, name_)668 outfile.write('</%s%s>\n' % (namespace_, name_))669 else:670 outfile.write('/>\n')671 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='tag'):672 if self.key is not None and 'key' not in already_processed:673 already_processed.append('key')674 outfile.write(' key=%s' % (self.gds_format_string(quote_attrib(self.key).encode(ExternalEncoding), input_name='key'), ))675 def exportChildren(self, outfile, level, namespace_='cml:', name_='tag'):676 pass677 def hasContent_(self):678 if (679 self.valueOf_680 ):681 return True682 else:683 return False684 def exportLiteral(self, outfile, level, name_='tag'):685 level += 1686 self.exportLiteralAttributes(outfile, level, [], name_)687 if self.hasContent_():688 self.exportLiteralChildren(outfile, level, name_)689 showIndent(outfile, level)690 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))691 def exportLiteralAttributes(self, outfile, level, already_processed, name_):692 if self.key is not None and 'key' not in already_processed:693 already_processed.append('key')694 showIndent(outfile, level)695 outfile.write('key = "%s",\n' % (self.key,))696 def exportLiteralChildren(self, outfile, level, name_):697 pass698 def build(self, node):699 self.buildAttributes(node, node.attrib, [])700 self.valueOf_ = get_all_text_(node)701 for child in node:702 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]703 self.buildChildren(child, node, nodeName_)704 def buildAttributes(self, node, attrs, already_processed):705 value = attrs.get('key')706 if value is not None and 'key' not in already_processed:707 already_processed.append('key')708 self.key = value709 def buildChildren(self, child_, node, nodeName_, from_subclass=False):710 pass711# end class tag712class connectome(GeneratedsSuper):713 subclass = None714 superclass = None715 def __init__(self, connectome_meta=None, connectome_network=None, connectome_surface=None, connectome_volume=None, connectome_track=None, connectome_timeseries=None, connectome_data=None, connectome_script=None, connectome_imagestack=None):716 self.connectome_meta = connectome_meta717 if connectome_network is None:718 self.connectome_network = []719 else:720 self.connectome_network = connectome_network721 if connectome_surface is None:722 self.connectome_surface = []723 else:724 self.connectome_surface = connectome_surface725 if connectome_volume is None:726 self.connectome_volume = []727 else:728 self.connectome_volume = connectome_volume729 if connectome_track is None:730 self.connectome_track = []731 else:732 self.connectome_track = connectome_track733 if connectome_timeseries is None:734 self.connectome_timeseries = []735 else:736 self.connectome_timeseries = connectome_timeseries737 if connectome_data is None:738 self.connectome_data = []739 else:740 self.connectome_data = connectome_data741 if connectome_script is None:742 self.connectome_script = []743 else:744 self.connectome_script = connectome_script745 if connectome_imagestack is None:746 self.connectome_imagestack = []747 else:748 self.connectome_imagestack = connectome_imagestack749 def factory(*args_, **kwargs_):750 if connectome.subclass:751 return connectome.subclass(*args_, **kwargs_)752 else:753 return connectome(*args_, **kwargs_)754 factory = staticmethod(factory)755 def get_connectome_meta(self): return self.connectome_meta756 def set_connectome_meta(self, connectome_meta): self.connectome_meta = connectome_meta757 def get_connectome_network(self): return self.connectome_network758 def set_connectome_network(self, connectome_network): self.connectome_network = connectome_network759 def add_connectome_network(self, value): self.connectome_network.append(value)760 def insert_connectome_network(self, index, value): self.connectome_network[index] = value761 def get_connectome_surface(self): return self.connectome_surface762 def set_connectome_surface(self, connectome_surface): self.connectome_surface = connectome_surface763 def add_connectome_surface(self, value): self.connectome_surface.append(value)764 def insert_connectome_surface(self, index, value): self.connectome_surface[index] = value765 def get_connectome_volume(self): return self.connectome_volume766 def set_connectome_volume(self, connectome_volume): self.connectome_volume = connectome_volume767 def add_connectome_volume(self, value): self.connectome_volume.append(value)768 def insert_connectome_volume(self, index, value): self.connectome_volume[index] = value769 def get_connectome_track(self): return self.connectome_track770 def set_connectome_track(self, connectome_track): self.connectome_track = connectome_track771 def add_connectome_track(self, value): self.connectome_track.append(value)772 def insert_connectome_track(self, index, value): self.connectome_track[index] = value773 def get_connectome_timeseries(self): return self.connectome_timeseries774 def set_connectome_timeseries(self, connectome_timeseries): self.connectome_timeseries = connectome_timeseries775 def add_connectome_timeseries(self, value): self.connectome_timeseries.append(value)776 def insert_connectome_timeseries(self, index, value): self.connectome_timeseries[index] = value777 def get_connectome_data(self): return self.connectome_data778 def set_connectome_data(self, connectome_data): self.connectome_data = connectome_data779 def add_connectome_data(self, value): self.connectome_data.append(value)780 def insert_connectome_data(self, index, value): self.connectome_data[index] = value781 def get_connectome_script(self): return self.connectome_script782 def set_connectome_script(self, connectome_script): self.connectome_script = connectome_script783 def add_connectome_script(self, value): self.connectome_script.append(value)784 def insert_connectome_script(self, index, value): self.connectome_script[index] = value785 def get_connectome_imagestack(self): return self.connectome_imagestack786 def set_connectome_imagestack(self, connectome_imagestack): self.connectome_imagestack = connectome_imagestack787 def add_connectome_imagestack(self, value): self.connectome_imagestack.append(value)788 def insert_connectome_imagestack(self, index, value): self.connectome_imagestack[index] = value789 def export(self, outfile, level, namespace_='cml:', name_='connectome', namespacedef_=''):790 showIndent(outfile, level)791 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))792 self.exportAttributes(outfile, level, [], namespace_, name_='connectome')793 if self.hasContent_():794 outfile.write('>\n')795 self.exportChildren(outfile, level + 1, namespace_, name_)796 showIndent(outfile, level)797 outfile.write('</%s%s>\n' % (namespace_, name_))798 else:799 outfile.write('/>\n')800 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='connectome'):801 pass802 def exportChildren(self, outfile, level, namespace_='cml:', name_='connectome'):803 if self.connectome_meta:804 self.connectome_meta.export(outfile, level, namespace_, name_='connectome-meta', )805 for connectome_network_ in self.connectome_network:806 connectome_network_.export(outfile, level, namespace_, name_='connectome-network')807 for connectome_surface_ in self.connectome_surface:808 connectome_surface_.export(outfile, level, namespace_, name_='connectome-surface')809 for connectome_volume_ in self.connectome_volume:810 connectome_volume_.export(outfile, level, namespace_, name_='connectome-volume')811 for connectome_track_ in self.connectome_track:812 connectome_track_.export(outfile, level, namespace_, name_='connectome-track')813 for connectome_timeseries_ in self.connectome_timeseries:814 connectome_timeseries_.export(outfile, level, namespace_, name_='connectome-timeseries')815 for connectome_data_ in self.connectome_data:816 connectome_data_.export(outfile, level, namespace_, name_='connectome-data')817 for connectome_script_ in self.connectome_script:818 connectome_script_.export(outfile, level, namespace_, name_='connectome-script')819 for connectome_imagestack_ in self.connectome_imagestack:820 connectome_imagestack_.export(outfile, level, namespace_, name_='connectome-imagestack')821 def hasContent_(self):822 if (823 self.connectome_meta is not None or824 self.connectome_network or825 self.connectome_surface or826 self.connectome_volume or827 self.connectome_track or828 self.connectome_timeseries or829 self.connectome_data or830 self.connectome_script or831 self.connectome_imagestack832 ):833 return True834 else:835 return False836 def exportLiteral(self, outfile, level, name_='connectome'):837 level += 1838 self.exportLiteralAttributes(outfile, level, [], name_)839 if self.hasContent_():840 self.exportLiteralChildren(outfile, level, name_)841 def exportLiteralAttributes(self, outfile, level, already_processed, name_):842 pass843 def exportLiteralChildren(self, outfile, level, name_):844 if self.connectome_meta is not None:845 showIndent(outfile, level)846 outfile.write('connectome_meta=model_.CMetadata(\n')847 self.connectome_meta.exportLiteral(outfile, level, name_='connectome_meta')848 showIndent(outfile, level)849 outfile.write('),\n')850 showIndent(outfile, level)851 outfile.write('connectome_network=[\n')852 level += 1853 for connectome_network_ in self.connectome_network:854 showIndent(outfile, level)855 outfile.write('model_.CNetwork(\n')856 connectome_network_.exportLiteral(outfile, level, name_='CNetwork')857 showIndent(outfile, level)858 outfile.write('),\n')859 level -= 1860 showIndent(outfile, level)861 outfile.write('],\n')862 showIndent(outfile, level)863 outfile.write('connectome_surface=[\n')864 level += 1865 for connectome_surface_ in self.connectome_surface:866 showIndent(outfile, level)867 outfile.write('model_.CSurface(\n')868 connectome_surface_.exportLiteral(outfile, level, name_='CSurface')869 showIndent(outfile, level)870 outfile.write('),\n')871 level -= 1872 showIndent(outfile, level)873 outfile.write('],\n')874 showIndent(outfile, level)875 outfile.write('connectome_volume=[\n')876 level += 1877 for connectome_volume_ in self.connectome_volume:878 showIndent(outfile, level)879 outfile.write('model_.CVolume(\n')880 connectome_volume_.exportLiteral(outfile, level, name_='CVolume')881 showIndent(outfile, level)882 outfile.write('),\n')883 level -= 1884 showIndent(outfile, level)885 outfile.write('],\n')886 showIndent(outfile, level)887 outfile.write('connectome_track=[\n')888 level += 1889 for connectome_track_ in self.connectome_track:890 showIndent(outfile, level)891 outfile.write('model_.CTrack(\n')892 connectome_track_.exportLiteral(outfile, level, name_='CTrack')893 showIndent(outfile, level)894 outfile.write('),\n')895 level -= 1896 showIndent(outfile, level)897 outfile.write('],\n')898 showIndent(outfile, level)899 outfile.write('connectome_timeseries=[\n')900 level += 1901 for connectome_timeseries_ in self.connectome_timeseries:902 showIndent(outfile, level)903 outfile.write('model_.CTimeseries(\n')904 connectome_timeseries_.exportLiteral(outfile, level, name_='CTimeseries')905 showIndent(outfile, level)906 outfile.write('),\n')907 level -= 1908 showIndent(outfile, level)909 outfile.write('],\n')910 showIndent(outfile, level)911 outfile.write('connectome_data=[\n')912 level += 1913 for connectome_data_ in self.connectome_data:914 showIndent(outfile, level)915 outfile.write('model_.CData(\n')916 connectome_data_.exportLiteral(outfile, level, name_='CData')917 showIndent(outfile, level)918 outfile.write('),\n')919 level -= 1920 showIndent(outfile, level)921 outfile.write('],\n')922 showIndent(outfile, level)923 outfile.write('connectome_script=[\n')924 level += 1925 for connectome_script_ in self.connectome_script:926 showIndent(outfile, level)927 outfile.write('model_.CScript(\n')928 connectome_script_.exportLiteral(outfile, level, name_='CScript')929 showIndent(outfile, level)930 outfile.write('),\n')931 level -= 1932 showIndent(outfile, level)933 outfile.write('],\n')934 showIndent(outfile, level)935 outfile.write('connectome_imagestack=[\n')936 level += 1937 for connectome_imagestack_ in self.connectome_imagestack:938 showIndent(outfile, level)939 outfile.write('model_.CImagestack(\n')940 connectome_imagestack_.exportLiteral(outfile, level, name_='CImagestack')941 showIndent(outfile, level)942 outfile.write('),\n')943 level -= 1944 showIndent(outfile, level)945 outfile.write('],\n')946 def build(self, node):947 self.buildAttributes(node, node.attrib, [])948 for child in node:949 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]950 self.buildChildren(child, node, nodeName_)951 def buildAttributes(self, node, attrs, already_processed):952 pass953 def buildChildren(self, child_, node, nodeName_, from_subclass=False):954 if nodeName_ == 'connectome-meta': 955 obj_ = CMetadata.factory()956 obj_.build(child_)957 self.set_connectome_meta(obj_)958 elif nodeName_ == 'connectome-network': 959 obj_ = CNetwork.factory()960 obj_.build(child_)961 self.connectome_network.append(obj_)962 elif nodeName_ == 'connectome-surface': 963 obj_ = CSurface.factory()964 obj_.build(child_)965 self.connectome_surface.append(obj_)966 elif nodeName_ == 'connectome-volume': 967 obj_ = CVolume.factory()968 obj_.build(child_)969 self.connectome_volume.append(obj_)970 elif nodeName_ == 'connectome-track': 971 obj_ = CTrack.factory()972 obj_.build(child_)973 self.connectome_track.append(obj_)974 elif nodeName_ == 'connectome-timeseries': 975 obj_ = CTimeseries.factory()976 obj_.build(child_)977 self.connectome_timeseries.append(obj_)978 elif nodeName_ == 'connectome-data': 979 obj_ = CData.factory()980 obj_.build(child_)981 self.connectome_data.append(obj_)982 elif nodeName_ == 'connectome-script': 983 obj_ = CScript.factory()984 obj_.build(child_)985 self.connectome_script.append(obj_)986 elif nodeName_ == 'connectome-imagestack': 987 obj_ = CImagestack.factory()988 obj_.build(child_)989 self.connectome_imagestack.append(obj_)990# end class connectome991class CMetadata(GeneratedsSuper):992 """Defines the version of the Connectome Schema Definition the current993 Connectome File is compatible with. Should be 2.0"""994 subclass = None995 superclass = None996 def __init__(self, version=None, title=None, creator=None, publisher=None, created=None, modified=None, rights=None, license=None, references=None, relation=None, description=None, generator=None, species=None, email=None, metadata=None):997 self.version = _cast(None, version)998 self.title = title999 self.creator = creator1000 self.publisher = publisher1001 self.created = created1002 self.modified = modified1003 self.rights = rights1004 self.license = license1005 self.references = references1006 self.relation = relation1007 self.description = description1008 self.generator = generator1009 self.species = species1010 self.email = email1011 self.metadata = metadata1012 def factory(*args_, **kwargs_):1013 if CMetadata.subclass:1014 return CMetadata.subclass(*args_, **kwargs_)1015 else:1016 return CMetadata(*args_, **kwargs_)1017 factory = staticmethod(factory)1018 def get_title(self): return self.title1019 def set_title(self, title): self.title = title1020 def get_creator(self): return self.creator1021 def set_creator(self, creator): self.creator = creator1022 def get_publisher(self): return self.publisher1023 def set_publisher(self, publisher): self.publisher = publisher1024 def get_created(self): return self.created1025 def set_created(self, created): self.created = created1026 def get_modified(self): return self.modified1027 def set_modified(self, modified): self.modified = modified1028 def get_rights(self): return self.rights1029 def set_rights(self, rights): self.rights = rights1030 def get_license(self): return self.license1031 def set_license(self, license): self.license = license1032 def get_references(self): return self.references1033 def set_references(self, references): self.references = references1034 def get_relation(self): return self.relation1035 def set_relation(self, relation): self.relation = relation1036 def get_description(self): return self.description1037 def set_description(self, description): self.description = description1038 def get_generator(self): return self.generator1039 def set_generator(self, generator): self.generator = generator1040 def get_species(self): return self.species1041 def set_species(self, species): self.species = species1042 def get_email(self): return self.email1043 def set_email(self, email): self.email = email1044 def get_metadata(self): return self.metadata1045 def set_metadata(self, metadata): self.metadata = metadata1046 def get_version(self): return self.version1047 def set_version(self, version): self.version = version1048 def export(self, outfile, level, namespace_='cml:', name_='CMetadata', namespacedef_=''):1049 showIndent(outfile, level)1050 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1051 self.exportAttributes(outfile, level, [], namespace_, name_='CMetadata')1052 if self.hasContent_():1053 outfile.write('>\n')1054 self.exportChildren(outfile, level + 1, namespace_, name_)1055 showIndent(outfile, level)1056 outfile.write('</%s%s>\n' % (namespace_, name_))1057 else:1058 outfile.write('/>\n')1059 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CMetadata'):1060 if self.version is not None and 'version' not in already_processed:1061 already_processed.append('version')1062 outfile.write(' version=%s' % (self.gds_format_string(quote_attrib(self.version).encode(ExternalEncoding), input_name='version'), ))1063 def exportChildren(self, outfile, level, namespace_='cml:', name_='CMetadata'):1064 if self.title is not None:1065 showIndent(outfile, level)1066 outfile.write('<%stitle>%s</%stitle>\n' % (namespace_, self.gds_format_string(quote_xml(self.title).encode(ExternalEncoding), input_name='title'), namespace_))1067 if self.creator is not None:1068 showIndent(outfile, level)1069 outfile.write('<%screator>%s</%screator>\n' % (namespace_, self.gds_format_string(quote_xml(self.creator).encode(ExternalEncoding), input_name='creator'), namespace_))1070 if self.publisher is not None:1071 showIndent(outfile, level)1072 outfile.write('<%spublisher>%s</%spublisher>\n' % (namespace_, self.gds_format_string(quote_xml(self.publisher).encode(ExternalEncoding), input_name='publisher'), namespace_))1073 if self.created is not None:1074 showIndent(outfile, level)1075 outfile.write('<%screated>%s</%screated>\n' % (namespace_, self.gds_format_string(quote_xml(self.created).encode(ExternalEncoding), input_name='created'), namespace_))1076 if self.modified is not None:1077 showIndent(outfile, level)1078 outfile.write('<%smodified>%s</%smodified>\n' % (namespace_, self.gds_format_string(quote_xml(self.modified).encode(ExternalEncoding), input_name='modified'), namespace_))1079 if self.rights is not None:1080 showIndent(outfile, level)1081 outfile.write('<%srights>%s</%srights>\n' % (namespace_, self.gds_format_string(quote_xml(self.rights).encode(ExternalEncoding), input_name='rights'), namespace_))1082 if self.license is not None:1083 showIndent(outfile, level)1084 outfile.write('<%slicense>%s</%slicense>\n' % (namespace_, self.gds_format_string(quote_xml(self.license).encode(ExternalEncoding), input_name='license'), namespace_))1085 if self.references is not None:1086 showIndent(outfile, level)1087 outfile.write('<%sreferences>%s</%sreferences>\n' % (namespace_, self.gds_format_string(quote_xml(self.references).encode(ExternalEncoding), input_name='references'), namespace_))1088 if self.relation is not None:1089 showIndent(outfile, level)1090 outfile.write('<%srelation>%s</%srelation>\n' % (namespace_, self.gds_format_string(quote_xml(self.relation).encode(ExternalEncoding), input_name='relation'), namespace_))1091 if self.description is not None:1092 showIndent(outfile, level)1093 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))1094 if self.generator is not None:1095 showIndent(outfile, level)1096 outfile.write('<%sgenerator>%s</%sgenerator>\n' % (namespace_, self.gds_format_string(quote_xml(self.generator).encode(ExternalEncoding), input_name='generator'), namespace_))1097 if self.species is not None:1098 showIndent(outfile, level)1099 outfile.write('<%sspecies>%s</%sspecies>\n' % (namespace_, self.gds_format_string(quote_xml(self.species).encode(ExternalEncoding), input_name='species'), namespace_))1100 if self.email is not None:1101 showIndent(outfile, level)1102 outfile.write('<%semail>%s</%semail>\n' % (namespace_, self.gds_format_string(quote_xml(self.email).encode(ExternalEncoding), input_name='email'), namespace_))1103 if self.metadata:1104 self.metadata.export(outfile, level, namespace_, name_='metadata')1105 def hasContent_(self):1106 if (1107 self.title is not None or1108 self.creator is not None or1109 self.publisher is not None or1110 self.created is not None or1111 self.modified is not None or1112 self.rights is not None or1113 self.license is not None or1114 self.references is not None or1115 self.relation is not None or1116 self.description is not None or1117 self.generator is not None or1118 self.species is not None or1119 self.email is not None or1120 self.metadata is not None1121 ):1122 return True1123 else:1124 return False1125 def exportLiteral(self, outfile, level, name_='CMetadata'):1126 level += 11127 self.exportLiteralAttributes(outfile, level, [], name_)1128 if self.hasContent_():1129 self.exportLiteralChildren(outfile, level, name_)1130 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1131 if self.version is not None and 'version' not in already_processed:1132 already_processed.append('version')1133 showIndent(outfile, level)1134 outfile.write('version = "%s",\n' % (self.version,))1135 def exportLiteralChildren(self, outfile, level, name_):1136 if self.title is not None:1137 showIndent(outfile, level)1138 outfile.write('title=%s,\n' % quote_python(self.title).encode(ExternalEncoding))1139 if self.creator is not None:1140 showIndent(outfile, level)1141 outfile.write('creator=%s,\n' % quote_python(self.creator).encode(ExternalEncoding))1142 if self.publisher is not None:1143 showIndent(outfile, level)1144 outfile.write('publisher=%s,\n' % quote_python(self.publisher).encode(ExternalEncoding))1145 if self.created is not None:1146 showIndent(outfile, level)1147 outfile.write('created=%s,\n' % quote_python(self.created).encode(ExternalEncoding))1148 if self.modified is not None:1149 showIndent(outfile, level)1150 outfile.write('modified=%s,\n' % quote_python(self.modified).encode(ExternalEncoding))1151 if self.rights is not None:1152 showIndent(outfile, level)1153 outfile.write('rights=%s,\n' % quote_python(self.rights).encode(ExternalEncoding))1154 if self.license is not None:1155 showIndent(outfile, level)1156 outfile.write('license=%s,\n' % quote_python(self.license).encode(ExternalEncoding))1157 if self.references is not None:1158 showIndent(outfile, level)1159 outfile.write('references=%s,\n' % quote_python(self.references).encode(ExternalEncoding))1160 if self.relation is not None:1161 showIndent(outfile, level)1162 outfile.write('relation=%s,\n' % quote_python(self.relation).encode(ExternalEncoding))1163 if self.description is not None:1164 showIndent(outfile, level)1165 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))1166 if self.generator is not None:1167 showIndent(outfile, level)1168 outfile.write('generator=%s,\n' % quote_python(self.generator).encode(ExternalEncoding))1169 if self.species is not None:1170 showIndent(outfile, level)1171 outfile.write('species=%s,\n' % quote_python(self.species).encode(ExternalEncoding))1172 if self.email is not None:1173 showIndent(outfile, level)1174 outfile.write('email=%s,\n' % quote_python(self.email).encode(ExternalEncoding))1175 if self.metadata is not None:1176 showIndent(outfile, level)1177 outfile.write('metadata=model_.metadata(\n')1178 self.metadata.exportLiteral(outfile, level)1179 showIndent(outfile, level)1180 outfile.write('),\n')1181 def build(self, node):1182 self.buildAttributes(node, node.attrib, [])1183 for child in node:1184 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1185 self.buildChildren(child, node, nodeName_)1186 def buildAttributes(self, node, attrs, already_processed):1187 value = attrs.get('version')1188 if value is not None and 'version' not in already_processed:1189 already_processed.append('version')1190 self.version = value1191 def buildChildren(self, child_, node, nodeName_, from_subclass=False):1192 if nodeName_ == 'title':1193 title_ = child_.text1194 title_ = self.gds_validate_string(title_, node, 'title')1195 self.title = title_1196 elif nodeName_ == 'alternative': 1197 obj_ = alternative.factory()1198 obj_.build(child_)1199 self.set_title(obj_)1200 elif nodeName_ == 'creator':1201 creator_ = child_.text1202 creator_ = self.gds_validate_string(creator_, node, 'creator')1203 self.creator = creator_1204 elif nodeName_ == 'publisher':1205 publisher_ = child_.text1206 publisher_ = self.gds_validate_string(publisher_, node, 'publisher')1207 self.publisher = publisher_1208 elif nodeName_ == 'created':1209 created_ = child_.text1210 created_ = self.gds_validate_string(created_, node, 'created')1211 self.created = created_1212 elif nodeName_ == 'modified':1213 modified_ = child_.text1214 modified_ = self.gds_validate_string(modified_, node, 'modified')1215 self.modified = modified_1216 elif nodeName_ == 'rights':1217 rights_ = child_.text1218 rights_ = self.gds_validate_string(rights_, node, 'rights')1219 self.rights = rights_1220 elif nodeName_ == 'accessRights': 1221 obj_ = accessRights.factory()1222 obj_.build(child_)1223 self.set_rights(obj_)1224 elif nodeName_ == 'license': 1225 obj_ = license.factory()1226 obj_.build(child_)1227 self.set_rights(obj_)1228 elif nodeName_ == 'license':1229 license_ = child_.text1230 license_ = self.gds_validate_string(license_, node, 'license')1231 self.license = license_1232 elif nodeName_ == 'references':1233 references_ = child_.text1234 references_ = self.gds_validate_string(references_, node, 'references')1235 self.references = references_1236 elif nodeName_ == 'relation':1237 relation_ = child_.text1238 relation_ = self.gds_validate_string(relation_, node, 'relation')1239 self.relation = relation_1240 elif nodeName_ == 'isVersionOf': 1241 obj_ = isVersionOf.factory()1242 obj_.build(child_)1243 self.set_relation(obj_)1244 elif nodeName_ == 'hasVersion': 1245 obj_ = hasVersion.factory()1246 obj_.build(child_)1247 self.set_relation(obj_)1248 elif nodeName_ == 'isReplacedBy': 1249 obj_ = isReplacedBy.factory()1250 obj_.build(child_)1251 self.set_relation(obj_)1252 elif nodeName_ == 'replaces': 1253 obj_ = replaces.factory()1254 obj_.build(child_)1255 self.set_relation(obj_)1256 elif nodeName_ == 'isRequiredBy': 1257 obj_ = isRequiredBy.factory()1258 obj_.build(child_)1259 self.set_relation(obj_)1260 elif nodeName_ == 'requires': 1261 obj_ = requires.factory()1262 obj_.build(child_)1263 self.set_relation(obj_)1264 elif nodeName_ == 'isPartOf': 1265 obj_ = isPartOf.factory()1266 obj_.build(child_)1267 self.set_relation(obj_)1268 elif nodeName_ == 'hasPart': 1269 obj_ = hasPart.factory()1270 obj_.build(child_)1271 self.set_relation(obj_)1272 elif nodeName_ == 'isReferencedBy': 1273 obj_ = isReferencedBy.factory()1274 obj_.build(child_)1275 self.set_relation(obj_)1276 elif nodeName_ == 'references': 1277 obj_ = references.factory()1278 obj_.build(child_)1279 self.set_relation(obj_)1280 elif nodeName_ == 'isFormatOf': 1281 obj_ = isFormatOf.factory()1282 obj_.build(child_)1283 self.set_relation(obj_)1284 elif nodeName_ == 'hasFormat': 1285 obj_ = hasFormat.factory()1286 obj_.build(child_)1287 self.set_relation(obj_)1288 elif nodeName_ == 'conformsTo': 1289 obj_ = conformsTo.factory()1290 obj_.build(child_)1291 self.set_relation(obj_)1292 elif nodeName_ == 'description':1293 description_ = child_.text1294 description_ = self.gds_validate_string(description_, node, 'description')1295 self.description = description_1296 elif nodeName_ == 'tableOfContents': 1297 obj_ = tableOfContents.factory()1298 obj_.build(child_)1299 self.set_description(obj_)1300 elif nodeName_ == 'abstract': 1301 obj_ = abstract.factory()1302 obj_.build(child_)1303 self.set_description(obj_)1304 elif nodeName_ == 'generator':1305 generator_ = child_.text1306 generator_ = self.gds_validate_string(generator_, node, 'generator')1307 self.generator = generator_1308 elif nodeName_ == 'species':1309 species_ = child_.text1310 species_ = self.gds_validate_string(species_, node, 'species')1311 self.species = species_1312 elif nodeName_ == 'email':1313 email_ = child_.text1314 email_ = self.gds_validate_string(email_, node, 'email')1315 self.email = email_1316 elif nodeName_ == 'metadata': 1317 obj_ = metadata.factory()1318 obj_.build(child_)1319 self.set_metadata(obj_)1320# end class CMetadata1321class CNetwork(GeneratedsSuper):1322 """The short name of the network The path to the file according to1323 location attribute Is the network stored it "GEXF" or "GraphML"1324 format, "NXGPickle" as NetworkX pickled object, or "Other"1325 format? - dtype="AttributeNetwork" A network with arbitrary1326 number of attributes for nodes and edges. -1327 dtype="DynamicNetwork" Network with either with lifespan1328 attributes for nodes and edges (See GEXF) or timeseries on nodes1329 and edges. - dtype="HierarchicalNetwork" Network with1330 hierarchical structure. - dtype="StructuralNetwork" A structural1331 network e.g. derived from Diffusion MRI -1332 dtype="FunctionalNetwork" Networks derived from functional1333 measures such as EEG/MEG/fMRI/PET etc. -1334 dtype="EffectiveNetwork" Networks representing effective1335 connectivity - dtype="Other" Other kind of network."""1336 subclass = None1337 superclass = None1338 def __init__(self, src=None, dtype='AttributeNetwork', name=None, fileformat='GraphML', metadata=None, description=None):1339 self.src = _cast(None, src)1340 self.dtype = _cast(None, dtype)1341 self.name = _cast(None, name)1342 self.fileformat = _cast(None, fileformat)1343 self.metadata = metadata1344 self.description = description1345 def factory(*args_, **kwargs_):1346 if CNetwork.subclass:1347 return CNetwork.subclass(*args_, **kwargs_)1348 else:1349 return CNetwork(*args_, **kwargs_)1350 factory = staticmethod(factory)1351 def get_metadata(self): return self.metadata1352 def set_metadata(self, metadata): self.metadata = metadata1353 def get_description(self): return self.description1354 def set_description(self, description): self.description = description1355 def get_src(self): return self.src1356 def set_src(self, src): self.src = src1357 def get_dtype(self): return self.dtype1358 def set_dtype(self, dtype): self.dtype = dtype1359 def validate_networkEnumDType(self, value):1360 # Validate type networkEnumDType, a restriction on xsd:string.1361 pass1362 def get_name(self): return self.name1363 def set_name(self, name): self.name = name1364 def get_fileformat(self): return self.fileformat1365 def set_fileformat(self, fileformat): self.fileformat = fileformat1366 def validate_networkFileFormat(self, value):1367 # Validate type networkFileFormat, a restriction on xsd:string.1368 pass1369 def export(self, outfile, level, namespace_='cml:', name_='CNetwork', namespacedef_=''):1370 showIndent(outfile, level)1371 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1372 self.exportAttributes(outfile, level, [], namespace_, name_='CNetwork')1373 if self.hasContent_():1374 outfile.write('>\n')1375 self.exportChildren(outfile, level + 1, namespace_, name_)1376 showIndent(outfile, level)1377 outfile.write('</%s%s>\n' % (namespace_, name_))1378 else:1379 outfile.write('/>\n')1380 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CNetwork'):1381 if self.src is not None and 'src' not in already_processed:1382 already_processed.append('src')1383 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))1384 if self.dtype is not None and 'dtype' not in already_processed:1385 already_processed.append('dtype')1386 outfile.write(' dtype=%s' % (quote_attrib(self.dtype), ))1387 if self.name is not None and 'name' not in already_processed:1388 already_processed.append('name')1389 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))1390 if self.fileformat is not None and 'fileformat' not in already_processed:1391 already_processed.append('fileformat')1392 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))1393 def exportChildren(self, outfile, level, namespace_='cml:', name_='CNetwork'):1394 if self.metadata:1395 self.metadata.export(outfile, level, namespace_, name_='metadata')1396 if self.description is not None:1397 showIndent(outfile, level)1398 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))1399 def hasContent_(self):1400 if (1401 self.metadata is not None or1402 self.description is not None1403 ):1404 return True1405 else:1406 return False1407 def exportLiteral(self, outfile, level, name_='CNetwork'):1408 level += 11409 self.exportLiteralAttributes(outfile, level, [], name_)1410 if self.hasContent_():1411 self.exportLiteralChildren(outfile, level, name_)1412 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1413 if self.src is not None and 'src' not in already_processed:1414 already_processed.append('src')1415 showIndent(outfile, level)1416 outfile.write('src = "%s",\n' % (self.src,))1417 if self.dtype is not None and 'dtype' not in already_processed:1418 already_processed.append('dtype')1419 showIndent(outfile, level)1420 outfile.write('dtype = "%s",\n' % (self.dtype,))1421 if self.name is not None and 'name' not in already_processed:1422 already_processed.append('name')1423 showIndent(outfile, level)1424 outfile.write('name = "%s",\n' % (self.name,))1425 if self.fileformat is not None and 'fileformat' not in already_processed:1426 already_processed.append('fileformat')1427 showIndent(outfile, level)1428 outfile.write('fileformat = "%s",\n' % (self.fileformat,))1429 def exportLiteralChildren(self, outfile, level, name_):1430 if self.metadata is not None:1431 showIndent(outfile, level)1432 outfile.write('metadata=model_.metadata(\n')1433 self.metadata.exportLiteral(outfile, level)1434 showIndent(outfile, level)1435 outfile.write('),\n')1436 if self.description is not None:1437 showIndent(outfile, level)1438 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))1439 def build(self, node):1440 self.buildAttributes(node, node.attrib, [])1441 for child in node:1442 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1443 self.buildChildren(child, node, nodeName_)1444 def buildAttributes(self, node, attrs, already_processed):1445 value = attrs.get('src')1446 if value is not None and 'src' not in already_processed:1447 already_processed.append('src')1448 self.src = value1449 value = attrs.get('dtype')1450 if value is not None and 'dtype' not in already_processed:1451 already_processed.append('dtype')1452 self.dtype = value1453 self.validate_networkEnumDType(self.dtype) # validate type networkEnumDType1454 value = attrs.get('name')1455 if value is not None and 'name' not in already_processed:1456 already_processed.append('name')1457 self.name = value1458 value = attrs.get('fileformat')1459 if value is not None and 'fileformat' not in already_processed:1460 already_processed.append('fileformat')1461 self.fileformat = value1462 self.validate_networkFileFormat(self.fileformat) # validate type networkFileFormat1463 def buildChildren(self, child_, node, nodeName_, from_subclass=False):1464 if nodeName_ == 'metadata': 1465 obj_ = metadata.factory()1466 obj_.build(child_)1467 self.set_metadata(obj_)1468 elif nodeName_ == 'description':1469 description_ = child_.text1470 description_ = self.gds_validate_string(description_, node, 'description')1471 self.description = description_1472 elif nodeName_ == 'tableOfContents': 1473 obj_ = tableOfContents.factory()1474 obj_.build(child_)1475 self.set_description(obj_)1476 elif nodeName_ == 'abstract': 1477 obj_ = abstract.factory()1478 obj_.build(child_)1479 self.set_description(obj_)1480# end class CNetwork1481class CSurface(GeneratedsSuper):1482 """Descriptive name of the surface. The path to the file according to1483 location attribute Set to "gifti" to use the only supported1484 Gifti format by cfflib. See1485 http://www.nitrc.org/frs/download.php/158/gifti.xsd for schema1486 information Use "Other" for other formats with custom IO1487 Handling What type of surface does the Gifti file contain: -1488 type="Labeling" The Gifti file contains surface labels. This1489 file can be referenced in connectome-network with either the1490 name attribute or in addition to another surface defined by name1491 and using the labelname attribute and matching labelid. If1492 referenced in such a way, the networks' nodes attribute1493 dn_intensityvalue value may match the label array integers,1494 thereby relating a network node to a surface patch (a region of1495 interest defined on the surface). See also example datasets. -1496 type="Surfaceset" The Gifti file contains a set of surfaces1497 where the metadata tag AnatomicalStructurePrimary match.1498 Individual elements of the set are distinguished by the metadta1499 tag AnatomicalStructureSecondary. The Gifti file contains1500 information about the coordinate system used. -1501 type="Surfaceset+Labeling" If the Gifti file contains data as1502 described for both surfaceset and label above. - type="Other"1503 Any other kind of data storable in a Gifti file."""1504 subclass = None1505 superclass = None1506 def __init__(self, src=None, dtype='Surfaceset', name=None, fileformat=None, description=None, metadata=None):1507 self.src = _cast(None, src)1508 self.dtype = _cast(None, dtype)1509 self.name = _cast(None, name)1510 self.fileformat = _cast(None, fileformat)1511 self.description = description1512 self.metadata = metadata1513 def factory(*args_, **kwargs_):1514 if CSurface.subclass:1515 return CSurface.subclass(*args_, **kwargs_)1516 else:1517 return CSurface(*args_, **kwargs_)1518 factory = staticmethod(factory)1519 def get_description(self): return self.description1520 def set_description(self, description): self.description = description1521 def get_metadata(self): return self.metadata1522 def set_metadata(self, metadata): self.metadata = metadata1523 def get_src(self): return self.src1524 def set_src(self, src): self.src = src1525 def get_dtype(self): return self.dtype1526 def set_dtype(self, dtype): self.dtype = dtype1527 def validate_surfaceEnumDType(self, value):1528 # Validate type surfaceEnumDType, a restriction on xsd:string.1529 pass1530 def get_name(self): return self.name1531 def set_name(self, name): self.name = name1532 def get_fileformat(self): return self.fileformat1533 def set_fileformat(self, fileformat): self.fileformat = fileformat1534 def validate_surfaceFileFormat(self, value):1535 # Validate type surfaceFileFormat, a restriction on xsd:string.1536 pass1537 def export(self, outfile, level, namespace_='cml:', name_='CSurface', namespacedef_=''):1538 showIndent(outfile, level)1539 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1540 self.exportAttributes(outfile, level, [], namespace_, name_='CSurface')1541 if self.hasContent_():1542 outfile.write('>\n')1543 self.exportChildren(outfile, level + 1, namespace_, name_)1544 showIndent(outfile, level)1545 outfile.write('</%s%s>\n' % (namespace_, name_))1546 else:1547 outfile.write('/>\n')1548 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CSurface'):1549 if self.src is not None and 'src' not in already_processed:1550 already_processed.append('src')1551 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))1552 if self.dtype is not None and 'dtype' not in already_processed:1553 already_processed.append('dtype')1554 outfile.write(' dtype=%s' % (quote_attrib(self.dtype), ))1555 if self.name is not None and 'name' not in already_processed:1556 already_processed.append('name')1557 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))1558 if self.fileformat is not None and 'fileformat' not in already_processed:1559 already_processed.append('fileformat')1560 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))1561 def exportChildren(self, outfile, level, namespace_='cml:', name_='CSurface'):1562 if self.description is not None:1563 showIndent(outfile, level)1564 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))1565 if self.metadata:1566 self.metadata.export(outfile, level, namespace_, name_='metadata', )1567 def hasContent_(self):1568 if (1569 self.description is not None or1570 self.metadata is not None1571 ):1572 return True1573 else:1574 return False1575 def exportLiteral(self, outfile, level, name_='CSurface'):1576 level += 11577 self.exportLiteralAttributes(outfile, level, [], name_)1578 if self.hasContent_():1579 self.exportLiteralChildren(outfile, level, name_)1580 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1581 if self.src is not None and 'src' not in already_processed:1582 already_processed.append('src')1583 showIndent(outfile, level)1584 outfile.write('src = "%s",\n' % (self.src,))1585 if self.dtype is not None and 'dtype' not in already_processed:1586 already_processed.append('dtype')1587 showIndent(outfile, level)1588 outfile.write('dtype = "%s",\n' % (self.dtype,))1589 if self.name is not None and 'name' not in already_processed:1590 already_processed.append('name')1591 showIndent(outfile, level)1592 outfile.write('name = "%s",\n' % (self.name,))1593 if self.fileformat is not None and 'fileformat' not in already_processed:1594 already_processed.append('fileformat')1595 showIndent(outfile, level)1596 outfile.write('fileformat = "%s",\n' % (self.fileformat,))1597 def exportLiteralChildren(self, outfile, level, name_):1598 if self.description is not None:1599 showIndent(outfile, level)1600 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))1601 if self.metadata is not None:1602 showIndent(outfile, level)1603 outfile.write('metadata=model_.metadata(\n')1604 self.metadata.exportLiteral(outfile, level)1605 showIndent(outfile, level)1606 outfile.write('),\n')1607 def build(self, node):1608 self.buildAttributes(node, node.attrib, [])1609 for child in node:1610 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1611 self.buildChildren(child, node, nodeName_)1612 def buildAttributes(self, node, attrs, already_processed):1613 value = attrs.get('src')1614 if value is not None and 'src' not in already_processed:1615 already_processed.append('src')1616 self.src = value1617 value = attrs.get('dtype')1618 if value is not None and 'dtype' not in already_processed:1619 already_processed.append('dtype')1620 self.dtype = value1621 self.validate_surfaceEnumDType(self.dtype) # validate type surfaceEnumDType1622 value = attrs.get('name')1623 if value is not None and 'name' not in already_processed:1624 already_processed.append('name')1625 self.name = value1626 value = attrs.get('fileformat')1627 if value is not None and 'fileformat' not in already_processed:1628 already_processed.append('fileformat')1629 self.fileformat = value1630 self.validate_surfaceFileFormat(self.fileformat) # validate type surfaceFileFormat1631 def buildChildren(self, child_, node, nodeName_, from_subclass=False):1632 if nodeName_ == 'description':1633 description_ = child_.text1634 description_ = self.gds_validate_string(description_, node, 'description')1635 self.description = description_1636 elif nodeName_ == 'tableOfContents': 1637 obj_ = tableOfContents.factory()1638 obj_.build(child_)1639 self.set_description(obj_)1640 elif nodeName_ == 'abstract': 1641 obj_ = abstract.factory()1642 obj_.build(child_)1643 self.set_description(obj_)1644 elif nodeName_ == 'metadata': 1645 obj_ = metadata.factory()1646 obj_.build(child_)1647 self.set_metadata(obj_)1648# end class CSurface1649class CVolume(GeneratedsSuper):1650 """Name of the volume. The path to the file according to location1651 attribute Set to "Nifti1" to use the only supported Nifti1652 format. This works also for compressed files with name ending1653 .nii.gz The Nifti file contains information about the coordinate1654 system used. Set type of volume the Nifti file contains: -1655 type="Segmentation" The Nifti file contains a single volume1656 where the voxel values are integers, representing a segmented1657 Region of Interest. If this volume is referenced by a1658 connectome-network, its nodes dn_intensityvalue attribute may1659 match these integer values. Such a segmentation volume can1660 referenced in a connectome-volume by the segmentationname1661 attribute in addition to another, e.g. T1-weighted volume which1662 is referenced by the name attribute. See also example datasets.1663 - type="T1-weighted" The Nifti file contains a T1-weighted1664 volume. - type="T2-weighted" The Nifti file contains a1665 T2-weighted volume. - type="PD-weighted" The voxel values1666 represent a proton-density weighted signal. - type="fMRI" The1667 Nifti file contains functional MRI time series data. -1668 type="Probabilitymap" Voxel values are in the range [0,1]. Can1669 stand for tissue probability maps. - type="MD" Diffusion-related1670 signal. Stands for mean diffusivity. - type="FA" Diffusion-1671 related signal. Stands for fractional anisotropy. - type="LD"1672 Diffusion-related signal. Stands for longitudinal diffusivity. -1673 type="TD" Diffusion-related signal. Stands for transversal1674 diffusivity. - type="FLAIR" Stands for Fluid attenuated1675 inversion recovery - type="MRA" Stands for Magnetic resonance1676 angiography - type="MRS" Stands for Magnetic resonance1677 spectroscopy"""1678 subclass = None1679 superclass = None1680 def __init__(self, src=None, dtype=None, name=None, fileformat='Nifti1', description=None, metadata=None):1681 self.src = _cast(None, src)1682 self.dtype = _cast(None, dtype)1683 self.name = _cast(None, name)1684 self.fileformat = _cast(None, fileformat)1685 self.description = description1686 self.metadata = metadata1687 def factory(*args_, **kwargs_):1688 if CVolume.subclass:1689 return CVolume.subclass(*args_, **kwargs_)1690 else:1691 return CVolume(*args_, **kwargs_)1692 factory = staticmethod(factory)1693 def get_description(self): return self.description1694 def set_description(self, description): self.description = description1695 def get_metadata(self): return self.metadata1696 def set_metadata(self, metadata): self.metadata = metadata1697 def get_src(self): return self.src1698 def set_src(self, src): self.src = src1699 def get_dtype(self): return self.dtype1700 def set_dtype(self, dtype): self.dtype = dtype1701 def validate_volumeEnumDType(self, value):1702 # Validate type volumeEnumDType, a restriction on xsd:string.1703 pass1704 def get_name(self): return self.name1705 def set_name(self, name): self.name = name1706 def get_fileformat(self): return self.fileformat1707 def set_fileformat(self, fileformat): self.fileformat = fileformat1708 def validate_volumeFileFormat(self, value):1709 # Validate type volumeFileFormat, a restriction on xsd:string.1710 pass1711 def export(self, outfile, level, namespace_='cml:', name_='CVolume', namespacedef_=''):1712 showIndent(outfile, level)1713 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1714 self.exportAttributes(outfile, level, [], namespace_, name_='CVolume')1715 if self.hasContent_():1716 outfile.write('>\n')1717 self.exportChildren(outfile, level + 1, namespace_, name_)1718 showIndent(outfile, level)1719 outfile.write('</%s%s>\n' % (namespace_, name_))1720 else:1721 outfile.write('/>\n')1722 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CVolume'):1723 if self.src is not None and 'src' not in already_processed:1724 already_processed.append('src')1725 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))1726 if self.dtype is not None and 'dtype' not in already_processed:1727 already_processed.append('dtype')1728 outfile.write(' dtype=%s' % (quote_attrib(self.dtype), ))1729 if self.name is not None and 'name' not in already_processed:1730 already_processed.append('name')1731 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))1732 if self.fileformat is not None and 'fileformat' not in already_processed:1733 already_processed.append('fileformat')1734 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))1735 def exportChildren(self, outfile, level, namespace_='cml:', name_='CVolume'):1736 if self.description is not None:1737 showIndent(outfile, level)1738 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))1739 if self.metadata:1740 self.metadata.export(outfile, level, namespace_, name_='metadata', )1741 def hasContent_(self):1742 if (1743 self.description is not None or1744 self.metadata is not None1745 ):1746 return True1747 else:1748 return False1749 def exportLiteral(self, outfile, level, name_='CVolume'):1750 level += 11751 self.exportLiteralAttributes(outfile, level, [], name_)1752 if self.hasContent_():1753 self.exportLiteralChildren(outfile, level, name_)1754 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1755 if self.src is not None and 'src' not in already_processed:1756 already_processed.append('src')1757 showIndent(outfile, level)1758 outfile.write('src = "%s",\n' % (self.src,))1759 if self.dtype is not None and 'dtype' not in already_processed:1760 already_processed.append('dtype')1761 showIndent(outfile, level)1762 outfile.write('dtype = "%s",\n' % (self.dtype,))1763 if self.name is not None and 'name' not in already_processed:1764 already_processed.append('name')1765 showIndent(outfile, level)1766 outfile.write('name = "%s",\n' % (self.name,))1767 if self.fileformat is not None and 'fileformat' not in already_processed:1768 already_processed.append('fileformat')1769 showIndent(outfile, level)1770 outfile.write('fileformat = "%s",\n' % (self.fileformat,))1771 def exportLiteralChildren(self, outfile, level, name_):1772 if self.description is not None:1773 showIndent(outfile, level)1774 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))1775 if self.metadata is not None:1776 showIndent(outfile, level)1777 outfile.write('metadata=model_.metadata(\n')1778 self.metadata.exportLiteral(outfile, level)1779 showIndent(outfile, level)1780 outfile.write('),\n')1781 def build(self, node):1782 self.buildAttributes(node, node.attrib, [])1783 for child in node:1784 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1785 self.buildChildren(child, node, nodeName_)1786 def buildAttributes(self, node, attrs, already_processed):1787 value = attrs.get('src')1788 if value is not None and 'src' not in already_processed:1789 already_processed.append('src')1790 self.src = value1791 value = attrs.get('dtype')1792 if value is not None and 'dtype' not in already_processed:1793 already_processed.append('dtype')1794 self.dtype = value1795 self.validate_volumeEnumDType(self.dtype) # validate type volumeEnumDType1796 value = attrs.get('name')1797 if value is not None and 'name' not in already_processed:1798 already_processed.append('name')1799 self.name = value1800 value = attrs.get('fileformat')1801 if value is not None and 'fileformat' not in already_processed:1802 already_processed.append('fileformat')1803 self.fileformat = value1804 self.validate_volumeFileFormat(self.fileformat) # validate type volumeFileFormat1805 def buildChildren(self, child_, node, nodeName_, from_subclass=False):1806 if nodeName_ == 'description':1807 description_ = child_.text1808 description_ = self.gds_validate_string(description_, node, 'description')1809 self.description = description_1810 elif nodeName_ == 'tableOfContents': 1811 obj_ = tableOfContents.factory()1812 obj_.build(child_)1813 self.set_description(obj_)1814 elif nodeName_ == 'abstract': 1815 obj_ = abstract.factory()1816 obj_.build(child_)1817 self.set_description(obj_)1818 elif nodeName_ == 'metadata': 1819 obj_ = metadata.factory()1820 obj_.build(child_)1821 self.set_metadata(obj_)1822# end class CVolume1823class CTrack(GeneratedsSuper):1824 """Name of the track file. The path to the file according to location1825 attribute Set to "TrackVis" (default) to use the only supported1826 TrackVis file format. The TrackVis file format allows to store1827 any number of additional numerical data on the individual1828 fibers."""1829 subclass = None1830 superclass = None1831 def __init__(self, src=None, dtype=None, name=None, fileformat='TrackVis', description=None, metadata=None):1832 self.src = _cast(None, src)1833 self.dtype = _cast(None, dtype)1834 self.name = _cast(None, name)1835 self.fileformat = _cast(None, fileformat)1836 self.description = description1837 self.metadata = metadata1838 def factory(*args_, **kwargs_):1839 if CTrack.subclass:1840 return CTrack.subclass(*args_, **kwargs_)1841 else:1842 return CTrack(*args_, **kwargs_)1843 factory = staticmethod(factory)1844 def get_description(self): return self.description1845 def set_description(self, description): self.description = description1846 def get_metadata(self): return self.metadata1847 def set_metadata(self, metadata): self.metadata = metadata1848 def get_src(self): return self.src1849 def set_src(self, src): self.src = src1850 def get_dtype(self): return self.dtype1851 def set_dtype(self, dtype): self.dtype = dtype1852 def get_name(self): return self.name1853 def set_name(self, name): self.name = name1854 def get_fileformat(self): return self.fileformat1855 def set_fileformat(self, fileformat): self.fileformat = fileformat1856 def validate_trackFileFormat(self, value):1857 # Validate type trackFileFormat, a restriction on xsd:string.1858 pass1859 def export(self, outfile, level, namespace_='cml:', name_='CTrack', namespacedef_=''):1860 showIndent(outfile, level)1861 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))1862 self.exportAttributes(outfile, level, [], namespace_, name_='CTrack')1863 if self.hasContent_():1864 outfile.write('>\n')1865 self.exportChildren(outfile, level + 1, namespace_, name_)1866 showIndent(outfile, level)1867 outfile.write('</%s%s>\n' % (namespace_, name_))1868 else:1869 outfile.write('/>\n')1870 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CTrack'):1871 if self.src is not None and 'src' not in already_processed:1872 already_processed.append('src')1873 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))1874 if self.dtype is not None and 'dtype' not in already_processed:1875 already_processed.append('dtype')1876 outfile.write(' dtype=%s' % (self.gds_format_string(quote_attrib(self.dtype).encode(ExternalEncoding), input_name='dtype'), ))1877 if self.name is not None and 'name' not in already_processed:1878 already_processed.append('name')1879 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))1880 if self.fileformat is not None and 'fileformat' not in already_processed:1881 already_processed.append('fileformat')1882 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))1883 def exportChildren(self, outfile, level, namespace_='cml:', name_='CTrack'):1884 if self.description is not None:1885 showIndent(outfile, level)1886 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))1887 if self.metadata:1888 self.metadata.export(outfile, level, namespace_, name_='metadata', )1889 def hasContent_(self):1890 if (1891 self.description is not None or1892 self.metadata is not None1893 ):1894 return True1895 else:1896 return False1897 def exportLiteral(self, outfile, level, name_='CTrack'):1898 level += 11899 self.exportLiteralAttributes(outfile, level, [], name_)1900 if self.hasContent_():1901 self.exportLiteralChildren(outfile, level, name_)1902 def exportLiteralAttributes(self, outfile, level, already_processed, name_):1903 if self.src is not None and 'src' not in already_processed:1904 already_processed.append('src')1905 showIndent(outfile, level)1906 outfile.write('src = "%s",\n' % (self.src,))1907 if self.dtype is not None and 'dtype' not in already_processed:1908 already_processed.append('dtype')1909 showIndent(outfile, level)1910 outfile.write('dtype = "%s",\n' % (self.dtype,))1911 if self.name is not None and 'name' not in already_processed:1912 already_processed.append('name')1913 showIndent(outfile, level)1914 outfile.write('name = "%s",\n' % (self.name,))1915 if self.fileformat is not None and 'fileformat' not in already_processed:1916 already_processed.append('fileformat')1917 showIndent(outfile, level)1918 outfile.write('fileformat = "%s",\n' % (self.fileformat,))1919 def exportLiteralChildren(self, outfile, level, name_):1920 if self.description is not None:1921 showIndent(outfile, level)1922 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))1923 if self.metadata is not None:1924 showIndent(outfile, level)1925 outfile.write('metadata=model_.metadata(\n')1926 self.metadata.exportLiteral(outfile, level)1927 showIndent(outfile, level)1928 outfile.write('),\n')1929 def build(self, node):1930 self.buildAttributes(node, node.attrib, [])1931 for child in node:1932 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]1933 self.buildChildren(child, node, nodeName_)1934 def buildAttributes(self, node, attrs, already_processed):1935 value = attrs.get('src')1936 if value is not None and 'src' not in already_processed:1937 already_processed.append('src')1938 self.src = value1939 value = attrs.get('dtype')1940 if value is not None and 'dtype' not in already_processed:1941 already_processed.append('dtype')1942 self.dtype = value1943 value = attrs.get('name')1944 if value is not None and 'name' not in already_processed:1945 already_processed.append('name')1946 self.name = value1947 value = attrs.get('fileformat')1948 if value is not None and 'fileformat' not in already_processed:1949 already_processed.append('fileformat')1950 self.fileformat = value1951 self.validate_trackFileFormat(self.fileformat) # validate type trackFileFormat1952 def buildChildren(self, child_, node, nodeName_, from_subclass=False):1953 if nodeName_ == 'description':1954 description_ = child_.text1955 description_ = self.gds_validate_string(description_, node, 'description')1956 self.description = description_1957 elif nodeName_ == 'tableOfContents': 1958 obj_ = tableOfContents.factory()1959 obj_.build(child_)1960 self.set_description(obj_)1961 elif nodeName_ == 'abstract': 1962 obj_ = abstract.factory()1963 obj_.build(child_)1964 self.set_description(obj_)1965 elif nodeName_ == 'metadata': 1966 obj_ = metadata.factory()1967 obj_.build(child_)1968 self.set_metadata(obj_)1969# end class CTrack1970class CTimeseries(GeneratedsSuper):1971 """Name of the timeseries. The path to the file according to location1972 attribute Set to "HDF5" (default) to use the only supported1973 Hierarchical Data File format. The HDF5 allows to store any1974 number of time series or other large homogeneous data."""1975 subclass = None1976 superclass = None1977 def __init__(self, src=None, dtype=None, name=None, fileformat='HDF5', description=None, metadata=None):1978 self.src = _cast(None, src)1979 self.dtype = _cast(None, dtype)1980 self.name = _cast(None, name)1981 self.fileformat = _cast(None, fileformat)1982 self.description = description1983 self.metadata = metadata1984 def factory(*args_, **kwargs_):1985 if CTimeseries.subclass:1986 return CTimeseries.subclass(*args_, **kwargs_)1987 else:1988 return CTimeseries(*args_, **kwargs_)1989 factory = staticmethod(factory)1990 def get_description(self): return self.description1991 def set_description(self, description): self.description = description1992 def get_metadata(self): return self.metadata1993 def set_metadata(self, metadata): self.metadata = metadata1994 def get_src(self): return self.src1995 def set_src(self, src): self.src = src1996 def get_dtype(self): return self.dtype1997 def set_dtype(self, dtype): self.dtype = dtype1998 def get_name(self): return self.name1999 def set_name(self, name): self.name = name2000 def get_fileformat(self): return self.fileformat2001 def set_fileformat(self, fileformat): self.fileformat = fileformat2002 def validate_timeserieFileFormat(self, value):2003 # Validate type timeserieFileFormat, a restriction on xsd:string.2004 pass2005 def export(self, outfile, level, namespace_='cml:', name_='CTimeseries', namespacedef_=''):2006 showIndent(outfile, level)2007 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2008 self.exportAttributes(outfile, level, [], namespace_, name_='CTimeseries')2009 if self.hasContent_():2010 outfile.write('>\n')2011 self.exportChildren(outfile, level + 1, namespace_, name_)2012 showIndent(outfile, level)2013 outfile.write('</%s%s>\n' % (namespace_, name_))2014 else:2015 outfile.write('/>\n')2016 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CTimeseries'):2017 if self.src is not None and 'src' not in already_processed:2018 already_processed.append('src')2019 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))2020 if self.dtype is not None and 'dtype' not in already_processed:2021 already_processed.append('dtype')2022 outfile.write(' dtype=%s' % (self.gds_format_string(quote_attrib(self.dtype).encode(ExternalEncoding), input_name='dtype'), ))2023 if self.name is not None and 'name' not in already_processed:2024 already_processed.append('name')2025 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))2026 if self.fileformat is not None and 'fileformat' not in already_processed:2027 already_processed.append('fileformat')2028 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))2029 def exportChildren(self, outfile, level, namespace_='cml:', name_='CTimeseries'):2030 if self.description is not None:2031 showIndent(outfile, level)2032 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))2033 if self.metadata:2034 self.metadata.export(outfile, level, namespace_, name_='metadata', )2035 def hasContent_(self):2036 if (2037 self.description is not None or2038 self.metadata is not None2039 ):2040 return True2041 else:2042 return False2043 def exportLiteral(self, outfile, level, name_='CTimeseries'):2044 level += 12045 self.exportLiteralAttributes(outfile, level, [], name_)2046 if self.hasContent_():2047 self.exportLiteralChildren(outfile, level, name_)2048 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2049 if self.src is not None and 'src' not in already_processed:2050 already_processed.append('src')2051 showIndent(outfile, level)2052 outfile.write('src = "%s",\n' % (self.src,))2053 if self.dtype is not None and 'dtype' not in already_processed:2054 already_processed.append('dtype')2055 showIndent(outfile, level)2056 outfile.write('dtype = "%s",\n' % (self.dtype,))2057 if self.name is not None and 'name' not in already_processed:2058 already_processed.append('name')2059 showIndent(outfile, level)2060 outfile.write('name = "%s",\n' % (self.name,))2061 if self.fileformat is not None and 'fileformat' not in already_processed:2062 already_processed.append('fileformat')2063 showIndent(outfile, level)2064 outfile.write('fileformat = "%s",\n' % (self.fileformat,))2065 def exportLiteralChildren(self, outfile, level, name_):2066 if self.description is not None:2067 showIndent(outfile, level)2068 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))2069 if self.metadata is not None:2070 showIndent(outfile, level)2071 outfile.write('metadata=model_.metadata(\n')2072 self.metadata.exportLiteral(outfile, level)2073 showIndent(outfile, level)2074 outfile.write('),\n')2075 def build(self, node):2076 self.buildAttributes(node, node.attrib, [])2077 for child in node:2078 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2079 self.buildChildren(child, node, nodeName_)2080 def buildAttributes(self, node, attrs, already_processed):2081 value = attrs.get('src')2082 if value is not None and 'src' not in already_processed:2083 already_processed.append('src')2084 self.src = value2085 value = attrs.get('dtype')2086 if value is not None and 'dtype' not in already_processed:2087 already_processed.append('dtype')2088 self.dtype = value2089 value = attrs.get('name')2090 if value is not None and 'name' not in already_processed:2091 already_processed.append('name')2092 self.name = value2093 value = attrs.get('fileformat')2094 if value is not None and 'fileformat' not in already_processed:2095 already_processed.append('fileformat')2096 self.fileformat = value2097 self.validate_timeserieFileFormat(self.fileformat) # validate type timeserieFileFormat2098 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2099 if nodeName_ == 'description':2100 description_ = child_.text2101 description_ = self.gds_validate_string(description_, node, 'description')2102 self.description = description_2103 elif nodeName_ == 'tableOfContents': 2104 obj_ = tableOfContents.factory()2105 obj_.build(child_)2106 self.set_description(obj_)2107 elif nodeName_ == 'abstract': 2108 obj_ = abstract.factory()2109 obj_.build(child_)2110 self.set_description(obj_)2111 elif nodeName_ == 'metadata': 2112 obj_ = metadata.factory()2113 obj_.build(child_)2114 self.set_metadata(obj_)2115# end class CTimeseries2116class CData(GeneratedsSuper):2117 """Name of the data file The path to the file according to location2118 attribute Use one of 'NumPy', 'HDF5', 'XML', 'Other'"""2119 subclass = None2120 superclass = None2121 def __init__(self, src=None, dtype=None, name=None, fileformat=None, description=None, metadata=None):2122 self.src = _cast(None, src)2123 self.dtype = _cast(None, dtype)2124 self.name = _cast(None, name)2125 self.fileformat = _cast(None, fileformat)2126 self.description = description2127 self.metadata = metadata2128 def factory(*args_, **kwargs_):2129 if CData.subclass:2130 return CData.subclass(*args_, **kwargs_)2131 else:2132 return CData(*args_, **kwargs_)2133 factory = staticmethod(factory)2134 def get_description(self): return self.description2135 def set_description(self, description): self.description = description2136 def get_metadata(self): return self.metadata2137 def set_metadata(self, metadata): self.metadata = metadata2138 def get_src(self): return self.src2139 def set_src(self, src): self.src = src2140 def get_dtype(self): return self.dtype2141 def set_dtype(self, dtype): self.dtype = dtype2142 def get_name(self): return self.name2143 def set_name(self, name): self.name = name2144 def get_fileformat(self): return self.fileformat2145 def set_fileformat(self, fileformat): self.fileformat = fileformat2146 def validate_dataFileFormat(self, value):2147 # Validate type dataFileFormat, a restriction on xsd:string.2148 pass2149 def export(self, outfile, level, namespace_='cml:', name_='CData', namespacedef_=''):2150 showIndent(outfile, level)2151 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2152 self.exportAttributes(outfile, level, [], namespace_, name_='CData')2153 if self.hasContent_():2154 outfile.write('>\n')2155 self.exportChildren(outfile, level + 1, namespace_, name_)2156 showIndent(outfile, level)2157 outfile.write('</%s%s>\n' % (namespace_, name_))2158 else:2159 outfile.write('/>\n')2160 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CData'):2161 if self.src is not None and 'src' not in already_processed:2162 already_processed.append('src')2163 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))2164 if self.dtype is not None and 'dtype' not in already_processed:2165 already_processed.append('dtype')2166 outfile.write(' dtype=%s' % (self.gds_format_string(quote_attrib(self.dtype).encode(ExternalEncoding), input_name='dtype'), ))2167 if self.name is not None and 'name' not in already_processed:2168 already_processed.append('name')2169 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))2170 if self.fileformat is not None and 'fileformat' not in already_processed:2171 already_processed.append('fileformat')2172 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))2173 def exportChildren(self, outfile, level, namespace_='cml:', name_='CData'):2174 if self.description is not None:2175 showIndent(outfile, level)2176 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))2177 if self.metadata:2178 self.metadata.export(outfile, level, namespace_, name_='metadata', )2179 def hasContent_(self):2180 if (2181 self.description is not None or2182 self.metadata is not None2183 ):2184 return True2185 else:2186 return False2187 def exportLiteral(self, outfile, level, name_='CData'):2188 level += 12189 self.exportLiteralAttributes(outfile, level, [], name_)2190 if self.hasContent_():2191 self.exportLiteralChildren(outfile, level, name_)2192 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2193 if self.src is not None and 'src' not in already_processed:2194 already_processed.append('src')2195 showIndent(outfile, level)2196 outfile.write('src = "%s",\n' % (self.src,))2197 if self.dtype is not None and 'dtype' not in already_processed:2198 already_processed.append('dtype')2199 showIndent(outfile, level)2200 outfile.write('dtype = "%s",\n' % (self.dtype,))2201 if self.name is not None and 'name' not in already_processed:2202 already_processed.append('name')2203 showIndent(outfile, level)2204 outfile.write('name = "%s",\n' % (self.name,))2205 if self.fileformat is not None and 'fileformat' not in already_processed:2206 already_processed.append('fileformat')2207 showIndent(outfile, level)2208 outfile.write('fileformat = "%s",\n' % (self.fileformat,))2209 def exportLiteralChildren(self, outfile, level, name_):2210 if self.description is not None:2211 showIndent(outfile, level)2212 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))2213 if self.metadata is not None:2214 showIndent(outfile, level)2215 outfile.write('metadata=model_.metadata(\n')2216 self.metadata.exportLiteral(outfile, level)2217 showIndent(outfile, level)2218 outfile.write('),\n')2219 def build(self, node):2220 self.buildAttributes(node, node.attrib, [])2221 for child in node:2222 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2223 self.buildChildren(child, node, nodeName_)2224 def buildAttributes(self, node, attrs, already_processed):2225 value = attrs.get('src')2226 if value is not None and 'src' not in already_processed:2227 already_processed.append('src')2228 self.src = value2229 value = attrs.get('dtype')2230 if value is not None and 'dtype' not in already_processed:2231 already_processed.append('dtype')2232 self.dtype = value2233 value = attrs.get('name')2234 if value is not None and 'name' not in already_processed:2235 already_processed.append('name')2236 self.name = value2237 value = attrs.get('fileformat')2238 if value is not None and 'fileformat' not in already_processed:2239 already_processed.append('fileformat')2240 self.fileformat = value2241 self.validate_dataFileFormat(self.fileformat) # validate type dataFileFormat2242 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2243 if nodeName_ == 'description':2244 description_ = child_.text2245 description_ = self.gds_validate_string(description_, node, 'description')2246 self.description = description_2247 elif nodeName_ == 'tableOfContents': 2248 obj_ = tableOfContents.factory()2249 obj_.build(child_)2250 self.set_description(obj_)2251 elif nodeName_ == 'abstract': 2252 obj_ = abstract.factory()2253 obj_.build(child_)2254 self.set_description(obj_)2255 elif nodeName_ == 'metadata': 2256 obj_ = metadata.factory()2257 obj_.build(child_)2258 self.set_metadata(obj_)2259# end class CData2260class CScript(GeneratedsSuper):2261 """Name of the script file The path to the file according to location2262 attribute What kind of script. Use one of "Python" (default),2263 "Bash", "Matlab", or "Other"."""2264 subclass = None2265 superclass = None2266 def __init__(self, src=None, dtype='Python', name=None, fileformat='UTF-8', description=None, metadata=None):2267 self.src = _cast(None, src)2268 self.dtype = _cast(None, dtype)2269 self.name = _cast(None, name)2270 self.fileformat = _cast(None, fileformat)2271 self.description = description2272 self.metadata = metadata2273 def factory(*args_, **kwargs_):2274 if CScript.subclass:2275 return CScript.subclass(*args_, **kwargs_)2276 else:2277 return CScript(*args_, **kwargs_)2278 factory = staticmethod(factory)2279 def get_description(self): return self.description2280 def set_description(self, description): self.description = description2281 def get_metadata(self): return self.metadata2282 def set_metadata(self, metadata): self.metadata = metadata2283 def get_src(self): return self.src2284 def set_src(self, src): self.src = src2285 def get_dtype(self): return self.dtype2286 def set_dtype(self, dtype): self.dtype = dtype2287 def validate_scriptEnumType(self, value):2288 # Validate type scriptEnumType, a restriction on xsd:string.2289 pass2290 def get_name(self): return self.name2291 def set_name(self, name): self.name = name2292 def get_fileformat(self): return self.fileformat2293 def set_fileformat(self, fileformat): self.fileformat = fileformat2294 def validate_scriptFileFormat(self, value):2295 # Validate type scriptFileFormat, a restriction on xsd:string.2296 pass2297 def export(self, outfile, level, namespace_='cml:', name_='CScript', namespacedef_=''):2298 showIndent(outfile, level)2299 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2300 self.exportAttributes(outfile, level, [], namespace_, name_='CScript')2301 if self.hasContent_():2302 outfile.write('>\n')2303 self.exportChildren(outfile, level + 1, namespace_, name_)2304 showIndent(outfile, level)2305 outfile.write('</%s%s>\n' % (namespace_, name_))2306 else:2307 outfile.write('/>\n')2308 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CScript'):2309 if self.src is not None and 'src' not in already_processed:2310 already_processed.append('src')2311 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))2312 if self.dtype is not None and 'dtype' not in already_processed:2313 already_processed.append('dtype')2314 outfile.write(' dtype=%s' % (quote_attrib(self.dtype), ))2315 if self.name is not None and 'name' not in already_processed:2316 already_processed.append('name')2317 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))2318 if self.fileformat is not None and 'fileformat' not in already_processed:2319 already_processed.append('fileformat')2320 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))2321 def exportChildren(self, outfile, level, namespace_='cml:', name_='CScript'):2322 if self.description is not None:2323 showIndent(outfile, level)2324 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))2325 if self.metadata:2326 self.metadata.export(outfile, level, namespace_, name_='metadata', )2327 def hasContent_(self):2328 if (2329 self.description is not None or2330 self.metadata is not None2331 ):2332 return True2333 else:2334 return False2335 def exportLiteral(self, outfile, level, name_='CScript'):2336 level += 12337 self.exportLiteralAttributes(outfile, level, [], name_)2338 if self.hasContent_():2339 self.exportLiteralChildren(outfile, level, name_)2340 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2341 if self.src is not None and 'src' not in already_processed:2342 already_processed.append('src')2343 showIndent(outfile, level)2344 outfile.write('src = "%s",\n' % (self.src,))2345 if self.dtype is not None and 'dtype' not in already_processed:2346 already_processed.append('dtype')2347 showIndent(outfile, level)2348 outfile.write('dtype = "%s",\n' % (self.dtype,))2349 if self.name is not None and 'name' not in already_processed:2350 already_processed.append('name')2351 showIndent(outfile, level)2352 outfile.write('name = "%s",\n' % (self.name,))2353 if self.fileformat is not None and 'fileformat' not in already_processed:2354 already_processed.append('fileformat')2355 showIndent(outfile, level)2356 outfile.write('fileformat = "%s",\n' % (self.fileformat,))2357 def exportLiteralChildren(self, outfile, level, name_):2358 if self.description is not None:2359 showIndent(outfile, level)2360 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))2361 if self.metadata is not None:2362 showIndent(outfile, level)2363 outfile.write('metadata=model_.metadata(\n')2364 self.metadata.exportLiteral(outfile, level)2365 showIndent(outfile, level)2366 outfile.write('),\n')2367 def build(self, node):2368 self.buildAttributes(node, node.attrib, [])2369 for child in node:2370 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2371 self.buildChildren(child, node, nodeName_)2372 def buildAttributes(self, node, attrs, already_processed):2373 value = attrs.get('src')2374 if value is not None and 'src' not in already_processed:2375 already_processed.append('src')2376 self.src = value2377 value = attrs.get('dtype')2378 if value is not None and 'dtype' not in already_processed:2379 already_processed.append('dtype')2380 self.dtype = value2381 self.validate_scriptEnumType(self.dtype) # validate type scriptEnumType2382 value = attrs.get('name')2383 if value is not None and 'name' not in already_processed:2384 already_processed.append('name')2385 self.name = value2386 value = attrs.get('fileformat')2387 if value is not None and 'fileformat' not in already_processed:2388 already_processed.append('fileformat')2389 self.fileformat = value2390 self.validate_scriptFileFormat(self.fileformat) # validate type scriptFileFormat2391 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2392 if nodeName_ == 'description':2393 description_ = child_.text2394 description_ = self.gds_validate_string(description_, node, 'description')2395 self.description = description_2396 elif nodeName_ == 'tableOfContents': 2397 obj_ = tableOfContents.factory()2398 obj_.build(child_)2399 self.set_description(obj_)2400 elif nodeName_ == 'abstract': 2401 obj_ = abstract.factory()2402 obj_.build(child_)2403 self.set_description(obj_)2404 elif nodeName_ == 'metadata': 2405 obj_ = metadata.factory()2406 obj_.build(child_)2407 self.set_metadata(obj_)2408# end class CScript2409class CImagestack(GeneratedsSuper):2410 """Name of the image stack The path to the enumerated files according2411 to location attribute The file name pattern that may contain2412 simple shell-style wildcards a la fnmatch. Use one of 'PNG',2413 'JPG', 'TIFF', 'Other'"""2414 subclass = None2415 superclass = None2416 def __init__(self, src=None, fileformat=None, name=None, pattern=None, description=None, metadata=None):2417 self.src = _cast(None, src)2418 self.fileformat = _cast(None, fileformat)2419 self.name = _cast(None, name)2420 self.pattern = _cast(None, pattern)2421 self.description = description2422 self.metadata = metadata2423 def factory(*args_, **kwargs_):2424 if CImagestack.subclass:2425 return CImagestack.subclass(*args_, **kwargs_)2426 else:2427 return CImagestack(*args_, **kwargs_)2428 factory = staticmethod(factory)2429 def get_description(self): return self.description2430 def set_description(self, description): self.description = description2431 def get_metadata(self): return self.metadata2432 def set_metadata(self, metadata): self.metadata = metadata2433 def get_src(self): return self.src2434 def set_src(self, src): self.src = src2435 def get_fileformat(self): return self.fileformat2436 def set_fileformat(self, fileformat): self.fileformat = fileformat2437 def validate_imagestackFileFormat(self, value):2438 # Validate type imagestackFileFormat, a restriction on xsd:string.2439 pass2440 def get_name(self): return self.name2441 def set_name(self, name): self.name = name2442 def get_pattern(self): return self.pattern2443 def set_pattern(self, pattern): self.pattern = pattern2444 def export(self, outfile, level, namespace_='cml:', name_='CImagestack', namespacedef_=''):2445 showIndent(outfile, level)2446 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2447 self.exportAttributes(outfile, level, [], namespace_, name_='CImagestack')2448 if self.hasContent_():2449 outfile.write('>\n')2450 self.exportChildren(outfile, level + 1, namespace_, name_)2451 showIndent(outfile, level)2452 outfile.write('</%s%s>\n' % (namespace_, name_))2453 else:2454 outfile.write('/>\n')2455 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='CImagestack'):2456 if self.src is not None and 'src' not in already_processed:2457 already_processed.append('src')2458 outfile.write(' src=%s' % (self.gds_format_string(quote_attrib(self.src).encode(ExternalEncoding), input_name='src'), ))2459 if self.fileformat is not None and 'fileformat' not in already_processed:2460 already_processed.append('fileformat')2461 outfile.write(' fileformat=%s' % (quote_attrib(self.fileformat), ))2462 if self.name is not None and 'name' not in already_processed:2463 already_processed.append('name')2464 outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))2465 if self.pattern is not None and 'pattern' not in already_processed:2466 already_processed.append('pattern')2467 outfile.write(' pattern=%s' % (self.gds_format_string(quote_attrib(self.pattern).encode(ExternalEncoding), input_name='pattern'), ))2468 def exportChildren(self, outfile, level, namespace_='cml:', name_='CImagestack'):2469 if self.description is not None:2470 showIndent(outfile, level)2471 outfile.write('<%sdescription>%s</%sdescription>\n' % (namespace_, self.gds_format_string(quote_xml(self.description).encode(ExternalEncoding), input_name='description'), namespace_))2472 if self.metadata:2473 self.metadata.export(outfile, level, namespace_, name_='metadata', )2474 def hasContent_(self):2475 if (2476 self.description is not None or2477 self.metadata is not None2478 ):2479 return True2480 else:2481 return False2482 def exportLiteral(self, outfile, level, name_='CImagestack'):2483 level += 12484 self.exportLiteralAttributes(outfile, level, [], name_)2485 if self.hasContent_():2486 self.exportLiteralChildren(outfile, level, name_)2487 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2488 if self.src is not None and 'src' not in already_processed:2489 already_processed.append('src')2490 showIndent(outfile, level)2491 outfile.write('src = "%s",\n' % (self.src,))2492 if self.fileformat is not None and 'fileformat' not in already_processed:2493 already_processed.append('fileformat')2494 showIndent(outfile, level)2495 outfile.write('fileformat = "%s",\n' % (self.fileformat,))2496 if self.name is not None and 'name' not in already_processed:2497 already_processed.append('name')2498 showIndent(outfile, level)2499 outfile.write('name = "%s",\n' % (self.name,))2500 if self.pattern is not None and 'pattern' not in already_processed:2501 already_processed.append('pattern')2502 showIndent(outfile, level)2503 outfile.write('pattern = "%s",\n' % (self.pattern,))2504 def exportLiteralChildren(self, outfile, level, name_):2505 if self.description is not None:2506 showIndent(outfile, level)2507 outfile.write('description=%s,\n' % quote_python(self.description).encode(ExternalEncoding))2508 if self.metadata is not None:2509 showIndent(outfile, level)2510 outfile.write('metadata=model_.metadata(\n')2511 self.metadata.exportLiteral(outfile, level)2512 showIndent(outfile, level)2513 outfile.write('),\n')2514 def build(self, node):2515 self.buildAttributes(node, node.attrib, [])2516 for child in node:2517 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2518 self.buildChildren(child, node, nodeName_)2519 def buildAttributes(self, node, attrs, already_processed):2520 value = attrs.get('src')2521 if value is not None and 'src' not in already_processed:2522 already_processed.append('src')2523 self.src = value2524 value = attrs.get('fileformat')2525 if value is not None and 'fileformat' not in already_processed:2526 already_processed.append('fileformat')2527 self.fileformat = value2528 self.validate_imagestackFileFormat(self.fileformat) # validate type imagestackFileFormat2529 value = attrs.get('name')2530 if value is not None and 'name' not in already_processed:2531 already_processed.append('name')2532 self.name = value2533 value = attrs.get('pattern')2534 if value is not None and 'pattern' not in already_processed:2535 already_processed.append('pattern')2536 self.pattern = value2537 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2538 if nodeName_ == 'description':2539 description_ = child_.text2540 description_ = self.gds_validate_string(description_, node, 'description')2541 self.description = description_2542 elif nodeName_ == 'tableOfContents': 2543 obj_ = tableOfContents.factory()2544 obj_.build(child_)2545 self.set_description(obj_)2546 elif nodeName_ == 'abstract': 2547 obj_ = abstract.factory()2548 obj_.build(child_)2549 self.set_description(obj_)2550 elif nodeName_ == 'metadata': 2551 obj_ = metadata.factory()2552 obj_.build(child_)2553 self.set_metadata(obj_)2554# end class CImagestack2555class title(GeneratedsSuper):2556 subclass = None2557 superclass = None2558 def __init__(self, valueOf_=None):2559 self.valueOf_ = valueOf_2560 def factory(*args_, **kwargs_):2561 if title.subclass:2562 return title.subclass(*args_, **kwargs_)2563 else:2564 return title(*args_, **kwargs_)2565 factory = staticmethod(factory)2566 def get_valueOf_(self): return self.valueOf_2567 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2568 def export(self, outfile, level, namespace_='cml:', name_='title', namespacedef_=''):2569 showIndent(outfile, level)2570 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2571 self.exportAttributes(outfile, level, [], namespace_, name_='title')2572 if self.hasContent_():2573 outfile.write('>')2574 outfile.write(self.valueOf_)2575 self.exportChildren(outfile, level + 1, namespace_, name_)2576 outfile.write('</%s%s>\n' % (namespace_, name_))2577 else:2578 outfile.write('/>\n')2579 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='title'):2580 pass2581 def exportChildren(self, outfile, level, namespace_='cml:', name_='title'):2582 pass2583 def hasContent_(self):2584 if (2585 self.valueOf_2586 ):2587 return True2588 else:2589 return False2590 def exportLiteral(self, outfile, level, name_='title'):2591 level += 12592 self.exportLiteralAttributes(outfile, level, [], name_)2593 if self.hasContent_():2594 self.exportLiteralChildren(outfile, level, name_)2595 showIndent(outfile, level)2596 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2597 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2598 pass2599 def exportLiteralChildren(self, outfile, level, name_):2600 pass2601 def build(self, node):2602 self.buildAttributes(node, node.attrib, [])2603 self.valueOf_ = get_all_text_(node)2604 for child in node:2605 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2606 self.buildChildren(child, node, nodeName_)2607 def buildAttributes(self, node, attrs, already_processed):2608 pass2609 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2610 pass2611# end class title2612class creator(GeneratedsSuper):2613 subclass = None2614 superclass = None2615 def __init__(self, valueOf_=None):2616 self.valueOf_ = valueOf_2617 def factory(*args_, **kwargs_):2618 if creator.subclass:2619 return creator.subclass(*args_, **kwargs_)2620 else:2621 return creator(*args_, **kwargs_)2622 factory = staticmethod(factory)2623 def get_valueOf_(self): return self.valueOf_2624 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2625 def export(self, outfile, level, namespace_='cml:', name_='creator', namespacedef_=''):2626 showIndent(outfile, level)2627 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2628 self.exportAttributes(outfile, level, [], namespace_, name_='creator')2629 if self.hasContent_():2630 outfile.write('>')2631 outfile.write(self.valueOf_)2632 self.exportChildren(outfile, level + 1, namespace_, name_)2633 outfile.write('</%s%s>\n' % (namespace_, name_))2634 else:2635 outfile.write('/>\n')2636 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='creator'):2637 pass2638 def exportChildren(self, outfile, level, namespace_='cml:', name_='creator'):2639 pass2640 def hasContent_(self):2641 if (2642 self.valueOf_2643 ):2644 return True2645 else:2646 return False2647 def exportLiteral(self, outfile, level, name_='creator'):2648 level += 12649 self.exportLiteralAttributes(outfile, level, [], name_)2650 if self.hasContent_():2651 self.exportLiteralChildren(outfile, level, name_)2652 showIndent(outfile, level)2653 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2654 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2655 pass2656 def exportLiteralChildren(self, outfile, level, name_):2657 pass2658 def build(self, node):2659 self.buildAttributes(node, node.attrib, [])2660 self.valueOf_ = get_all_text_(node)2661 for child in node:2662 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2663 self.buildChildren(child, node, nodeName_)2664 def buildAttributes(self, node, attrs, already_processed):2665 pass2666 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2667 pass2668# end class creator2669class subject(GeneratedsSuper):2670 subclass = None2671 superclass = None2672 def __init__(self, valueOf_=None):2673 self.valueOf_ = valueOf_2674 def factory(*args_, **kwargs_):2675 if subject.subclass:2676 return subject.subclass(*args_, **kwargs_)2677 else:2678 return subject(*args_, **kwargs_)2679 factory = staticmethod(factory)2680 def get_valueOf_(self): return self.valueOf_2681 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2682 def export(self, outfile, level, namespace_='cml:', name_='subject', namespacedef_=''):2683 showIndent(outfile, level)2684 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2685 self.exportAttributes(outfile, level, [], namespace_, name_='subject')2686 if self.hasContent_():2687 outfile.write('>')2688 outfile.write(self.valueOf_)2689 self.exportChildren(outfile, level + 1, namespace_, name_)2690 outfile.write('</%s%s>\n' % (namespace_, name_))2691 else:2692 outfile.write('/>\n')2693 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='subject'):2694 pass2695 def exportChildren(self, outfile, level, namespace_='cml:', name_='subject'):2696 pass2697 def hasContent_(self):2698 if (2699 self.valueOf_2700 ):2701 return True2702 else:2703 return False2704 def exportLiteral(self, outfile, level, name_='subject'):2705 level += 12706 self.exportLiteralAttributes(outfile, level, [], name_)2707 if self.hasContent_():2708 self.exportLiteralChildren(outfile, level, name_)2709 showIndent(outfile, level)2710 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2711 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2712 pass2713 def exportLiteralChildren(self, outfile, level, name_):2714 pass2715 def build(self, node):2716 self.buildAttributes(node, node.attrib, [])2717 self.valueOf_ = get_all_text_(node)2718 for child in node:2719 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2720 self.buildChildren(child, node, nodeName_)2721 def buildAttributes(self, node, attrs, already_processed):2722 pass2723 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2724 pass2725# end class subject2726class description(GeneratedsSuper):2727 subclass = None2728 superclass = None2729 def __init__(self, valueOf_=None):2730 self.valueOf_ = valueOf_2731 def factory(*args_, **kwargs_):2732 if description.subclass:2733 return description.subclass(*args_, **kwargs_)2734 else:2735 return description(*args_, **kwargs_)2736 factory = staticmethod(factory)2737 def get_valueOf_(self): return self.valueOf_2738 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2739 def export(self, outfile, level, namespace_='cml:', name_='description', namespacedef_=''):2740 showIndent(outfile, level)2741 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2742 self.exportAttributes(outfile, level, [], namespace_, name_='description')2743 if self.hasContent_():2744 outfile.write('>')2745 outfile.write(self.valueOf_)2746 self.exportChildren(outfile, level + 1, namespace_, name_)2747 outfile.write('</%s%s>\n' % (namespace_, name_))2748 else:2749 outfile.write('/>\n')2750 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='description'):2751 pass2752 def exportChildren(self, outfile, level, namespace_='cml:', name_='description'):2753 pass2754 def hasContent_(self):2755 if (2756 self.valueOf_2757 ):2758 return True2759 else:2760 return False2761 def exportLiteral(self, outfile, level, name_='description'):2762 level += 12763 self.exportLiteralAttributes(outfile, level, [], name_)2764 if self.hasContent_():2765 self.exportLiteralChildren(outfile, level, name_)2766 showIndent(outfile, level)2767 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2768 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2769 pass2770 def exportLiteralChildren(self, outfile, level, name_):2771 pass2772 def build(self, node):2773 self.buildAttributes(node, node.attrib, [])2774 self.valueOf_ = get_all_text_(node)2775 for child in node:2776 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2777 self.buildChildren(child, node, nodeName_)2778 def buildAttributes(self, node, attrs, already_processed):2779 pass2780 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2781 pass2782# end class description2783class publisher(GeneratedsSuper):2784 subclass = None2785 superclass = None2786 def __init__(self, valueOf_=None):2787 self.valueOf_ = valueOf_2788 def factory(*args_, **kwargs_):2789 if publisher.subclass:2790 return publisher.subclass(*args_, **kwargs_)2791 else:2792 return publisher(*args_, **kwargs_)2793 factory = staticmethod(factory)2794 def get_valueOf_(self): return self.valueOf_2795 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2796 def export(self, outfile, level, namespace_='cml:', name_='publisher', namespacedef_=''):2797 showIndent(outfile, level)2798 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2799 self.exportAttributes(outfile, level, [], namespace_, name_='publisher')2800 if self.hasContent_():2801 outfile.write('>')2802 outfile.write(self.valueOf_)2803 self.exportChildren(outfile, level + 1, namespace_, name_)2804 outfile.write('</%s%s>\n' % (namespace_, name_))2805 else:2806 outfile.write('/>\n')2807 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='publisher'):2808 pass2809 def exportChildren(self, outfile, level, namespace_='cml:', name_='publisher'):2810 pass2811 def hasContent_(self):2812 if (2813 self.valueOf_2814 ):2815 return True2816 else:2817 return False2818 def exportLiteral(self, outfile, level, name_='publisher'):2819 level += 12820 self.exportLiteralAttributes(outfile, level, [], name_)2821 if self.hasContent_():2822 self.exportLiteralChildren(outfile, level, name_)2823 showIndent(outfile, level)2824 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2825 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2826 pass2827 def exportLiteralChildren(self, outfile, level, name_):2828 pass2829 def build(self, node):2830 self.buildAttributes(node, node.attrib, [])2831 self.valueOf_ = get_all_text_(node)2832 for child in node:2833 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2834 self.buildChildren(child, node, nodeName_)2835 def buildAttributes(self, node, attrs, already_processed):2836 pass2837 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2838 pass2839# end class publisher2840class contributor(GeneratedsSuper):2841 subclass = None2842 superclass = None2843 def __init__(self, valueOf_=None):2844 self.valueOf_ = valueOf_2845 def factory(*args_, **kwargs_):2846 if contributor.subclass:2847 return contributor.subclass(*args_, **kwargs_)2848 else:2849 return contributor(*args_, **kwargs_)2850 factory = staticmethod(factory)2851 def get_valueOf_(self): return self.valueOf_2852 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2853 def export(self, outfile, level, namespace_='cml:', name_='contributor', namespacedef_=''):2854 showIndent(outfile, level)2855 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2856 self.exportAttributes(outfile, level, [], namespace_, name_='contributor')2857 if self.hasContent_():2858 outfile.write('>')2859 outfile.write(self.valueOf_)2860 self.exportChildren(outfile, level + 1, namespace_, name_)2861 outfile.write('</%s%s>\n' % (namespace_, name_))2862 else:2863 outfile.write('/>\n')2864 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='contributor'):2865 pass2866 def exportChildren(self, outfile, level, namespace_='cml:', name_='contributor'):2867 pass2868 def hasContent_(self):2869 if (2870 self.valueOf_2871 ):2872 return True2873 else:2874 return False2875 def exportLiteral(self, outfile, level, name_='contributor'):2876 level += 12877 self.exportLiteralAttributes(outfile, level, [], name_)2878 if self.hasContent_():2879 self.exportLiteralChildren(outfile, level, name_)2880 showIndent(outfile, level)2881 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2882 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2883 pass2884 def exportLiteralChildren(self, outfile, level, name_):2885 pass2886 def build(self, node):2887 self.buildAttributes(node, node.attrib, [])2888 self.valueOf_ = get_all_text_(node)2889 for child in node:2890 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2891 self.buildChildren(child, node, nodeName_)2892 def buildAttributes(self, node, attrs, already_processed):2893 pass2894 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2895 pass2896# end class contributor2897class date(GeneratedsSuper):2898 subclass = None2899 superclass = None2900 def __init__(self, valueOf_=None):2901 self.valueOf_ = valueOf_2902 def factory(*args_, **kwargs_):2903 if date.subclass:2904 return date.subclass(*args_, **kwargs_)2905 else:2906 return date(*args_, **kwargs_)2907 factory = staticmethod(factory)2908 def get_valueOf_(self): return self.valueOf_2909 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2910 def export(self, outfile, level, namespace_='cml:', name_='date', namespacedef_=''):2911 showIndent(outfile, level)2912 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2913 self.exportAttributes(outfile, level, [], namespace_, name_='date')2914 if self.hasContent_():2915 outfile.write('>')2916 outfile.write(self.valueOf_)2917 self.exportChildren(outfile, level + 1, namespace_, name_)2918 outfile.write('</%s%s>\n' % (namespace_, name_))2919 else:2920 outfile.write('/>\n')2921 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='date'):2922 pass2923 def exportChildren(self, outfile, level, namespace_='cml:', name_='date'):2924 pass2925 def hasContent_(self):2926 if (2927 self.valueOf_2928 ):2929 return True2930 else:2931 return False2932 def exportLiteral(self, outfile, level, name_='date'):2933 level += 12934 self.exportLiteralAttributes(outfile, level, [], name_)2935 if self.hasContent_():2936 self.exportLiteralChildren(outfile, level, name_)2937 showIndent(outfile, level)2938 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2939 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2940 pass2941 def exportLiteralChildren(self, outfile, level, name_):2942 pass2943 def build(self, node):2944 self.buildAttributes(node, node.attrib, [])2945 self.valueOf_ = get_all_text_(node)2946 for child in node:2947 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]2948 self.buildChildren(child, node, nodeName_)2949 def buildAttributes(self, node, attrs, already_processed):2950 pass2951 def buildChildren(self, child_, node, nodeName_, from_subclass=False):2952 pass2953# end class date2954class type_(GeneratedsSuper):2955 subclass = None2956 superclass = None2957 def __init__(self, valueOf_=None):2958 self.valueOf_ = valueOf_2959 def factory(*args_, **kwargs_):2960 if type_.subclass:2961 return type_.subclass(*args_, **kwargs_)2962 else:2963 return type_(*args_, **kwargs_)2964 factory = staticmethod(factory)2965 def get_valueOf_(self): return self.valueOf_2966 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_2967 def export(self, outfile, level, namespace_='cml:', name_='type', namespacedef_=''):2968 showIndent(outfile, level)2969 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))2970 self.exportAttributes(outfile, level, [], namespace_, name_='type')2971 if self.hasContent_():2972 outfile.write('>')2973 outfile.write(self.valueOf_)2974 self.exportChildren(outfile, level + 1, namespace_, name_)2975 outfile.write('</%s%s>\n' % (namespace_, name_))2976 else:2977 outfile.write('/>\n')2978 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='type'):2979 pass2980 def exportChildren(self, outfile, level, namespace_='cml:', name_='type'):2981 pass2982 def hasContent_(self):2983 if (2984 self.valueOf_2985 ):2986 return True2987 else:2988 return False2989 def exportLiteral(self, outfile, level, name_='type'):2990 level += 12991 self.exportLiteralAttributes(outfile, level, [], name_)2992 if self.hasContent_():2993 self.exportLiteralChildren(outfile, level, name_)2994 showIndent(outfile, level)2995 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))2996 def exportLiteralAttributes(self, outfile, level, already_processed, name_):2997 pass2998 def exportLiteralChildren(self, outfile, level, name_):2999 pass3000 def build(self, node):3001 self.buildAttributes(node, node.attrib, [])3002 self.valueOf_ = get_all_text_(node)3003 for child in node:3004 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3005 self.buildChildren(child, node, nodeName_)3006 def buildAttributes(self, node, attrs, already_processed):3007 pass3008 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3009 pass3010# end class type_3011class format(GeneratedsSuper):3012 subclass = None3013 superclass = None3014 def __init__(self, valueOf_=None):3015 self.valueOf_ = valueOf_3016 def factory(*args_, **kwargs_):3017 if format.subclass:3018 return format.subclass(*args_, **kwargs_)3019 else:3020 return format(*args_, **kwargs_)3021 factory = staticmethod(factory)3022 def get_valueOf_(self): return self.valueOf_3023 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3024 def export(self, outfile, level, namespace_='cml:', name_='format', namespacedef_=''):3025 showIndent(outfile, level)3026 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3027 self.exportAttributes(outfile, level, [], namespace_, name_='format')3028 if self.hasContent_():3029 outfile.write('>')3030 outfile.write(self.valueOf_)3031 self.exportChildren(outfile, level + 1, namespace_, name_)3032 outfile.write('</%s%s>\n' % (namespace_, name_))3033 else:3034 outfile.write('/>\n')3035 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='format'):3036 pass3037 def exportChildren(self, outfile, level, namespace_='cml:', name_='format'):3038 pass3039 def hasContent_(self):3040 if (3041 self.valueOf_3042 ):3043 return True3044 else:3045 return False3046 def exportLiteral(self, outfile, level, name_='format'):3047 level += 13048 self.exportLiteralAttributes(outfile, level, [], name_)3049 if self.hasContent_():3050 self.exportLiteralChildren(outfile, level, name_)3051 showIndent(outfile, level)3052 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3053 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3054 pass3055 def exportLiteralChildren(self, outfile, level, name_):3056 pass3057 def build(self, node):3058 self.buildAttributes(node, node.attrib, [])3059 self.valueOf_ = get_all_text_(node)3060 for child in node:3061 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3062 self.buildChildren(child, node, nodeName_)3063 def buildAttributes(self, node, attrs, already_processed):3064 pass3065 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3066 pass3067# end class format3068class identifier(GeneratedsSuper):3069 subclass = None3070 superclass = None3071 def __init__(self, valueOf_=None):3072 self.valueOf_ = valueOf_3073 def factory(*args_, **kwargs_):3074 if identifier.subclass:3075 return identifier.subclass(*args_, **kwargs_)3076 else:3077 return identifier(*args_, **kwargs_)3078 factory = staticmethod(factory)3079 def get_valueOf_(self): return self.valueOf_3080 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3081 def export(self, outfile, level, namespace_='cml:', name_='identifier', namespacedef_=''):3082 showIndent(outfile, level)3083 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3084 self.exportAttributes(outfile, level, [], namespace_, name_='identifier')3085 if self.hasContent_():3086 outfile.write('>')3087 outfile.write(self.valueOf_)3088 self.exportChildren(outfile, level + 1, namespace_, name_)3089 outfile.write('</%s%s>\n' % (namespace_, name_))3090 else:3091 outfile.write('/>\n')3092 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='identifier'):3093 pass3094 def exportChildren(self, outfile, level, namespace_='cml:', name_='identifier'):3095 pass3096 def hasContent_(self):3097 if (3098 self.valueOf_3099 ):3100 return True3101 else:3102 return False3103 def exportLiteral(self, outfile, level, name_='identifier'):3104 level += 13105 self.exportLiteralAttributes(outfile, level, [], name_)3106 if self.hasContent_():3107 self.exportLiteralChildren(outfile, level, name_)3108 showIndent(outfile, level)3109 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3110 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3111 pass3112 def exportLiteralChildren(self, outfile, level, name_):3113 pass3114 def build(self, node):3115 self.buildAttributes(node, node.attrib, [])3116 self.valueOf_ = get_all_text_(node)3117 for child in node:3118 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3119 self.buildChildren(child, node, nodeName_)3120 def buildAttributes(self, node, attrs, already_processed):3121 pass3122 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3123 pass3124# end class identifier3125class source(GeneratedsSuper):3126 subclass = None3127 superclass = None3128 def __init__(self, valueOf_=None):3129 self.valueOf_ = valueOf_3130 def factory(*args_, **kwargs_):3131 if source.subclass:3132 return source.subclass(*args_, **kwargs_)3133 else:3134 return source(*args_, **kwargs_)3135 factory = staticmethod(factory)3136 def get_valueOf_(self): return self.valueOf_3137 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3138 def export(self, outfile, level, namespace_='cml:', name_='source', namespacedef_=''):3139 showIndent(outfile, level)3140 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3141 self.exportAttributes(outfile, level, [], namespace_, name_='source')3142 if self.hasContent_():3143 outfile.write('>')3144 outfile.write(self.valueOf_)3145 self.exportChildren(outfile, level + 1, namespace_, name_)3146 outfile.write('</%s%s>\n' % (namespace_, name_))3147 else:3148 outfile.write('/>\n')3149 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='source'):3150 pass3151 def exportChildren(self, outfile, level, namespace_='cml:', name_='source'):3152 pass3153 def hasContent_(self):3154 if (3155 self.valueOf_3156 ):3157 return True3158 else:3159 return False3160 def exportLiteral(self, outfile, level, name_='source'):3161 level += 13162 self.exportLiteralAttributes(outfile, level, [], name_)3163 if self.hasContent_():3164 self.exportLiteralChildren(outfile, level, name_)3165 showIndent(outfile, level)3166 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3167 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3168 pass3169 def exportLiteralChildren(self, outfile, level, name_):3170 pass3171 def build(self, node):3172 self.buildAttributes(node, node.attrib, [])3173 self.valueOf_ = get_all_text_(node)3174 for child in node:3175 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3176 self.buildChildren(child, node, nodeName_)3177 def buildAttributes(self, node, attrs, already_processed):3178 pass3179 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3180 pass3181# end class source3182class language(GeneratedsSuper):3183 subclass = None3184 superclass = None3185 def __init__(self, valueOf_=None):3186 self.valueOf_ = valueOf_3187 def factory(*args_, **kwargs_):3188 if language.subclass:3189 return language.subclass(*args_, **kwargs_)3190 else:3191 return language(*args_, **kwargs_)3192 factory = staticmethod(factory)3193 def get_valueOf_(self): return self.valueOf_3194 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3195 def export(self, outfile, level, namespace_='cml:', name_='language', namespacedef_=''):3196 showIndent(outfile, level)3197 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3198 self.exportAttributes(outfile, level, [], namespace_, name_='language')3199 if self.hasContent_():3200 outfile.write('>')3201 outfile.write(self.valueOf_)3202 self.exportChildren(outfile, level + 1, namespace_, name_)3203 outfile.write('</%s%s>\n' % (namespace_, name_))3204 else:3205 outfile.write('/>\n')3206 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='language'):3207 pass3208 def exportChildren(self, outfile, level, namespace_='cml:', name_='language'):3209 pass3210 def hasContent_(self):3211 if (3212 self.valueOf_3213 ):3214 return True3215 else:3216 return False3217 def exportLiteral(self, outfile, level, name_='language'):3218 level += 13219 self.exportLiteralAttributes(outfile, level, [], name_)3220 if self.hasContent_():3221 self.exportLiteralChildren(outfile, level, name_)3222 showIndent(outfile, level)3223 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3224 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3225 pass3226 def exportLiteralChildren(self, outfile, level, name_):3227 pass3228 def build(self, node):3229 self.buildAttributes(node, node.attrib, [])3230 self.valueOf_ = get_all_text_(node)3231 for child in node:3232 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3233 self.buildChildren(child, node, nodeName_)3234 def buildAttributes(self, node, attrs, already_processed):3235 pass3236 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3237 pass3238# end class language3239class relation(GeneratedsSuper):3240 subclass = None3241 superclass = None3242 def __init__(self, valueOf_=None):3243 self.valueOf_ = valueOf_3244 def factory(*args_, **kwargs_):3245 if relation.subclass:3246 return relation.subclass(*args_, **kwargs_)3247 else:3248 return relation(*args_, **kwargs_)3249 factory = staticmethod(factory)3250 def get_valueOf_(self): return self.valueOf_3251 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3252 def export(self, outfile, level, namespace_='cml:', name_='relation', namespacedef_=''):3253 showIndent(outfile, level)3254 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3255 self.exportAttributes(outfile, level, [], namespace_, name_='relation')3256 if self.hasContent_():3257 outfile.write('>')3258 outfile.write(self.valueOf_)3259 self.exportChildren(outfile, level + 1, namespace_, name_)3260 outfile.write('</%s%s>\n' % (namespace_, name_))3261 else:3262 outfile.write('/>\n')3263 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='relation'):3264 pass3265 def exportChildren(self, outfile, level, namespace_='cml:', name_='relation'):3266 pass3267 def hasContent_(self):3268 if (3269 self.valueOf_3270 ):3271 return True3272 else:3273 return False3274 def exportLiteral(self, outfile, level, name_='relation'):3275 level += 13276 self.exportLiteralAttributes(outfile, level, [], name_)3277 if self.hasContent_():3278 self.exportLiteralChildren(outfile, level, name_)3279 showIndent(outfile, level)3280 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3281 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3282 pass3283 def exportLiteralChildren(self, outfile, level, name_):3284 pass3285 def build(self, node):3286 self.buildAttributes(node, node.attrib, [])3287 self.valueOf_ = get_all_text_(node)3288 for child in node:3289 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3290 self.buildChildren(child, node, nodeName_)3291 def buildAttributes(self, node, attrs, already_processed):3292 pass3293 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3294 pass3295# end class relation3296class coverage(GeneratedsSuper):3297 subclass = None3298 superclass = None3299 def __init__(self, valueOf_=None):3300 self.valueOf_ = valueOf_3301 def factory(*args_, **kwargs_):3302 if coverage.subclass:3303 return coverage.subclass(*args_, **kwargs_)3304 else:3305 return coverage(*args_, **kwargs_)3306 factory = staticmethod(factory)3307 def get_valueOf_(self): return self.valueOf_3308 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3309 def export(self, outfile, level, namespace_='cml:', name_='coverage', namespacedef_=''):3310 showIndent(outfile, level)3311 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3312 self.exportAttributes(outfile, level, [], namespace_, name_='coverage')3313 if self.hasContent_():3314 outfile.write('>')3315 outfile.write(self.valueOf_)3316 self.exportChildren(outfile, level + 1, namespace_, name_)3317 outfile.write('</%s%s>\n' % (namespace_, name_))3318 else:3319 outfile.write('/>\n')3320 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='coverage'):3321 pass3322 def exportChildren(self, outfile, level, namespace_='cml:', name_='coverage'):3323 pass3324 def hasContent_(self):3325 if (3326 self.valueOf_3327 ):3328 return True3329 else:3330 return False3331 def exportLiteral(self, outfile, level, name_='coverage'):3332 level += 13333 self.exportLiteralAttributes(outfile, level, [], name_)3334 if self.hasContent_():3335 self.exportLiteralChildren(outfile, level, name_)3336 showIndent(outfile, level)3337 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3338 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3339 pass3340 def exportLiteralChildren(self, outfile, level, name_):3341 pass3342 def build(self, node):3343 self.buildAttributes(node, node.attrib, [])3344 self.valueOf_ = get_all_text_(node)3345 for child in node:3346 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3347 self.buildChildren(child, node, nodeName_)3348 def buildAttributes(self, node, attrs, already_processed):3349 pass3350 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3351 pass3352# end class coverage3353class rights(GeneratedsSuper):3354 subclass = None3355 superclass = None3356 def __init__(self, valueOf_=None):3357 self.valueOf_ = valueOf_3358 def factory(*args_, **kwargs_):3359 if rights.subclass:3360 return rights.subclass(*args_, **kwargs_)3361 else:3362 return rights(*args_, **kwargs_)3363 factory = staticmethod(factory)3364 def get_valueOf_(self): return self.valueOf_3365 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3366 def export(self, outfile, level, namespace_='cml:', name_='rights', namespacedef_=''):3367 showIndent(outfile, level)3368 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3369 self.exportAttributes(outfile, level, [], namespace_, name_='rights')3370 if self.hasContent_():3371 outfile.write('>')3372 outfile.write(self.valueOf_)3373 self.exportChildren(outfile, level + 1, namespace_, name_)3374 outfile.write('</%s%s>\n' % (namespace_, name_))3375 else:3376 outfile.write('/>\n')3377 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='rights'):3378 pass3379 def exportChildren(self, outfile, level, namespace_='cml:', name_='rights'):3380 pass3381 def hasContent_(self):3382 if (3383 self.valueOf_3384 ):3385 return True3386 else:3387 return False3388 def exportLiteral(self, outfile, level, name_='rights'):3389 level += 13390 self.exportLiteralAttributes(outfile, level, [], name_)3391 if self.hasContent_():3392 self.exportLiteralChildren(outfile, level, name_)3393 showIndent(outfile, level)3394 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3395 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3396 pass3397 def exportLiteralChildren(self, outfile, level, name_):3398 pass3399 def build(self, node):3400 self.buildAttributes(node, node.attrib, [])3401 self.valueOf_ = get_all_text_(node)3402 for child in node:3403 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3404 self.buildChildren(child, node, nodeName_)3405 def buildAttributes(self, node, attrs, already_processed):3406 pass3407 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3408 pass3409# end class rights3410class alternative(GeneratedsSuper):3411 subclass = None3412 superclass = None3413 def __init__(self, valueOf_=None):3414 self.valueOf_ = valueOf_3415 def factory(*args_, **kwargs_):3416 if alternative.subclass:3417 return alternative.subclass(*args_, **kwargs_)3418 else:3419 return alternative(*args_, **kwargs_)3420 factory = staticmethod(factory)3421 def get_valueOf_(self): return self.valueOf_3422 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3423 def export(self, outfile, level, namespace_='cml:', name_='alternative', namespacedef_=''):3424 showIndent(outfile, level)3425 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3426 self.exportAttributes(outfile, level, [], namespace_, name_='alternative')3427 if self.hasContent_():3428 outfile.write('>')3429 outfile.write(self.valueOf_)3430 self.exportChildren(outfile, level + 1, namespace_, name_)3431 outfile.write('</%s%s>\n' % (namespace_, name_))3432 else:3433 outfile.write('/>\n')3434 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='alternative'):3435 pass3436 def exportChildren(self, outfile, level, namespace_='cml:', name_='alternative'):3437 pass3438 def hasContent_(self):3439 if (3440 self.valueOf_3441 ):3442 return True3443 else:3444 return False3445 def exportLiteral(self, outfile, level, name_='alternative'):3446 level += 13447 self.exportLiteralAttributes(outfile, level, [], name_)3448 if self.hasContent_():3449 self.exportLiteralChildren(outfile, level, name_)3450 showIndent(outfile, level)3451 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3452 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3453 pass3454 def exportLiteralChildren(self, outfile, level, name_):3455 pass3456 def build(self, node):3457 self.buildAttributes(node, node.attrib, [])3458 self.valueOf_ = get_all_text_(node)3459 for child in node:3460 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3461 self.buildChildren(child, node, nodeName_)3462 def buildAttributes(self, node, attrs, already_processed):3463 pass3464 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3465 pass3466# end class alternative3467class tableOfContents(GeneratedsSuper):3468 subclass = None3469 superclass = None3470 def __init__(self, valueOf_=None):3471 self.valueOf_ = valueOf_3472 def factory(*args_, **kwargs_):3473 if tableOfContents.subclass:3474 return tableOfContents.subclass(*args_, **kwargs_)3475 else:3476 return tableOfContents(*args_, **kwargs_)3477 factory = staticmethod(factory)3478 def get_valueOf_(self): return self.valueOf_3479 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3480 def export(self, outfile, level, namespace_='cml:', name_='tableOfContents', namespacedef_=''):3481 showIndent(outfile, level)3482 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3483 self.exportAttributes(outfile, level, [], namespace_, name_='tableOfContents')3484 if self.hasContent_():3485 outfile.write('>')3486 outfile.write(self.valueOf_)3487 self.exportChildren(outfile, level + 1, namespace_, name_)3488 outfile.write('</%s%s>\n' % (namespace_, name_))3489 else:3490 outfile.write('/>\n')3491 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='tableOfContents'):3492 pass3493 def exportChildren(self, outfile, level, namespace_='cml:', name_='tableOfContents'):3494 pass3495 def hasContent_(self):3496 if (3497 self.valueOf_3498 ):3499 return True3500 else:3501 return False3502 def exportLiteral(self, outfile, level, name_='tableOfContents'):3503 level += 13504 self.exportLiteralAttributes(outfile, level, [], name_)3505 if self.hasContent_():3506 self.exportLiteralChildren(outfile, level, name_)3507 showIndent(outfile, level)3508 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3509 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3510 pass3511 def exportLiteralChildren(self, outfile, level, name_):3512 pass3513 def build(self, node):3514 self.buildAttributes(node, node.attrib, [])3515 self.valueOf_ = get_all_text_(node)3516 for child in node:3517 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3518 self.buildChildren(child, node, nodeName_)3519 def buildAttributes(self, node, attrs, already_processed):3520 pass3521 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3522 pass3523# end class tableOfContents3524class abstract(GeneratedsSuper):3525 subclass = None3526 superclass = None3527 def __init__(self, valueOf_=None):3528 self.valueOf_ = valueOf_3529 def factory(*args_, **kwargs_):3530 if abstract.subclass:3531 return abstract.subclass(*args_, **kwargs_)3532 else:3533 return abstract(*args_, **kwargs_)3534 factory = staticmethod(factory)3535 def get_valueOf_(self): return self.valueOf_3536 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3537 def export(self, outfile, level, namespace_='cml:', name_='abstract', namespacedef_=''):3538 showIndent(outfile, level)3539 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3540 self.exportAttributes(outfile, level, [], namespace_, name_='abstract')3541 if self.hasContent_():3542 outfile.write('>')3543 outfile.write(self.valueOf_)3544 self.exportChildren(outfile, level + 1, namespace_, name_)3545 outfile.write('</%s%s>\n' % (namespace_, name_))3546 else:3547 outfile.write('/>\n')3548 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='abstract'):3549 pass3550 def exportChildren(self, outfile, level, namespace_='cml:', name_='abstract'):3551 pass3552 def hasContent_(self):3553 if (3554 self.valueOf_3555 ):3556 return True3557 else:3558 return False3559 def exportLiteral(self, outfile, level, name_='abstract'):3560 level += 13561 self.exportLiteralAttributes(outfile, level, [], name_)3562 if self.hasContent_():3563 self.exportLiteralChildren(outfile, level, name_)3564 showIndent(outfile, level)3565 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3566 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3567 pass3568 def exportLiteralChildren(self, outfile, level, name_):3569 pass3570 def build(self, node):3571 self.buildAttributes(node, node.attrib, [])3572 self.valueOf_ = get_all_text_(node)3573 for child in node:3574 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3575 self.buildChildren(child, node, nodeName_)3576 def buildAttributes(self, node, attrs, already_processed):3577 pass3578 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3579 pass3580# end class abstract3581class created(GeneratedsSuper):3582 subclass = None3583 superclass = None3584 def __init__(self, valueOf_=None):3585 self.valueOf_ = valueOf_3586 def factory(*args_, **kwargs_):3587 if created.subclass:3588 return created.subclass(*args_, **kwargs_)3589 else:3590 return created(*args_, **kwargs_)3591 factory = staticmethod(factory)3592 def get_valueOf_(self): return self.valueOf_3593 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3594 def export(self, outfile, level, namespace_='cml:', name_='created', namespacedef_=''):3595 showIndent(outfile, level)3596 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3597 self.exportAttributes(outfile, level, [], namespace_, name_='created')3598 if self.hasContent_():3599 outfile.write('>')3600 outfile.write(self.valueOf_)3601 self.exportChildren(outfile, level + 1, namespace_, name_)3602 outfile.write('</%s%s>\n' % (namespace_, name_))3603 else:3604 outfile.write('/>\n')3605 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='created'):3606 pass3607 def exportChildren(self, outfile, level, namespace_='cml:', name_='created'):3608 pass3609 def hasContent_(self):3610 if (3611 self.valueOf_3612 ):3613 return True3614 else:3615 return False3616 def exportLiteral(self, outfile, level, name_='created'):3617 level += 13618 self.exportLiteralAttributes(outfile, level, [], name_)3619 if self.hasContent_():3620 self.exportLiteralChildren(outfile, level, name_)3621 showIndent(outfile, level)3622 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3623 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3624 pass3625 def exportLiteralChildren(self, outfile, level, name_):3626 pass3627 def build(self, node):3628 self.buildAttributes(node, node.attrib, [])3629 self.valueOf_ = get_all_text_(node)3630 for child in node:3631 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3632 self.buildChildren(child, node, nodeName_)3633 def buildAttributes(self, node, attrs, already_processed):3634 pass3635 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3636 pass3637# end class created3638class valid(GeneratedsSuper):3639 subclass = None3640 superclass = None3641 def __init__(self, valueOf_=None):3642 self.valueOf_ = valueOf_3643 def factory(*args_, **kwargs_):3644 if valid.subclass:3645 return valid.subclass(*args_, **kwargs_)3646 else:3647 return valid(*args_, **kwargs_)3648 factory = staticmethod(factory)3649 def get_valueOf_(self): return self.valueOf_3650 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3651 def export(self, outfile, level, namespace_='cml:', name_='valid', namespacedef_=''):3652 showIndent(outfile, level)3653 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3654 self.exportAttributes(outfile, level, [], namespace_, name_='valid')3655 if self.hasContent_():3656 outfile.write('>')3657 outfile.write(self.valueOf_)3658 self.exportChildren(outfile, level + 1, namespace_, name_)3659 outfile.write('</%s%s>\n' % (namespace_, name_))3660 else:3661 outfile.write('/>\n')3662 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='valid'):3663 pass3664 def exportChildren(self, outfile, level, namespace_='cml:', name_='valid'):3665 pass3666 def hasContent_(self):3667 if (3668 self.valueOf_3669 ):3670 return True3671 else:3672 return False3673 def exportLiteral(self, outfile, level, name_='valid'):3674 level += 13675 self.exportLiteralAttributes(outfile, level, [], name_)3676 if self.hasContent_():3677 self.exportLiteralChildren(outfile, level, name_)3678 showIndent(outfile, level)3679 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3680 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3681 pass3682 def exportLiteralChildren(self, outfile, level, name_):3683 pass3684 def build(self, node):3685 self.buildAttributes(node, node.attrib, [])3686 self.valueOf_ = get_all_text_(node)3687 for child in node:3688 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3689 self.buildChildren(child, node, nodeName_)3690 def buildAttributes(self, node, attrs, already_processed):3691 pass3692 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3693 pass3694# end class valid3695class available(GeneratedsSuper):3696 subclass = None3697 superclass = None3698 def __init__(self, valueOf_=None):3699 self.valueOf_ = valueOf_3700 def factory(*args_, **kwargs_):3701 if available.subclass:3702 return available.subclass(*args_, **kwargs_)3703 else:3704 return available(*args_, **kwargs_)3705 factory = staticmethod(factory)3706 def get_valueOf_(self): return self.valueOf_3707 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3708 def export(self, outfile, level, namespace_='cml:', name_='available', namespacedef_=''):3709 showIndent(outfile, level)3710 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3711 self.exportAttributes(outfile, level, [], namespace_, name_='available')3712 if self.hasContent_():3713 outfile.write('>')3714 outfile.write(self.valueOf_)3715 self.exportChildren(outfile, level + 1, namespace_, name_)3716 outfile.write('</%s%s>\n' % (namespace_, name_))3717 else:3718 outfile.write('/>\n')3719 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='available'):3720 pass3721 def exportChildren(self, outfile, level, namespace_='cml:', name_='available'):3722 pass3723 def hasContent_(self):3724 if (3725 self.valueOf_3726 ):3727 return True3728 else:3729 return False3730 def exportLiteral(self, outfile, level, name_='available'):3731 level += 13732 self.exportLiteralAttributes(outfile, level, [], name_)3733 if self.hasContent_():3734 self.exportLiteralChildren(outfile, level, name_)3735 showIndent(outfile, level)3736 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3737 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3738 pass3739 def exportLiteralChildren(self, outfile, level, name_):3740 pass3741 def build(self, node):3742 self.buildAttributes(node, node.attrib, [])3743 self.valueOf_ = get_all_text_(node)3744 for child in node:3745 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3746 self.buildChildren(child, node, nodeName_)3747 def buildAttributes(self, node, attrs, already_processed):3748 pass3749 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3750 pass3751# end class available3752class issued(GeneratedsSuper):3753 subclass = None3754 superclass = None3755 def __init__(self, valueOf_=None):3756 self.valueOf_ = valueOf_3757 def factory(*args_, **kwargs_):3758 if issued.subclass:3759 return issued.subclass(*args_, **kwargs_)3760 else:3761 return issued(*args_, **kwargs_)3762 factory = staticmethod(factory)3763 def get_valueOf_(self): return self.valueOf_3764 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3765 def export(self, outfile, level, namespace_='cml:', name_='issued', namespacedef_=''):3766 showIndent(outfile, level)3767 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3768 self.exportAttributes(outfile, level, [], namespace_, name_='issued')3769 if self.hasContent_():3770 outfile.write('>')3771 outfile.write(self.valueOf_)3772 self.exportChildren(outfile, level + 1, namespace_, name_)3773 outfile.write('</%s%s>\n' % (namespace_, name_))3774 else:3775 outfile.write('/>\n')3776 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='issued'):3777 pass3778 def exportChildren(self, outfile, level, namespace_='cml:', name_='issued'):3779 pass3780 def hasContent_(self):3781 if (3782 self.valueOf_3783 ):3784 return True3785 else:3786 return False3787 def exportLiteral(self, outfile, level, name_='issued'):3788 level += 13789 self.exportLiteralAttributes(outfile, level, [], name_)3790 if self.hasContent_():3791 self.exportLiteralChildren(outfile, level, name_)3792 showIndent(outfile, level)3793 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3794 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3795 pass3796 def exportLiteralChildren(self, outfile, level, name_):3797 pass3798 def build(self, node):3799 self.buildAttributes(node, node.attrib, [])3800 self.valueOf_ = get_all_text_(node)3801 for child in node:3802 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3803 self.buildChildren(child, node, nodeName_)3804 def buildAttributes(self, node, attrs, already_processed):3805 pass3806 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3807 pass3808# end class issued3809class modified(GeneratedsSuper):3810 subclass = None3811 superclass = None3812 def __init__(self, valueOf_=None):3813 self.valueOf_ = valueOf_3814 def factory(*args_, **kwargs_):3815 if modified.subclass:3816 return modified.subclass(*args_, **kwargs_)3817 else:3818 return modified(*args_, **kwargs_)3819 factory = staticmethod(factory)3820 def get_valueOf_(self): return self.valueOf_3821 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3822 def export(self, outfile, level, namespace_='cml:', name_='modified', namespacedef_=''):3823 showIndent(outfile, level)3824 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3825 self.exportAttributes(outfile, level, [], namespace_, name_='modified')3826 if self.hasContent_():3827 outfile.write('>')3828 outfile.write(self.valueOf_)3829 self.exportChildren(outfile, level + 1, namespace_, name_)3830 outfile.write('</%s%s>\n' % (namespace_, name_))3831 else:3832 outfile.write('/>\n')3833 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='modified'):3834 pass3835 def exportChildren(self, outfile, level, namespace_='cml:', name_='modified'):3836 pass3837 def hasContent_(self):3838 if (3839 self.valueOf_3840 ):3841 return True3842 else:3843 return False3844 def exportLiteral(self, outfile, level, name_='modified'):3845 level += 13846 self.exportLiteralAttributes(outfile, level, [], name_)3847 if self.hasContent_():3848 self.exportLiteralChildren(outfile, level, name_)3849 showIndent(outfile, level)3850 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3851 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3852 pass3853 def exportLiteralChildren(self, outfile, level, name_):3854 pass3855 def build(self, node):3856 self.buildAttributes(node, node.attrib, [])3857 self.valueOf_ = get_all_text_(node)3858 for child in node:3859 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3860 self.buildChildren(child, node, nodeName_)3861 def buildAttributes(self, node, attrs, already_processed):3862 pass3863 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3864 pass3865# end class modified3866class dateAccepted(GeneratedsSuper):3867 subclass = None3868 superclass = None3869 def __init__(self, valueOf_=None):3870 self.valueOf_ = valueOf_3871 def factory(*args_, **kwargs_):3872 if dateAccepted.subclass:3873 return dateAccepted.subclass(*args_, **kwargs_)3874 else:3875 return dateAccepted(*args_, **kwargs_)3876 factory = staticmethod(factory)3877 def get_valueOf_(self): return self.valueOf_3878 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3879 def export(self, outfile, level, namespace_='cml:', name_='dateAccepted', namespacedef_=''):3880 showIndent(outfile, level)3881 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3882 self.exportAttributes(outfile, level, [], namespace_, name_='dateAccepted')3883 if self.hasContent_():3884 outfile.write('>')3885 outfile.write(self.valueOf_)3886 self.exportChildren(outfile, level + 1, namespace_, name_)3887 outfile.write('</%s%s>\n' % (namespace_, name_))3888 else:3889 outfile.write('/>\n')3890 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='dateAccepted'):3891 pass3892 def exportChildren(self, outfile, level, namespace_='cml:', name_='dateAccepted'):3893 pass3894 def hasContent_(self):3895 if (3896 self.valueOf_3897 ):3898 return True3899 else:3900 return False3901 def exportLiteral(self, outfile, level, name_='dateAccepted'):3902 level += 13903 self.exportLiteralAttributes(outfile, level, [], name_)3904 if self.hasContent_():3905 self.exportLiteralChildren(outfile, level, name_)3906 showIndent(outfile, level)3907 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3908 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3909 pass3910 def exportLiteralChildren(self, outfile, level, name_):3911 pass3912 def build(self, node):3913 self.buildAttributes(node, node.attrib, [])3914 self.valueOf_ = get_all_text_(node)3915 for child in node:3916 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3917 self.buildChildren(child, node, nodeName_)3918 def buildAttributes(self, node, attrs, already_processed):3919 pass3920 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3921 pass3922# end class dateAccepted3923class dateCopyrighted(GeneratedsSuper):3924 subclass = None3925 superclass = None3926 def __init__(self, valueOf_=None):3927 self.valueOf_ = valueOf_3928 def factory(*args_, **kwargs_):3929 if dateCopyrighted.subclass:3930 return dateCopyrighted.subclass(*args_, **kwargs_)3931 else:3932 return dateCopyrighted(*args_, **kwargs_)3933 factory = staticmethod(factory)3934 def get_valueOf_(self): return self.valueOf_3935 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3936 def export(self, outfile, level, namespace_='cml:', name_='dateCopyrighted', namespacedef_=''):3937 showIndent(outfile, level)3938 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3939 self.exportAttributes(outfile, level, [], namespace_, name_='dateCopyrighted')3940 if self.hasContent_():3941 outfile.write('>')3942 outfile.write(self.valueOf_)3943 self.exportChildren(outfile, level + 1, namespace_, name_)3944 outfile.write('</%s%s>\n' % (namespace_, name_))3945 else:3946 outfile.write('/>\n')3947 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='dateCopyrighted'):3948 pass3949 def exportChildren(self, outfile, level, namespace_='cml:', name_='dateCopyrighted'):3950 pass3951 def hasContent_(self):3952 if (3953 self.valueOf_3954 ):3955 return True3956 else:3957 return False3958 def exportLiteral(self, outfile, level, name_='dateCopyrighted'):3959 level += 13960 self.exportLiteralAttributes(outfile, level, [], name_)3961 if self.hasContent_():3962 self.exportLiteralChildren(outfile, level, name_)3963 showIndent(outfile, level)3964 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))3965 def exportLiteralAttributes(self, outfile, level, already_processed, name_):3966 pass3967 def exportLiteralChildren(self, outfile, level, name_):3968 pass3969 def build(self, node):3970 self.buildAttributes(node, node.attrib, [])3971 self.valueOf_ = get_all_text_(node)3972 for child in node:3973 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]3974 self.buildChildren(child, node, nodeName_)3975 def buildAttributes(self, node, attrs, already_processed):3976 pass3977 def buildChildren(self, child_, node, nodeName_, from_subclass=False):3978 pass3979# end class dateCopyrighted3980class dateSubmitted(GeneratedsSuper):3981 subclass = None3982 superclass = None3983 def __init__(self, valueOf_=None):3984 self.valueOf_ = valueOf_3985 def factory(*args_, **kwargs_):3986 if dateSubmitted.subclass:3987 return dateSubmitted.subclass(*args_, **kwargs_)3988 else:3989 return dateSubmitted(*args_, **kwargs_)3990 factory = staticmethod(factory)3991 def get_valueOf_(self): return self.valueOf_3992 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_3993 def export(self, outfile, level, namespace_='cml:', name_='dateSubmitted', namespacedef_=''):3994 showIndent(outfile, level)3995 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))3996 self.exportAttributes(outfile, level, [], namespace_, name_='dateSubmitted')3997 if self.hasContent_():3998 outfile.write('>')3999 outfile.write(self.valueOf_)4000 self.exportChildren(outfile, level + 1, namespace_, name_)4001 outfile.write('</%s%s>\n' % (namespace_, name_))4002 else:4003 outfile.write('/>\n')4004 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='dateSubmitted'):4005 pass4006 def exportChildren(self, outfile, level, namespace_='cml:', name_='dateSubmitted'):4007 pass4008 def hasContent_(self):4009 if (4010 self.valueOf_4011 ):4012 return True4013 else:4014 return False4015 def exportLiteral(self, outfile, level, name_='dateSubmitted'):4016 level += 14017 self.exportLiteralAttributes(outfile, level, [], name_)4018 if self.hasContent_():4019 self.exportLiteralChildren(outfile, level, name_)4020 showIndent(outfile, level)4021 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4022 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4023 pass4024 def exportLiteralChildren(self, outfile, level, name_):4025 pass4026 def build(self, node):4027 self.buildAttributes(node, node.attrib, [])4028 self.valueOf_ = get_all_text_(node)4029 for child in node:4030 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4031 self.buildChildren(child, node, nodeName_)4032 def buildAttributes(self, node, attrs, already_processed):4033 pass4034 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4035 pass4036# end class dateSubmitted4037class extent(GeneratedsSuper):4038 subclass = None4039 superclass = None4040 def __init__(self, valueOf_=None):4041 self.valueOf_ = valueOf_4042 def factory(*args_, **kwargs_):4043 if extent.subclass:4044 return extent.subclass(*args_, **kwargs_)4045 else:4046 return extent(*args_, **kwargs_)4047 factory = staticmethod(factory)4048 def get_valueOf_(self): return self.valueOf_4049 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4050 def export(self, outfile, level, namespace_='cml:', name_='extent', namespacedef_=''):4051 showIndent(outfile, level)4052 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4053 self.exportAttributes(outfile, level, [], namespace_, name_='extent')4054 if self.hasContent_():4055 outfile.write('>')4056 outfile.write(self.valueOf_)4057 self.exportChildren(outfile, level + 1, namespace_, name_)4058 outfile.write('</%s%s>\n' % (namespace_, name_))4059 else:4060 outfile.write('/>\n')4061 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='extent'):4062 pass4063 def exportChildren(self, outfile, level, namespace_='cml:', name_='extent'):4064 pass4065 def hasContent_(self):4066 if (4067 self.valueOf_4068 ):4069 return True4070 else:4071 return False4072 def exportLiteral(self, outfile, level, name_='extent'):4073 level += 14074 self.exportLiteralAttributes(outfile, level, [], name_)4075 if self.hasContent_():4076 self.exportLiteralChildren(outfile, level, name_)4077 showIndent(outfile, level)4078 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4079 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4080 pass4081 def exportLiteralChildren(self, outfile, level, name_):4082 pass4083 def build(self, node):4084 self.buildAttributes(node, node.attrib, [])4085 self.valueOf_ = get_all_text_(node)4086 for child in node:4087 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4088 self.buildChildren(child, node, nodeName_)4089 def buildAttributes(self, node, attrs, already_processed):4090 pass4091 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4092 pass4093# end class extent4094class medium(GeneratedsSuper):4095 subclass = None4096 superclass = None4097 def __init__(self, valueOf_=None):4098 self.valueOf_ = valueOf_4099 def factory(*args_, **kwargs_):4100 if medium.subclass:4101 return medium.subclass(*args_, **kwargs_)4102 else:4103 return medium(*args_, **kwargs_)4104 factory = staticmethod(factory)4105 def get_valueOf_(self): return self.valueOf_4106 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4107 def export(self, outfile, level, namespace_='cml:', name_='medium', namespacedef_=''):4108 showIndent(outfile, level)4109 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4110 self.exportAttributes(outfile, level, [], namespace_, name_='medium')4111 if self.hasContent_():4112 outfile.write('>')4113 outfile.write(self.valueOf_)4114 self.exportChildren(outfile, level + 1, namespace_, name_)4115 outfile.write('</%s%s>\n' % (namespace_, name_))4116 else:4117 outfile.write('/>\n')4118 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='medium'):4119 pass4120 def exportChildren(self, outfile, level, namespace_='cml:', name_='medium'):4121 pass4122 def hasContent_(self):4123 if (4124 self.valueOf_4125 ):4126 return True4127 else:4128 return False4129 def exportLiteral(self, outfile, level, name_='medium'):4130 level += 14131 self.exportLiteralAttributes(outfile, level, [], name_)4132 if self.hasContent_():4133 self.exportLiteralChildren(outfile, level, name_)4134 showIndent(outfile, level)4135 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4136 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4137 pass4138 def exportLiteralChildren(self, outfile, level, name_):4139 pass4140 def build(self, node):4141 self.buildAttributes(node, node.attrib, [])4142 self.valueOf_ = get_all_text_(node)4143 for child in node:4144 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4145 self.buildChildren(child, node, nodeName_)4146 def buildAttributes(self, node, attrs, already_processed):4147 pass4148 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4149 pass4150# end class medium4151class isVersionOf(GeneratedsSuper):4152 subclass = None4153 superclass = None4154 def __init__(self, valueOf_=None):4155 self.valueOf_ = valueOf_4156 def factory(*args_, **kwargs_):4157 if isVersionOf.subclass:4158 return isVersionOf.subclass(*args_, **kwargs_)4159 else:4160 return isVersionOf(*args_, **kwargs_)4161 factory = staticmethod(factory)4162 def get_valueOf_(self): return self.valueOf_4163 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4164 def export(self, outfile, level, namespace_='cml:', name_='isVersionOf', namespacedef_=''):4165 showIndent(outfile, level)4166 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4167 self.exportAttributes(outfile, level, [], namespace_, name_='isVersionOf')4168 if self.hasContent_():4169 outfile.write('>')4170 outfile.write(self.valueOf_)4171 self.exportChildren(outfile, level + 1, namespace_, name_)4172 outfile.write('</%s%s>\n' % (namespace_, name_))4173 else:4174 outfile.write('/>\n')4175 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='isVersionOf'):4176 pass4177 def exportChildren(self, outfile, level, namespace_='cml:', name_='isVersionOf'):4178 pass4179 def hasContent_(self):4180 if (4181 self.valueOf_4182 ):4183 return True4184 else:4185 return False4186 def exportLiteral(self, outfile, level, name_='isVersionOf'):4187 level += 14188 self.exportLiteralAttributes(outfile, level, [], name_)4189 if self.hasContent_():4190 self.exportLiteralChildren(outfile, level, name_)4191 showIndent(outfile, level)4192 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4193 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4194 pass4195 def exportLiteralChildren(self, outfile, level, name_):4196 pass4197 def build(self, node):4198 self.buildAttributes(node, node.attrib, [])4199 self.valueOf_ = get_all_text_(node)4200 for child in node:4201 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4202 self.buildChildren(child, node, nodeName_)4203 def buildAttributes(self, node, attrs, already_processed):4204 pass4205 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4206 pass4207# end class isVersionOf4208class hasVersion(GeneratedsSuper):4209 subclass = None4210 superclass = None4211 def __init__(self, valueOf_=None):4212 self.valueOf_ = valueOf_4213 def factory(*args_, **kwargs_):4214 if hasVersion.subclass:4215 return hasVersion.subclass(*args_, **kwargs_)4216 else:4217 return hasVersion(*args_, **kwargs_)4218 factory = staticmethod(factory)4219 def get_valueOf_(self): return self.valueOf_4220 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4221 def export(self, outfile, level, namespace_='cml:', name_='hasVersion', namespacedef_=''):4222 showIndent(outfile, level)4223 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4224 self.exportAttributes(outfile, level, [], namespace_, name_='hasVersion')4225 if self.hasContent_():4226 outfile.write('>')4227 outfile.write(self.valueOf_)4228 self.exportChildren(outfile, level + 1, namespace_, name_)4229 outfile.write('</%s%s>\n' % (namespace_, name_))4230 else:4231 outfile.write('/>\n')4232 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='hasVersion'):4233 pass4234 def exportChildren(self, outfile, level, namespace_='cml:', name_='hasVersion'):4235 pass4236 def hasContent_(self):4237 if (4238 self.valueOf_4239 ):4240 return True4241 else:4242 return False4243 def exportLiteral(self, outfile, level, name_='hasVersion'):4244 level += 14245 self.exportLiteralAttributes(outfile, level, [], name_)4246 if self.hasContent_():4247 self.exportLiteralChildren(outfile, level, name_)4248 showIndent(outfile, level)4249 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4250 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4251 pass4252 def exportLiteralChildren(self, outfile, level, name_):4253 pass4254 def build(self, node):4255 self.buildAttributes(node, node.attrib, [])4256 self.valueOf_ = get_all_text_(node)4257 for child in node:4258 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4259 self.buildChildren(child, node, nodeName_)4260 def buildAttributes(self, node, attrs, already_processed):4261 pass4262 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4263 pass4264# end class hasVersion4265class isReplacedBy(GeneratedsSuper):4266 subclass = None4267 superclass = None4268 def __init__(self, valueOf_=None):4269 self.valueOf_ = valueOf_4270 def factory(*args_, **kwargs_):4271 if isReplacedBy.subclass:4272 return isReplacedBy.subclass(*args_, **kwargs_)4273 else:4274 return isReplacedBy(*args_, **kwargs_)4275 factory = staticmethod(factory)4276 def get_valueOf_(self): return self.valueOf_4277 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4278 def export(self, outfile, level, namespace_='cml:', name_='isReplacedBy', namespacedef_=''):4279 showIndent(outfile, level)4280 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4281 self.exportAttributes(outfile, level, [], namespace_, name_='isReplacedBy')4282 if self.hasContent_():4283 outfile.write('>')4284 outfile.write(self.valueOf_)4285 self.exportChildren(outfile, level + 1, namespace_, name_)4286 outfile.write('</%s%s>\n' % (namespace_, name_))4287 else:4288 outfile.write('/>\n')4289 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='isReplacedBy'):4290 pass4291 def exportChildren(self, outfile, level, namespace_='cml:', name_='isReplacedBy'):4292 pass4293 def hasContent_(self):4294 if (4295 self.valueOf_4296 ):4297 return True4298 else:4299 return False4300 def exportLiteral(self, outfile, level, name_='isReplacedBy'):4301 level += 14302 self.exportLiteralAttributes(outfile, level, [], name_)4303 if self.hasContent_():4304 self.exportLiteralChildren(outfile, level, name_)4305 showIndent(outfile, level)4306 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4307 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4308 pass4309 def exportLiteralChildren(self, outfile, level, name_):4310 pass4311 def build(self, node):4312 self.buildAttributes(node, node.attrib, [])4313 self.valueOf_ = get_all_text_(node)4314 for child in node:4315 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4316 self.buildChildren(child, node, nodeName_)4317 def buildAttributes(self, node, attrs, already_processed):4318 pass4319 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4320 pass4321# end class isReplacedBy4322class replaces(GeneratedsSuper):4323 subclass = None4324 superclass = None4325 def __init__(self, valueOf_=None):4326 self.valueOf_ = valueOf_4327 def factory(*args_, **kwargs_):4328 if replaces.subclass:4329 return replaces.subclass(*args_, **kwargs_)4330 else:4331 return replaces(*args_, **kwargs_)4332 factory = staticmethod(factory)4333 def get_valueOf_(self): return self.valueOf_4334 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4335 def export(self, outfile, level, namespace_='cml:', name_='replaces', namespacedef_=''):4336 showIndent(outfile, level)4337 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4338 self.exportAttributes(outfile, level, [], namespace_, name_='replaces')4339 if self.hasContent_():4340 outfile.write('>')4341 outfile.write(self.valueOf_)4342 self.exportChildren(outfile, level + 1, namespace_, name_)4343 outfile.write('</%s%s>\n' % (namespace_, name_))4344 else:4345 outfile.write('/>\n')4346 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='replaces'):4347 pass4348 def exportChildren(self, outfile, level, namespace_='cml:', name_='replaces'):4349 pass4350 def hasContent_(self):4351 if (4352 self.valueOf_4353 ):4354 return True4355 else:4356 return False4357 def exportLiteral(self, outfile, level, name_='replaces'):4358 level += 14359 self.exportLiteralAttributes(outfile, level, [], name_)4360 if self.hasContent_():4361 self.exportLiteralChildren(outfile, level, name_)4362 showIndent(outfile, level)4363 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4364 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4365 pass4366 def exportLiteralChildren(self, outfile, level, name_):4367 pass4368 def build(self, node):4369 self.buildAttributes(node, node.attrib, [])4370 self.valueOf_ = get_all_text_(node)4371 for child in node:4372 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4373 self.buildChildren(child, node, nodeName_)4374 def buildAttributes(self, node, attrs, already_processed):4375 pass4376 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4377 pass4378# end class replaces4379class isRequiredBy(GeneratedsSuper):4380 subclass = None4381 superclass = None4382 def __init__(self, valueOf_=None):4383 self.valueOf_ = valueOf_4384 def factory(*args_, **kwargs_):4385 if isRequiredBy.subclass:4386 return isRequiredBy.subclass(*args_, **kwargs_)4387 else:4388 return isRequiredBy(*args_, **kwargs_)4389 factory = staticmethod(factory)4390 def get_valueOf_(self): return self.valueOf_4391 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4392 def export(self, outfile, level, namespace_='cml:', name_='isRequiredBy', namespacedef_=''):4393 showIndent(outfile, level)4394 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4395 self.exportAttributes(outfile, level, [], namespace_, name_='isRequiredBy')4396 if self.hasContent_():4397 outfile.write('>')4398 outfile.write(self.valueOf_)4399 self.exportChildren(outfile, level + 1, namespace_, name_)4400 outfile.write('</%s%s>\n' % (namespace_, name_))4401 else:4402 outfile.write('/>\n')4403 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='isRequiredBy'):4404 pass4405 def exportChildren(self, outfile, level, namespace_='cml:', name_='isRequiredBy'):4406 pass4407 def hasContent_(self):4408 if (4409 self.valueOf_4410 ):4411 return True4412 else:4413 return False4414 def exportLiteral(self, outfile, level, name_='isRequiredBy'):4415 level += 14416 self.exportLiteralAttributes(outfile, level, [], name_)4417 if self.hasContent_():4418 self.exportLiteralChildren(outfile, level, name_)4419 showIndent(outfile, level)4420 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4421 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4422 pass4423 def exportLiteralChildren(self, outfile, level, name_):4424 pass4425 def build(self, node):4426 self.buildAttributes(node, node.attrib, [])4427 self.valueOf_ = get_all_text_(node)4428 for child in node:4429 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4430 self.buildChildren(child, node, nodeName_)4431 def buildAttributes(self, node, attrs, already_processed):4432 pass4433 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4434 pass4435# end class isRequiredBy4436class requires(GeneratedsSuper):4437 subclass = None4438 superclass = None4439 def __init__(self, valueOf_=None):4440 self.valueOf_ = valueOf_4441 def factory(*args_, **kwargs_):4442 if requires.subclass:4443 return requires.subclass(*args_, **kwargs_)4444 else:4445 return requires(*args_, **kwargs_)4446 factory = staticmethod(factory)4447 def get_valueOf_(self): return self.valueOf_4448 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4449 def export(self, outfile, level, namespace_='cml:', name_='requires', namespacedef_=''):4450 showIndent(outfile, level)4451 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4452 self.exportAttributes(outfile, level, [], namespace_, name_='requires')4453 if self.hasContent_():4454 outfile.write('>')4455 outfile.write(self.valueOf_)4456 self.exportChildren(outfile, level + 1, namespace_, name_)4457 outfile.write('</%s%s>\n' % (namespace_, name_))4458 else:4459 outfile.write('/>\n')4460 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='requires'):4461 pass4462 def exportChildren(self, outfile, level, namespace_='cml:', name_='requires'):4463 pass4464 def hasContent_(self):4465 if (4466 self.valueOf_4467 ):4468 return True4469 else:4470 return False4471 def exportLiteral(self, outfile, level, name_='requires'):4472 level += 14473 self.exportLiteralAttributes(outfile, level, [], name_)4474 if self.hasContent_():4475 self.exportLiteralChildren(outfile, level, name_)4476 showIndent(outfile, level)4477 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4478 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4479 pass4480 def exportLiteralChildren(self, outfile, level, name_):4481 pass4482 def build(self, node):4483 self.buildAttributes(node, node.attrib, [])4484 self.valueOf_ = get_all_text_(node)4485 for child in node:4486 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4487 self.buildChildren(child, node, nodeName_)4488 def buildAttributes(self, node, attrs, already_processed):4489 pass4490 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4491 pass4492# end class requires4493class isPartOf(GeneratedsSuper):4494 subclass = None4495 superclass = None4496 def __init__(self, valueOf_=None):4497 self.valueOf_ = valueOf_4498 def factory(*args_, **kwargs_):4499 if isPartOf.subclass:4500 return isPartOf.subclass(*args_, **kwargs_)4501 else:4502 return isPartOf(*args_, **kwargs_)4503 factory = staticmethod(factory)4504 def get_valueOf_(self): return self.valueOf_4505 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4506 def export(self, outfile, level, namespace_='cml:', name_='isPartOf', namespacedef_=''):4507 showIndent(outfile, level)4508 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4509 self.exportAttributes(outfile, level, [], namespace_, name_='isPartOf')4510 if self.hasContent_():4511 outfile.write('>')4512 outfile.write(self.valueOf_)4513 self.exportChildren(outfile, level + 1, namespace_, name_)4514 outfile.write('</%s%s>\n' % (namespace_, name_))4515 else:4516 outfile.write('/>\n')4517 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='isPartOf'):4518 pass4519 def exportChildren(self, outfile, level, namespace_='cml:', name_='isPartOf'):4520 pass4521 def hasContent_(self):4522 if (4523 self.valueOf_4524 ):4525 return True4526 else:4527 return False4528 def exportLiteral(self, outfile, level, name_='isPartOf'):4529 level += 14530 self.exportLiteralAttributes(outfile, level, [], name_)4531 if self.hasContent_():4532 self.exportLiteralChildren(outfile, level, name_)4533 showIndent(outfile, level)4534 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4535 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4536 pass4537 def exportLiteralChildren(self, outfile, level, name_):4538 pass4539 def build(self, node):4540 self.buildAttributes(node, node.attrib, [])4541 self.valueOf_ = get_all_text_(node)4542 for child in node:4543 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4544 self.buildChildren(child, node, nodeName_)4545 def buildAttributes(self, node, attrs, already_processed):4546 pass4547 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4548 pass4549# end class isPartOf4550class hasPart(GeneratedsSuper):4551 subclass = None4552 superclass = None4553 def __init__(self, valueOf_=None):4554 self.valueOf_ = valueOf_4555 def factory(*args_, **kwargs_):4556 if hasPart.subclass:4557 return hasPart.subclass(*args_, **kwargs_)4558 else:4559 return hasPart(*args_, **kwargs_)4560 factory = staticmethod(factory)4561 def get_valueOf_(self): return self.valueOf_4562 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4563 def export(self, outfile, level, namespace_='cml:', name_='hasPart', namespacedef_=''):4564 showIndent(outfile, level)4565 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4566 self.exportAttributes(outfile, level, [], namespace_, name_='hasPart')4567 if self.hasContent_():4568 outfile.write('>')4569 outfile.write(self.valueOf_)4570 self.exportChildren(outfile, level + 1, namespace_, name_)4571 outfile.write('</%s%s>\n' % (namespace_, name_))4572 else:4573 outfile.write('/>\n')4574 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='hasPart'):4575 pass4576 def exportChildren(self, outfile, level, namespace_='cml:', name_='hasPart'):4577 pass4578 def hasContent_(self):4579 if (4580 self.valueOf_4581 ):4582 return True4583 else:4584 return False4585 def exportLiteral(self, outfile, level, name_='hasPart'):4586 level += 14587 self.exportLiteralAttributes(outfile, level, [], name_)4588 if self.hasContent_():4589 self.exportLiteralChildren(outfile, level, name_)4590 showIndent(outfile, level)4591 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4592 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4593 pass4594 def exportLiteralChildren(self, outfile, level, name_):4595 pass4596 def build(self, node):4597 self.buildAttributes(node, node.attrib, [])4598 self.valueOf_ = get_all_text_(node)4599 for child in node:4600 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4601 self.buildChildren(child, node, nodeName_)4602 def buildAttributes(self, node, attrs, already_processed):4603 pass4604 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4605 pass4606# end class hasPart4607class isReferencedBy(GeneratedsSuper):4608 subclass = None4609 superclass = None4610 def __init__(self, valueOf_=None):4611 self.valueOf_ = valueOf_4612 def factory(*args_, **kwargs_):4613 if isReferencedBy.subclass:4614 return isReferencedBy.subclass(*args_, **kwargs_)4615 else:4616 return isReferencedBy(*args_, **kwargs_)4617 factory = staticmethod(factory)4618 def get_valueOf_(self): return self.valueOf_4619 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4620 def export(self, outfile, level, namespace_='cml:', name_='isReferencedBy', namespacedef_=''):4621 showIndent(outfile, level)4622 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4623 self.exportAttributes(outfile, level, [], namespace_, name_='isReferencedBy')4624 if self.hasContent_():4625 outfile.write('>')4626 outfile.write(self.valueOf_)4627 self.exportChildren(outfile, level + 1, namespace_, name_)4628 outfile.write('</%s%s>\n' % (namespace_, name_))4629 else:4630 outfile.write('/>\n')4631 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='isReferencedBy'):4632 pass4633 def exportChildren(self, outfile, level, namespace_='cml:', name_='isReferencedBy'):4634 pass4635 def hasContent_(self):4636 if (4637 self.valueOf_4638 ):4639 return True4640 else:4641 return False4642 def exportLiteral(self, outfile, level, name_='isReferencedBy'):4643 level += 14644 self.exportLiteralAttributes(outfile, level, [], name_)4645 if self.hasContent_():4646 self.exportLiteralChildren(outfile, level, name_)4647 showIndent(outfile, level)4648 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4649 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4650 pass4651 def exportLiteralChildren(self, outfile, level, name_):4652 pass4653 def build(self, node):4654 self.buildAttributes(node, node.attrib, [])4655 self.valueOf_ = get_all_text_(node)4656 for child in node:4657 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4658 self.buildChildren(child, node, nodeName_)4659 def buildAttributes(self, node, attrs, already_processed):4660 pass4661 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4662 pass4663# end class isReferencedBy4664class references(GeneratedsSuper):4665 subclass = None4666 superclass = None4667 def __init__(self, valueOf_=None):4668 self.valueOf_ = valueOf_4669 def factory(*args_, **kwargs_):4670 if references.subclass:4671 return references.subclass(*args_, **kwargs_)4672 else:4673 return references(*args_, **kwargs_)4674 factory = staticmethod(factory)4675 def get_valueOf_(self): return self.valueOf_4676 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4677 def export(self, outfile, level, namespace_='cml:', name_='references', namespacedef_=''):4678 showIndent(outfile, level)4679 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4680 self.exportAttributes(outfile, level, [], namespace_, name_='references')4681 if self.hasContent_():4682 outfile.write('>')4683 outfile.write(self.valueOf_)4684 self.exportChildren(outfile, level + 1, namespace_, name_)4685 outfile.write('</%s%s>\n' % (namespace_, name_))4686 else:4687 outfile.write('/>\n')4688 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='references'):4689 pass4690 def exportChildren(self, outfile, level, namespace_='cml:', name_='references'):4691 pass4692 def hasContent_(self):4693 if (4694 self.valueOf_4695 ):4696 return True4697 else:4698 return False4699 def exportLiteral(self, outfile, level, name_='references'):4700 level += 14701 self.exportLiteralAttributes(outfile, level, [], name_)4702 if self.hasContent_():4703 self.exportLiteralChildren(outfile, level, name_)4704 showIndent(outfile, level)4705 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4706 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4707 pass4708 def exportLiteralChildren(self, outfile, level, name_):4709 pass4710 def build(self, node):4711 self.buildAttributes(node, node.attrib, [])4712 self.valueOf_ = get_all_text_(node)4713 for child in node:4714 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4715 self.buildChildren(child, node, nodeName_)4716 def buildAttributes(self, node, attrs, already_processed):4717 pass4718 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4719 pass4720# end class references4721class isFormatOf(GeneratedsSuper):4722 subclass = None4723 superclass = None4724 def __init__(self, valueOf_=None):4725 self.valueOf_ = valueOf_4726 def factory(*args_, **kwargs_):4727 if isFormatOf.subclass:4728 return isFormatOf.subclass(*args_, **kwargs_)4729 else:4730 return isFormatOf(*args_, **kwargs_)4731 factory = staticmethod(factory)4732 def get_valueOf_(self): return self.valueOf_4733 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4734 def export(self, outfile, level, namespace_='cml:', name_='isFormatOf', namespacedef_=''):4735 showIndent(outfile, level)4736 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4737 self.exportAttributes(outfile, level, [], namespace_, name_='isFormatOf')4738 if self.hasContent_():4739 outfile.write('>')4740 outfile.write(self.valueOf_)4741 self.exportChildren(outfile, level + 1, namespace_, name_)4742 outfile.write('</%s%s>\n' % (namespace_, name_))4743 else:4744 outfile.write('/>\n')4745 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='isFormatOf'):4746 pass4747 def exportChildren(self, outfile, level, namespace_='cml:', name_='isFormatOf'):4748 pass4749 def hasContent_(self):4750 if (4751 self.valueOf_4752 ):4753 return True4754 else:4755 return False4756 def exportLiteral(self, outfile, level, name_='isFormatOf'):4757 level += 14758 self.exportLiteralAttributes(outfile, level, [], name_)4759 if self.hasContent_():4760 self.exportLiteralChildren(outfile, level, name_)4761 showIndent(outfile, level)4762 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4763 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4764 pass4765 def exportLiteralChildren(self, outfile, level, name_):4766 pass4767 def build(self, node):4768 self.buildAttributes(node, node.attrib, [])4769 self.valueOf_ = get_all_text_(node)4770 for child in node:4771 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4772 self.buildChildren(child, node, nodeName_)4773 def buildAttributes(self, node, attrs, already_processed):4774 pass4775 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4776 pass4777# end class isFormatOf4778class hasFormat(GeneratedsSuper):4779 subclass = None4780 superclass = None4781 def __init__(self, valueOf_=None):4782 self.valueOf_ = valueOf_4783 def factory(*args_, **kwargs_):4784 if hasFormat.subclass:4785 return hasFormat.subclass(*args_, **kwargs_)4786 else:4787 return hasFormat(*args_, **kwargs_)4788 factory = staticmethod(factory)4789 def get_valueOf_(self): return self.valueOf_4790 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4791 def export(self, outfile, level, namespace_='cml:', name_='hasFormat', namespacedef_=''):4792 showIndent(outfile, level)4793 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4794 self.exportAttributes(outfile, level, [], namespace_, name_='hasFormat')4795 if self.hasContent_():4796 outfile.write('>')4797 outfile.write(self.valueOf_)4798 self.exportChildren(outfile, level + 1, namespace_, name_)4799 outfile.write('</%s%s>\n' % (namespace_, name_))4800 else:4801 outfile.write('/>\n')4802 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='hasFormat'):4803 pass4804 def exportChildren(self, outfile, level, namespace_='cml:', name_='hasFormat'):4805 pass4806 def hasContent_(self):4807 if (4808 self.valueOf_4809 ):4810 return True4811 else:4812 return False4813 def exportLiteral(self, outfile, level, name_='hasFormat'):4814 level += 14815 self.exportLiteralAttributes(outfile, level, [], name_)4816 if self.hasContent_():4817 self.exportLiteralChildren(outfile, level, name_)4818 showIndent(outfile, level)4819 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4820 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4821 pass4822 def exportLiteralChildren(self, outfile, level, name_):4823 pass4824 def build(self, node):4825 self.buildAttributes(node, node.attrib, [])4826 self.valueOf_ = get_all_text_(node)4827 for child in node:4828 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4829 self.buildChildren(child, node, nodeName_)4830 def buildAttributes(self, node, attrs, already_processed):4831 pass4832 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4833 pass4834# end class hasFormat4835class conformsTo(GeneratedsSuper):4836 subclass = None4837 superclass = None4838 def __init__(self, valueOf_=None):4839 self.valueOf_ = valueOf_4840 def factory(*args_, **kwargs_):4841 if conformsTo.subclass:4842 return conformsTo.subclass(*args_, **kwargs_)4843 else:4844 return conformsTo(*args_, **kwargs_)4845 factory = staticmethod(factory)4846 def get_valueOf_(self): return self.valueOf_4847 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4848 def export(self, outfile, level, namespace_='cml:', name_='conformsTo', namespacedef_=''):4849 showIndent(outfile, level)4850 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4851 self.exportAttributes(outfile, level, [], namespace_, name_='conformsTo')4852 if self.hasContent_():4853 outfile.write('>')4854 outfile.write(self.valueOf_)4855 self.exportChildren(outfile, level + 1, namespace_, name_)4856 outfile.write('</%s%s>\n' % (namespace_, name_))4857 else:4858 outfile.write('/>\n')4859 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='conformsTo'):4860 pass4861 def exportChildren(self, outfile, level, namespace_='cml:', name_='conformsTo'):4862 pass4863 def hasContent_(self):4864 if (4865 self.valueOf_4866 ):4867 return True4868 else:4869 return False4870 def exportLiteral(self, outfile, level, name_='conformsTo'):4871 level += 14872 self.exportLiteralAttributes(outfile, level, [], name_)4873 if self.hasContent_():4874 self.exportLiteralChildren(outfile, level, name_)4875 showIndent(outfile, level)4876 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4877 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4878 pass4879 def exportLiteralChildren(self, outfile, level, name_):4880 pass4881 def build(self, node):4882 self.buildAttributes(node, node.attrib, [])4883 self.valueOf_ = get_all_text_(node)4884 for child in node:4885 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4886 self.buildChildren(child, node, nodeName_)4887 def buildAttributes(self, node, attrs, already_processed):4888 pass4889 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4890 pass4891# end class conformsTo4892class spatial(GeneratedsSuper):4893 subclass = None4894 superclass = None4895 def __init__(self, valueOf_=None):4896 self.valueOf_ = valueOf_4897 def factory(*args_, **kwargs_):4898 if spatial.subclass:4899 return spatial.subclass(*args_, **kwargs_)4900 else:4901 return spatial(*args_, **kwargs_)4902 factory = staticmethod(factory)4903 def get_valueOf_(self): return self.valueOf_4904 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4905 def export(self, outfile, level, namespace_='cml:', name_='spatial', namespacedef_=''):4906 showIndent(outfile, level)4907 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4908 self.exportAttributes(outfile, level, [], namespace_, name_='spatial')4909 if self.hasContent_():4910 outfile.write('>')4911 outfile.write(self.valueOf_)4912 self.exportChildren(outfile, level + 1, namespace_, name_)4913 outfile.write('</%s%s>\n' % (namespace_, name_))4914 else:4915 outfile.write('/>\n')4916 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='spatial'):4917 pass4918 def exportChildren(self, outfile, level, namespace_='cml:', name_='spatial'):4919 pass4920 def hasContent_(self):4921 if (4922 self.valueOf_4923 ):4924 return True4925 else:4926 return False4927 def exportLiteral(self, outfile, level, name_='spatial'):4928 level += 14929 self.exportLiteralAttributes(outfile, level, [], name_)4930 if self.hasContent_():4931 self.exportLiteralChildren(outfile, level, name_)4932 showIndent(outfile, level)4933 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4934 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4935 pass4936 def exportLiteralChildren(self, outfile, level, name_):4937 pass4938 def build(self, node):4939 self.buildAttributes(node, node.attrib, [])4940 self.valueOf_ = get_all_text_(node)4941 for child in node:4942 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]4943 self.buildChildren(child, node, nodeName_)4944 def buildAttributes(self, node, attrs, already_processed):4945 pass4946 def buildChildren(self, child_, node, nodeName_, from_subclass=False):4947 pass4948# end class spatial4949class temporal(GeneratedsSuper):4950 subclass = None4951 superclass = None4952 def __init__(self, valueOf_=None):4953 self.valueOf_ = valueOf_4954 def factory(*args_, **kwargs_):4955 if temporal.subclass:4956 return temporal.subclass(*args_, **kwargs_)4957 else:4958 return temporal(*args_, **kwargs_)4959 factory = staticmethod(factory)4960 def get_valueOf_(self): return self.valueOf_4961 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_4962 def export(self, outfile, level, namespace_='cml:', name_='temporal', namespacedef_=''):4963 showIndent(outfile, level)4964 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))4965 self.exportAttributes(outfile, level, [], namespace_, name_='temporal')4966 if self.hasContent_():4967 outfile.write('>')4968 outfile.write(self.valueOf_)4969 self.exportChildren(outfile, level + 1, namespace_, name_)4970 outfile.write('</%s%s>\n' % (namespace_, name_))4971 else:4972 outfile.write('/>\n')4973 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='temporal'):4974 pass4975 def exportChildren(self, outfile, level, namespace_='cml:', name_='temporal'):4976 pass4977 def hasContent_(self):4978 if (4979 self.valueOf_4980 ):4981 return True4982 else:4983 return False4984 def exportLiteral(self, outfile, level, name_='temporal'):4985 level += 14986 self.exportLiteralAttributes(outfile, level, [], name_)4987 if self.hasContent_():4988 self.exportLiteralChildren(outfile, level, name_)4989 showIndent(outfile, level)4990 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))4991 def exportLiteralAttributes(self, outfile, level, already_processed, name_):4992 pass4993 def exportLiteralChildren(self, outfile, level, name_):4994 pass4995 def build(self, node):4996 self.buildAttributes(node, node.attrib, [])4997 self.valueOf_ = get_all_text_(node)4998 for child in node:4999 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5000 self.buildChildren(child, node, nodeName_)5001 def buildAttributes(self, node, attrs, already_processed):5002 pass5003 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5004 pass5005# end class temporal5006class audience(GeneratedsSuper):5007 subclass = None5008 superclass = None5009 def __init__(self, valueOf_=None):5010 self.valueOf_ = valueOf_5011 def factory(*args_, **kwargs_):5012 if audience.subclass:5013 return audience.subclass(*args_, **kwargs_)5014 else:5015 return audience(*args_, **kwargs_)5016 factory = staticmethod(factory)5017 def get_valueOf_(self): return self.valueOf_5018 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5019 def export(self, outfile, level, namespace_='cml:', name_='audience', namespacedef_=''):5020 showIndent(outfile, level)5021 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5022 self.exportAttributes(outfile, level, [], namespace_, name_='audience')5023 if self.hasContent_():5024 outfile.write('>')5025 outfile.write(self.valueOf_)5026 self.exportChildren(outfile, level + 1, namespace_, name_)5027 outfile.write('</%s%s>\n' % (namespace_, name_))5028 else:5029 outfile.write('/>\n')5030 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='audience'):5031 pass5032 def exportChildren(self, outfile, level, namespace_='cml:', name_='audience'):5033 pass5034 def hasContent_(self):5035 if (5036 self.valueOf_5037 ):5038 return True5039 else:5040 return False5041 def exportLiteral(self, outfile, level, name_='audience'):5042 level += 15043 self.exportLiteralAttributes(outfile, level, [], name_)5044 if self.hasContent_():5045 self.exportLiteralChildren(outfile, level, name_)5046 showIndent(outfile, level)5047 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5048 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5049 pass5050 def exportLiteralChildren(self, outfile, level, name_):5051 pass5052 def build(self, node):5053 self.buildAttributes(node, node.attrib, [])5054 self.valueOf_ = get_all_text_(node)5055 for child in node:5056 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5057 self.buildChildren(child, node, nodeName_)5058 def buildAttributes(self, node, attrs, already_processed):5059 pass5060 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5061 pass5062# end class audience5063class accrualMethod(GeneratedsSuper):5064 subclass = None5065 superclass = None5066 def __init__(self, valueOf_=None):5067 self.valueOf_ = valueOf_5068 def factory(*args_, **kwargs_):5069 if accrualMethod.subclass:5070 return accrualMethod.subclass(*args_, **kwargs_)5071 else:5072 return accrualMethod(*args_, **kwargs_)5073 factory = staticmethod(factory)5074 def get_valueOf_(self): return self.valueOf_5075 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5076 def export(self, outfile, level, namespace_='cml:', name_='accrualMethod', namespacedef_=''):5077 showIndent(outfile, level)5078 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5079 self.exportAttributes(outfile, level, [], namespace_, name_='accrualMethod')5080 if self.hasContent_():5081 outfile.write('>')5082 outfile.write(self.valueOf_)5083 self.exportChildren(outfile, level + 1, namespace_, name_)5084 outfile.write('</%s%s>\n' % (namespace_, name_))5085 else:5086 outfile.write('/>\n')5087 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='accrualMethod'):5088 pass5089 def exportChildren(self, outfile, level, namespace_='cml:', name_='accrualMethod'):5090 pass5091 def hasContent_(self):5092 if (5093 self.valueOf_5094 ):5095 return True5096 else:5097 return False5098 def exportLiteral(self, outfile, level, name_='accrualMethod'):5099 level += 15100 self.exportLiteralAttributes(outfile, level, [], name_)5101 if self.hasContent_():5102 self.exportLiteralChildren(outfile, level, name_)5103 showIndent(outfile, level)5104 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5105 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5106 pass5107 def exportLiteralChildren(self, outfile, level, name_):5108 pass5109 def build(self, node):5110 self.buildAttributes(node, node.attrib, [])5111 self.valueOf_ = get_all_text_(node)5112 for child in node:5113 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5114 self.buildChildren(child, node, nodeName_)5115 def buildAttributes(self, node, attrs, already_processed):5116 pass5117 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5118 pass5119# end class accrualMethod5120class accrualPeriodicity(GeneratedsSuper):5121 subclass = None5122 superclass = None5123 def __init__(self, valueOf_=None):5124 self.valueOf_ = valueOf_5125 def factory(*args_, **kwargs_):5126 if accrualPeriodicity.subclass:5127 return accrualPeriodicity.subclass(*args_, **kwargs_)5128 else:5129 return accrualPeriodicity(*args_, **kwargs_)5130 factory = staticmethod(factory)5131 def get_valueOf_(self): return self.valueOf_5132 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5133 def export(self, outfile, level, namespace_='cml:', name_='accrualPeriodicity', namespacedef_=''):5134 showIndent(outfile, level)5135 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5136 self.exportAttributes(outfile, level, [], namespace_, name_='accrualPeriodicity')5137 if self.hasContent_():5138 outfile.write('>')5139 outfile.write(self.valueOf_)5140 self.exportChildren(outfile, level + 1, namespace_, name_)5141 outfile.write('</%s%s>\n' % (namespace_, name_))5142 else:5143 outfile.write('/>\n')5144 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='accrualPeriodicity'):5145 pass5146 def exportChildren(self, outfile, level, namespace_='cml:', name_='accrualPeriodicity'):5147 pass5148 def hasContent_(self):5149 if (5150 self.valueOf_5151 ):5152 return True5153 else:5154 return False5155 def exportLiteral(self, outfile, level, name_='accrualPeriodicity'):5156 level += 15157 self.exportLiteralAttributes(outfile, level, [], name_)5158 if self.hasContent_():5159 self.exportLiteralChildren(outfile, level, name_)5160 showIndent(outfile, level)5161 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5162 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5163 pass5164 def exportLiteralChildren(self, outfile, level, name_):5165 pass5166 def build(self, node):5167 self.buildAttributes(node, node.attrib, [])5168 self.valueOf_ = get_all_text_(node)5169 for child in node:5170 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5171 self.buildChildren(child, node, nodeName_)5172 def buildAttributes(self, node, attrs, already_processed):5173 pass5174 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5175 pass5176# end class accrualPeriodicity5177class accrualPolicy(GeneratedsSuper):5178 subclass = None5179 superclass = None5180 def __init__(self, valueOf_=None):5181 self.valueOf_ = valueOf_5182 def factory(*args_, **kwargs_):5183 if accrualPolicy.subclass:5184 return accrualPolicy.subclass(*args_, **kwargs_)5185 else:5186 return accrualPolicy(*args_, **kwargs_)5187 factory = staticmethod(factory)5188 def get_valueOf_(self): return self.valueOf_5189 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5190 def export(self, outfile, level, namespace_='cml:', name_='accrualPolicy', namespacedef_=''):5191 showIndent(outfile, level)5192 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5193 self.exportAttributes(outfile, level, [], namespace_, name_='accrualPolicy')5194 if self.hasContent_():5195 outfile.write('>')5196 outfile.write(self.valueOf_)5197 self.exportChildren(outfile, level + 1, namespace_, name_)5198 outfile.write('</%s%s>\n' % (namespace_, name_))5199 else:5200 outfile.write('/>\n')5201 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='accrualPolicy'):5202 pass5203 def exportChildren(self, outfile, level, namespace_='cml:', name_='accrualPolicy'):5204 pass5205 def hasContent_(self):5206 if (5207 self.valueOf_5208 ):5209 return True5210 else:5211 return False5212 def exportLiteral(self, outfile, level, name_='accrualPolicy'):5213 level += 15214 self.exportLiteralAttributes(outfile, level, [], name_)5215 if self.hasContent_():5216 self.exportLiteralChildren(outfile, level, name_)5217 showIndent(outfile, level)5218 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5219 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5220 pass5221 def exportLiteralChildren(self, outfile, level, name_):5222 pass5223 def build(self, node):5224 self.buildAttributes(node, node.attrib, [])5225 self.valueOf_ = get_all_text_(node)5226 for child in node:5227 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5228 self.buildChildren(child, node, nodeName_)5229 def buildAttributes(self, node, attrs, already_processed):5230 pass5231 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5232 pass5233# end class accrualPolicy5234class instructionalMethod(GeneratedsSuper):5235 subclass = None5236 superclass = None5237 def __init__(self, valueOf_=None):5238 self.valueOf_ = valueOf_5239 def factory(*args_, **kwargs_):5240 if instructionalMethod.subclass:5241 return instructionalMethod.subclass(*args_, **kwargs_)5242 else:5243 return instructionalMethod(*args_, **kwargs_)5244 factory = staticmethod(factory)5245 def get_valueOf_(self): return self.valueOf_5246 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5247 def export(self, outfile, level, namespace_='cml:', name_='instructionalMethod', namespacedef_=''):5248 showIndent(outfile, level)5249 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5250 self.exportAttributes(outfile, level, [], namespace_, name_='instructionalMethod')5251 if self.hasContent_():5252 outfile.write('>')5253 outfile.write(self.valueOf_)5254 self.exportChildren(outfile, level + 1, namespace_, name_)5255 outfile.write('</%s%s>\n' % (namespace_, name_))5256 else:5257 outfile.write('/>\n')5258 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='instructionalMethod'):5259 pass5260 def exportChildren(self, outfile, level, namespace_='cml:', name_='instructionalMethod'):5261 pass5262 def hasContent_(self):5263 if (5264 self.valueOf_5265 ):5266 return True5267 else:5268 return False5269 def exportLiteral(self, outfile, level, name_='instructionalMethod'):5270 level += 15271 self.exportLiteralAttributes(outfile, level, [], name_)5272 if self.hasContent_():5273 self.exportLiteralChildren(outfile, level, name_)5274 showIndent(outfile, level)5275 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5276 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5277 pass5278 def exportLiteralChildren(self, outfile, level, name_):5279 pass5280 def build(self, node):5281 self.buildAttributes(node, node.attrib, [])5282 self.valueOf_ = get_all_text_(node)5283 for child in node:5284 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5285 self.buildChildren(child, node, nodeName_)5286 def buildAttributes(self, node, attrs, already_processed):5287 pass5288 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5289 pass5290# end class instructionalMethod5291class provenance(GeneratedsSuper):5292 subclass = None5293 superclass = None5294 def __init__(self, valueOf_=None):5295 self.valueOf_ = valueOf_5296 def factory(*args_, **kwargs_):5297 if provenance.subclass:5298 return provenance.subclass(*args_, **kwargs_)5299 else:5300 return provenance(*args_, **kwargs_)5301 factory = staticmethod(factory)5302 def get_valueOf_(self): return self.valueOf_5303 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5304 def export(self, outfile, level, namespace_='cml:', name_='provenance', namespacedef_=''):5305 showIndent(outfile, level)5306 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5307 self.exportAttributes(outfile, level, [], namespace_, name_='provenance')5308 if self.hasContent_():5309 outfile.write('>')5310 outfile.write(self.valueOf_)5311 self.exportChildren(outfile, level + 1, namespace_, name_)5312 outfile.write('</%s%s>\n' % (namespace_, name_))5313 else:5314 outfile.write('/>\n')5315 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='provenance'):5316 pass5317 def exportChildren(self, outfile, level, namespace_='cml:', name_='provenance'):5318 pass5319 def hasContent_(self):5320 if (5321 self.valueOf_5322 ):5323 return True5324 else:5325 return False5326 def exportLiteral(self, outfile, level, name_='provenance'):5327 level += 15328 self.exportLiteralAttributes(outfile, level, [], name_)5329 if self.hasContent_():5330 self.exportLiteralChildren(outfile, level, name_)5331 showIndent(outfile, level)5332 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5333 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5334 pass5335 def exportLiteralChildren(self, outfile, level, name_):5336 pass5337 def build(self, node):5338 self.buildAttributes(node, node.attrib, [])5339 self.valueOf_ = get_all_text_(node)5340 for child in node:5341 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5342 self.buildChildren(child, node, nodeName_)5343 def buildAttributes(self, node, attrs, already_processed):5344 pass5345 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5346 pass5347# end class provenance5348class rightsHolder(GeneratedsSuper):5349 subclass = None5350 superclass = None5351 def __init__(self, valueOf_=None):5352 self.valueOf_ = valueOf_5353 def factory(*args_, **kwargs_):5354 if rightsHolder.subclass:5355 return rightsHolder.subclass(*args_, **kwargs_)5356 else:5357 return rightsHolder(*args_, **kwargs_)5358 factory = staticmethod(factory)5359 def get_valueOf_(self): return self.valueOf_5360 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5361 def export(self, outfile, level, namespace_='cml:', name_='rightsHolder', namespacedef_=''):5362 showIndent(outfile, level)5363 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5364 self.exportAttributes(outfile, level, [], namespace_, name_='rightsHolder')5365 if self.hasContent_():5366 outfile.write('>')5367 outfile.write(self.valueOf_)5368 self.exportChildren(outfile, level + 1, namespace_, name_)5369 outfile.write('</%s%s>\n' % (namespace_, name_))5370 else:5371 outfile.write('/>\n')5372 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='rightsHolder'):5373 pass5374 def exportChildren(self, outfile, level, namespace_='cml:', name_='rightsHolder'):5375 pass5376 def hasContent_(self):5377 if (5378 self.valueOf_5379 ):5380 return True5381 else:5382 return False5383 def exportLiteral(self, outfile, level, name_='rightsHolder'):5384 level += 15385 self.exportLiteralAttributes(outfile, level, [], name_)5386 if self.hasContent_():5387 self.exportLiteralChildren(outfile, level, name_)5388 showIndent(outfile, level)5389 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5390 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5391 pass5392 def exportLiteralChildren(self, outfile, level, name_):5393 pass5394 def build(self, node):5395 self.buildAttributes(node, node.attrib, [])5396 self.valueOf_ = get_all_text_(node)5397 for child in node:5398 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5399 self.buildChildren(child, node, nodeName_)5400 def buildAttributes(self, node, attrs, already_processed):5401 pass5402 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5403 pass5404# end class rightsHolder5405class mediator(GeneratedsSuper):5406 subclass = None5407 superclass = None5408 def __init__(self, valueOf_=None):5409 self.valueOf_ = valueOf_5410 def factory(*args_, **kwargs_):5411 if mediator.subclass:5412 return mediator.subclass(*args_, **kwargs_)5413 else:5414 return mediator(*args_, **kwargs_)5415 factory = staticmethod(factory)5416 def get_valueOf_(self): return self.valueOf_5417 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5418 def export(self, outfile, level, namespace_='cml:', name_='mediator', namespacedef_=''):5419 showIndent(outfile, level)5420 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5421 self.exportAttributes(outfile, level, [], namespace_, name_='mediator')5422 if self.hasContent_():5423 outfile.write('>')5424 outfile.write(self.valueOf_)5425 self.exportChildren(outfile, level + 1, namespace_, name_)5426 outfile.write('</%s%s>\n' % (namespace_, name_))5427 else:5428 outfile.write('/>\n')5429 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='mediator'):5430 pass5431 def exportChildren(self, outfile, level, namespace_='cml:', name_='mediator'):5432 pass5433 def hasContent_(self):5434 if (5435 self.valueOf_5436 ):5437 return True5438 else:5439 return False5440 def exportLiteral(self, outfile, level, name_='mediator'):5441 level += 15442 self.exportLiteralAttributes(outfile, level, [], name_)5443 if self.hasContent_():5444 self.exportLiteralChildren(outfile, level, name_)5445 showIndent(outfile, level)5446 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5447 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5448 pass5449 def exportLiteralChildren(self, outfile, level, name_):5450 pass5451 def build(self, node):5452 self.buildAttributes(node, node.attrib, [])5453 self.valueOf_ = get_all_text_(node)5454 for child in node:5455 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5456 self.buildChildren(child, node, nodeName_)5457 def buildAttributes(self, node, attrs, already_processed):5458 pass5459 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5460 pass5461# end class mediator5462class educationLevel(GeneratedsSuper):5463 subclass = None5464 superclass = None5465 def __init__(self, valueOf_=None):5466 self.valueOf_ = valueOf_5467 def factory(*args_, **kwargs_):5468 if educationLevel.subclass:5469 return educationLevel.subclass(*args_, **kwargs_)5470 else:5471 return educationLevel(*args_, **kwargs_)5472 factory = staticmethod(factory)5473 def get_valueOf_(self): return self.valueOf_5474 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5475 def export(self, outfile, level, namespace_='cml:', name_='educationLevel', namespacedef_=''):5476 showIndent(outfile, level)5477 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5478 self.exportAttributes(outfile, level, [], namespace_, name_='educationLevel')5479 if self.hasContent_():5480 outfile.write('>')5481 outfile.write(self.valueOf_)5482 self.exportChildren(outfile, level + 1, namespace_, name_)5483 outfile.write('</%s%s>\n' % (namespace_, name_))5484 else:5485 outfile.write('/>\n')5486 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='educationLevel'):5487 pass5488 def exportChildren(self, outfile, level, namespace_='cml:', name_='educationLevel'):5489 pass5490 def hasContent_(self):5491 if (5492 self.valueOf_5493 ):5494 return True5495 else:5496 return False5497 def exportLiteral(self, outfile, level, name_='educationLevel'):5498 level += 15499 self.exportLiteralAttributes(outfile, level, [], name_)5500 if self.hasContent_():5501 self.exportLiteralChildren(outfile, level, name_)5502 showIndent(outfile, level)5503 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5504 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5505 pass5506 def exportLiteralChildren(self, outfile, level, name_):5507 pass5508 def build(self, node):5509 self.buildAttributes(node, node.attrib, [])5510 self.valueOf_ = get_all_text_(node)5511 for child in node:5512 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5513 self.buildChildren(child, node, nodeName_)5514 def buildAttributes(self, node, attrs, already_processed):5515 pass5516 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5517 pass5518# end class educationLevel5519class accessRights(GeneratedsSuper):5520 subclass = None5521 superclass = None5522 def __init__(self, valueOf_=None):5523 self.valueOf_ = valueOf_5524 def factory(*args_, **kwargs_):5525 if accessRights.subclass:5526 return accessRights.subclass(*args_, **kwargs_)5527 else:5528 return accessRights(*args_, **kwargs_)5529 factory = staticmethod(factory)5530 def get_valueOf_(self): return self.valueOf_5531 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5532 def export(self, outfile, level, namespace_='cml:', name_='accessRights', namespacedef_=''):5533 showIndent(outfile, level)5534 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5535 self.exportAttributes(outfile, level, [], namespace_, name_='accessRights')5536 if self.hasContent_():5537 outfile.write('>')5538 outfile.write(self.valueOf_)5539 self.exportChildren(outfile, level + 1, namespace_, name_)5540 outfile.write('</%s%s>\n' % (namespace_, name_))5541 else:5542 outfile.write('/>\n')5543 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='accessRights'):5544 pass5545 def exportChildren(self, outfile, level, namespace_='cml:', name_='accessRights'):5546 pass5547 def hasContent_(self):5548 if (5549 self.valueOf_5550 ):5551 return True5552 else:5553 return False5554 def exportLiteral(self, outfile, level, name_='accessRights'):5555 level += 15556 self.exportLiteralAttributes(outfile, level, [], name_)5557 if self.hasContent_():5558 self.exportLiteralChildren(outfile, level, name_)5559 showIndent(outfile, level)5560 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5561 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5562 pass5563 def exportLiteralChildren(self, outfile, level, name_):5564 pass5565 def build(self, node):5566 self.buildAttributes(node, node.attrib, [])5567 self.valueOf_ = get_all_text_(node)5568 for child in node:5569 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5570 self.buildChildren(child, node, nodeName_)5571 def buildAttributes(self, node, attrs, already_processed):5572 pass5573 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5574 pass5575# end class accessRights5576class license(GeneratedsSuper):5577 subclass = None5578 superclass = None5579 def __init__(self, valueOf_=None):5580 self.valueOf_ = valueOf_5581 def factory(*args_, **kwargs_):5582 if license.subclass:5583 return license.subclass(*args_, **kwargs_)5584 else:5585 return license(*args_, **kwargs_)5586 factory = staticmethod(factory)5587 def get_valueOf_(self): return self.valueOf_5588 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5589 def export(self, outfile, level, namespace_='cml:', name_='license', namespacedef_=''):5590 showIndent(outfile, level)5591 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5592 self.exportAttributes(outfile, level, [], namespace_, name_='license')5593 if self.hasContent_():5594 outfile.write('>')5595 outfile.write(self.valueOf_)5596 self.exportChildren(outfile, level + 1, namespace_, name_)5597 outfile.write('</%s%s>\n' % (namespace_, name_))5598 else:5599 outfile.write('/>\n')5600 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='license'):5601 pass5602 def exportChildren(self, outfile, level, namespace_='cml:', name_='license'):5603 pass5604 def hasContent_(self):5605 if (5606 self.valueOf_5607 ):5608 return True5609 else:5610 return False5611 def exportLiteral(self, outfile, level, name_='license'):5612 level += 15613 self.exportLiteralAttributes(outfile, level, [], name_)5614 if self.hasContent_():5615 self.exportLiteralChildren(outfile, level, name_)5616 showIndent(outfile, level)5617 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5618 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5619 pass5620 def exportLiteralChildren(self, outfile, level, name_):5621 pass5622 def build(self, node):5623 self.buildAttributes(node, node.attrib, [])5624 self.valueOf_ = get_all_text_(node)5625 for child in node:5626 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5627 self.buildChildren(child, node, nodeName_)5628 def buildAttributes(self, node, attrs, already_processed):5629 pass5630 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5631 pass5632# end class license5633class bibliographicCitation(GeneratedsSuper):5634 subclass = None5635 superclass = None5636 def __init__(self, valueOf_=None):5637 self.valueOf_ = valueOf_5638 def factory(*args_, **kwargs_):5639 if bibliographicCitation.subclass:5640 return bibliographicCitation.subclass(*args_, **kwargs_)5641 else:5642 return bibliographicCitation(*args_, **kwargs_)5643 factory = staticmethod(factory)5644 def get_valueOf_(self): return self.valueOf_5645 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5646 def export(self, outfile, level, namespace_='cml:', name_='bibliographicCitation', namespacedef_=''):5647 showIndent(outfile, level)5648 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5649 self.exportAttributes(outfile, level, [], namespace_, name_='bibliographicCitation')5650 if self.hasContent_():5651 outfile.write('>')5652 outfile.write(self.valueOf_)5653 self.exportChildren(outfile, level + 1, namespace_, name_)5654 outfile.write('</%s%s>\n' % (namespace_, name_))5655 else:5656 outfile.write('/>\n')5657 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='bibliographicCitation'):5658 pass5659 def exportChildren(self, outfile, level, namespace_='cml:', name_='bibliographicCitation'):5660 pass5661 def hasContent_(self):5662 if (5663 self.valueOf_5664 ):5665 return True5666 else:5667 return False5668 def exportLiteral(self, outfile, level, name_='bibliographicCitation'):5669 level += 15670 self.exportLiteralAttributes(outfile, level, [], name_)5671 if self.hasContent_():5672 self.exportLiteralChildren(outfile, level, name_)5673 showIndent(outfile, level)5674 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))5675 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5676 pass5677 def exportLiteralChildren(self, outfile, level, name_):5678 pass5679 def build(self, node):5680 self.buildAttributes(node, node.attrib, [])5681 self.valueOf_ = get_all_text_(node)5682 for child in node:5683 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5684 self.buildChildren(child, node, nodeName_)5685 def buildAttributes(self, node, attrs, already_processed):5686 pass5687 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5688 pass5689# end class bibliographicCitation5690class elementOrRefinementContainer(GeneratedsSuper):5691 """This is included as a convenience for schema authors who need to5692 define a root or container element for all of the DC elements5693 and element refinements."""5694 subclass = None5695 superclass = None5696 def __init__(self, any=None):5697 if any is None:5698 self.any = []5699 else:5700 self.any = any5701 def factory(*args_, **kwargs_):5702 if elementOrRefinementContainer.subclass:5703 return elementOrRefinementContainer.subclass(*args_, **kwargs_)5704 else:5705 return elementOrRefinementContainer(*args_, **kwargs_)5706 factory = staticmethod(factory)5707 def get_any(self): return self.any5708 def set_any(self, any): self.any = any5709 def add_any(self, value): self.any.append(value)5710 def insert_any(self, index, value): self.any[index] = value5711 def export(self, outfile, level, namespace_='cml:', name_='elementOrRefinementContainer', namespacedef_=''):5712 showIndent(outfile, level)5713 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5714 self.exportAttributes(outfile, level, [], namespace_, name_='elementOrRefinementContainer')5715 if self.hasContent_():5716 outfile.write('>\n')5717 self.exportChildren(outfile, level + 1, namespace_, name_)5718 showIndent(outfile, level)5719 outfile.write('</%s%s>\n' % (namespace_, name_))5720 else:5721 outfile.write('/>\n')5722 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='elementOrRefinementContainer'):5723 pass5724 def exportChildren(self, outfile, level, namespace_='cml:', name_='elementOrRefinementContainer'):5725 for any_ in self.get_any():5726 any_.export(outfile, level, namespace_, name_='any')5727 def hasContent_(self):5728 if (5729 self.any5730 ):5731 return True5732 else:5733 return False5734 def exportLiteral(self, outfile, level, name_='elementOrRefinementContainer'):5735 level += 15736 self.exportLiteralAttributes(outfile, level, [], name_)5737 if self.hasContent_():5738 self.exportLiteralChildren(outfile, level, name_)5739 def exportLiteralAttributes(self, outfile, level, already_processed, name_):5740 pass5741 def exportLiteralChildren(self, outfile, level, name_):5742 showIndent(outfile, level)5743 outfile.write('any=[\n')5744 level += 15745 for any_ in self.any:5746 showIndent(outfile, level)5747 outfile.write('model_.any(\n')5748 any_.exportLiteral(outfile, level)5749 showIndent(outfile, level)5750 outfile.write('),\n')5751 level -= 15752 showIndent(outfile, level)5753 outfile.write('],\n')5754 def build(self, node):5755 self.buildAttributes(node, node.attrib, [])5756 for child in node:5757 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]5758 self.buildChildren(child, node, nodeName_)5759 def buildAttributes(self, node, attrs, already_processed):5760 pass5761 def buildChildren(self, child_, node, nodeName_, from_subclass=False):5762 if nodeName_ == 'any': 5763 type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type')5764 if type_name_ is None:5765 type_name_ = child_.attrib.get('type')5766 if type_name_ is not None:5767 type_names_ = type_name_.split(':')5768 if len(type_names_) == 1:5769 type_name_ = type_names_[0]5770 else:5771 type_name_ = type_names_[1]5772 class_ = globals()[type_name_]5773 obj_ = class_.factory()5774 obj_.build(child_)5775 else:5776 raise NotImplementedError(5777 'Class not implemented for <any> element')5778 self.any.append(obj_)5779 elif nodeName_ == 'title': 5780 obj_ = title.factory()5781 obj_.build(child_)5782 self.title.append(obj_)5783 elif nodeName_ == 'creator': 5784 obj_ = creator.factory()5785 obj_.build(child_)5786 self.creator.append(obj_)5787 elif nodeName_ == 'subject': 5788 obj_ = subject.factory()5789 obj_.build(child_)5790 self.subject.append(obj_)5791 elif nodeName_ == 'description': 5792 obj_ = description.factory()5793 obj_.build(child_)5794 self.description.append(obj_)5795 elif nodeName_ == 'publisher': 5796 obj_ = publisher.factory()5797 obj_.build(child_)5798 self.publisher.append(obj_)5799 elif nodeName_ == 'contributor': 5800 obj_ = contributor.factory()5801 obj_.build(child_)5802 self.contributor.append(obj_)5803 elif nodeName_ == 'date': 5804 obj_ = date.factory()5805 obj_.build(child_)5806 self.date.append(obj_)5807 elif nodeName_ == 'type': 5808 obj_ = type_.factory()5809 obj_.build(child_)5810 self.type_.append(obj_)5811 elif nodeName_ == 'format': 5812 obj_ = format.factory()5813 obj_.build(child_)5814 self.format.append(obj_)5815 elif nodeName_ == 'identifier': 5816 obj_ = identifier.factory()5817 obj_.build(child_)5818 self.identifier.append(obj_)5819 elif nodeName_ == 'source': 5820 obj_ = source.factory()5821 obj_.build(child_)5822 self.source.append(obj_)5823 elif nodeName_ == 'language': 5824 obj_ = language.factory()5825 obj_.build(child_)5826 self.language.append(obj_)5827 elif nodeName_ == 'relation': 5828 obj_ = relation.factory()5829 obj_.build(child_)5830 self.relation.append(obj_)5831 elif nodeName_ == 'coverage': 5832 obj_ = coverage.factory()5833 obj_.build(child_)5834 self.coverage.append(obj_)5835 elif nodeName_ == 'rights': 5836 obj_ = rights.factory()5837 obj_.build(child_)5838 self.rights.append(obj_)5839 elif nodeName_ == 'alternative': 5840 obj_ = alternative.factory()5841 obj_.build(child_)5842 self.alternative.append(obj_)5843 elif nodeName_ == 'tableOfContents': 5844 obj_ = tableOfContents.factory()5845 obj_.build(child_)5846 self.tableOfContents.append(obj_)5847 elif nodeName_ == 'abstract': 5848 obj_ = abstract.factory()5849 obj_.build(child_)5850 self.abstract.append(obj_)5851 elif nodeName_ == 'created': 5852 obj_ = created.factory()5853 obj_.build(child_)5854 self.created.append(obj_)5855 elif nodeName_ == 'valid': 5856 obj_ = valid.factory()5857 obj_.build(child_)5858 self.valid.append(obj_)5859 elif nodeName_ == 'available': 5860 obj_ = available.factory()5861 obj_.build(child_)5862 self.available.append(obj_)5863 elif nodeName_ == 'issued': 5864 obj_ = issued.factory()5865 obj_.build(child_)5866 self.issued.append(obj_)5867 elif nodeName_ == 'modified': 5868 obj_ = modified.factory()5869 obj_.build(child_)5870 self.modified.append(obj_)5871 elif nodeName_ == 'dateAccepted': 5872 obj_ = dateAccepted.factory()5873 obj_.build(child_)5874 self.dateAccepted.append(obj_)5875 elif nodeName_ == 'dateCopyrighted': 5876 obj_ = dateCopyrighted.factory()5877 obj_.build(child_)5878 self.dateCopyrighted.append(obj_)5879 elif nodeName_ == 'dateSubmitted': 5880 obj_ = dateSubmitted.factory()5881 obj_.build(child_)5882 self.dateSubmitted.append(obj_)5883 elif nodeName_ == 'extent': 5884 obj_ = extent.factory()5885 obj_.build(child_)5886 self.extent.append(obj_)5887 elif nodeName_ == 'medium': 5888 obj_ = medium.factory()5889 obj_.build(child_)5890 self.medium.append(obj_)5891 elif nodeName_ == 'bibliographicCitation': 5892 obj_ = bibliographicCitation.factory()5893 obj_.build(child_)5894 self.bibliographicCitation.append(obj_)5895 elif nodeName_ == 'isVersionOf': 5896 obj_ = isVersionOf.factory()5897 obj_.build(child_)5898 self.isVersionOf.append(obj_)5899 elif nodeName_ == 'hasVersion': 5900 obj_ = hasVersion.factory()5901 obj_.build(child_)5902 self.hasVersion.append(obj_)5903 elif nodeName_ == 'isReplacedBy': 5904 obj_ = isReplacedBy.factory()5905 obj_.build(child_)5906 self.isReplacedBy.append(obj_)5907 elif nodeName_ == 'replaces': 5908 obj_ = replaces.factory()5909 obj_.build(child_)5910 self.replaces.append(obj_)5911 elif nodeName_ == 'isRequiredBy': 5912 obj_ = isRequiredBy.factory()5913 obj_.build(child_)5914 self.isRequiredBy.append(obj_)5915 elif nodeName_ == 'requires': 5916 obj_ = requires.factory()5917 obj_.build(child_)5918 self.requires.append(obj_)5919 elif nodeName_ == 'isPartOf': 5920 obj_ = isPartOf.factory()5921 obj_.build(child_)5922 self.isPartOf.append(obj_)5923 elif nodeName_ == 'hasPart': 5924 obj_ = hasPart.factory()5925 obj_.build(child_)5926 self.hasPart.append(obj_)5927 elif nodeName_ == 'isReferencedBy': 5928 obj_ = isReferencedBy.factory()5929 obj_.build(child_)5930 self.isReferencedBy.append(obj_)5931 elif nodeName_ == 'references': 5932 obj_ = references.factory()5933 obj_.build(child_)5934 self.references.append(obj_)5935 elif nodeName_ == 'isFormatOf': 5936 obj_ = isFormatOf.factory()5937 obj_.build(child_)5938 self.isFormatOf.append(obj_)5939 elif nodeName_ == 'hasFormat': 5940 obj_ = hasFormat.factory()5941 obj_.build(child_)5942 self.hasFormat.append(obj_)5943 elif nodeName_ == 'conformsTo': 5944 obj_ = conformsTo.factory()5945 obj_.build(child_)5946 self.conformsTo.append(obj_)5947 elif nodeName_ == 'spatial': 5948 obj_ = spatial.factory()5949 obj_.build(child_)5950 self.spatial.append(obj_)5951 elif nodeName_ == 'temporal': 5952 obj_ = temporal.factory()5953 obj_.build(child_)5954 self.temporal.append(obj_)5955 elif nodeName_ == 'accessRights': 5956 obj_ = accessRights.factory()5957 obj_.build(child_)5958 self.accessRights.append(obj_)5959 elif nodeName_ == 'license': 5960 obj_ = license.factory()5961 obj_.build(child_)5962 self.license.append(obj_)5963# end class elementOrRefinementContainer5964class SimpleLiteral(GeneratedsSuper):5965 """This is the default type for all of the DC elements. It permits text5966 content only with optional xml:lang attribute. Text is allowed5967 because mixed="true", but sub-elements are disallowed because5968 minOccurs="0" and maxOccurs="0" are on the xs:any tag. This5969 complexType allows for restriction or extension permitting child5970 elements."""5971 subclass = None5972 superclass = None5973 def __init__(self, lang=None, valueOf_=None):5974 self.lang = _cast(None, lang)5975 self.valueOf_ = valueOf_5976 def factory(*args_, **kwargs_):5977 if SimpleLiteral.subclass:5978 return SimpleLiteral.subclass(*args_, **kwargs_)5979 else:5980 return SimpleLiteral(*args_, **kwargs_)5981 factory = staticmethod(factory)5982 def get_lang(self): return self.lang5983 def set_lang(self, lang): self.lang = lang5984 def get_valueOf_(self): return self.valueOf_5985 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_5986 def export(self, outfile, level, namespace_='cml:', name_='SimpleLiteral', namespacedef_=''):5987 showIndent(outfile, level)5988 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))5989 self.exportAttributes(outfile, level, [], namespace_, name_='SimpleLiteral')5990 if self.hasContent_():5991 outfile.write('>')5992 outfile.write(self.valueOf_)5993 self.exportChildren(outfile, level + 1, namespace_, name_)5994 outfile.write('</%s%s>\n' % (namespace_, name_))5995 else:5996 outfile.write('/>\n')5997 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='SimpleLiteral'):5998 if self.lang is not None and 'lang' not in already_processed:5999 already_processed.append('lang')6000 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6001 def exportChildren(self, outfile, level, namespace_='cml:', name_='SimpleLiteral'):6002 pass6003 def hasContent_(self):6004 if (6005 self.valueOf_6006 ):6007 return True6008 else:6009 return False6010 def exportLiteral(self, outfile, level, name_='SimpleLiteral'):6011 level += 16012 self.exportLiteralAttributes(outfile, level, [], name_)6013 if self.hasContent_():6014 self.exportLiteralChildren(outfile, level, name_)6015 showIndent(outfile, level)6016 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6017 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6018 if self.lang is not None and 'lang' not in already_processed:6019 already_processed.append('lang')6020 showIndent(outfile, level)6021 outfile.write('lang = "%s",\n' % (self.lang,))6022 def exportLiteralChildren(self, outfile, level, name_):6023 pass6024 def build(self, node):6025 self.buildAttributes(node, node.attrib, [])6026 self.valueOf_ = get_all_text_(node)6027 for child in node:6028 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6029 self.buildChildren(child, node, nodeName_)6030 def buildAttributes(self, node, attrs, already_processed):6031 value = attrs.get('lang')6032 if value is not None and 'lang' not in already_processed:6033 already_processed.append('lang')6034 self.lang = value6035 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6036 pass6037# end class SimpleLiteral6038class elementContainer(GeneratedsSuper):6039 """This complexType is included as a convenience for schema authors who6040 need to define a root or container element for all of the DC6041 elements."""6042 subclass = None6043 superclass = None6044 def __init__(self, any=None):6045 if any is None:6046 self.any = []6047 else:6048 self.any = any6049 def factory(*args_, **kwargs_):6050 if elementContainer.subclass:6051 return elementContainer.subclass(*args_, **kwargs_)6052 else:6053 return elementContainer(*args_, **kwargs_)6054 factory = staticmethod(factory)6055 def get_any(self): return self.any6056 def set_any(self, any): self.any = any6057 def add_any(self, value): self.any.append(value)6058 def insert_any(self, index, value): self.any[index] = value6059 def export(self, outfile, level, namespace_='cml:', name_='elementContainer', namespacedef_=''):6060 showIndent(outfile, level)6061 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6062 self.exportAttributes(outfile, level, [], namespace_, name_='elementContainer')6063 if self.hasContent_():6064 outfile.write('>\n')6065 self.exportChildren(outfile, level + 1, namespace_, name_)6066 showIndent(outfile, level)6067 outfile.write('</%s%s>\n' % (namespace_, name_))6068 else:6069 outfile.write('/>\n')6070 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='elementContainer'):6071 pass6072 def exportChildren(self, outfile, level, namespace_='cml:', name_='elementContainer'):6073 for any_ in self.get_any():6074 any_.export(outfile, level, namespace_, name_='any')6075 def hasContent_(self):6076 if (6077 self.any6078 ):6079 return True6080 else:6081 return False6082 def exportLiteral(self, outfile, level, name_='elementContainer'):6083 level += 16084 self.exportLiteralAttributes(outfile, level, [], name_)6085 if self.hasContent_():6086 self.exportLiteralChildren(outfile, level, name_)6087 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6088 pass6089 def exportLiteralChildren(self, outfile, level, name_):6090 showIndent(outfile, level)6091 outfile.write('any=[\n')6092 level += 16093 for any_ in self.any:6094 showIndent(outfile, level)6095 outfile.write('model_.any(\n')6096 any_.exportLiteral(outfile, level)6097 showIndent(outfile, level)6098 outfile.write('),\n')6099 level -= 16100 showIndent(outfile, level)6101 outfile.write('],\n')6102 def build(self, node):6103 self.buildAttributes(node, node.attrib, [])6104 for child in node:6105 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6106 self.buildChildren(child, node, nodeName_)6107 def buildAttributes(self, node, attrs, already_processed):6108 pass6109 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6110 if nodeName_ == 'any': 6111 type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type')6112 if type_name_ is None:6113 type_name_ = child_.attrib.get('type')6114 if type_name_ is not None:6115 type_names_ = type_name_.split(':')6116 if len(type_names_) == 1:6117 type_name_ = type_names_[0]6118 else:6119 type_name_ = type_names_[1]6120 class_ = globals()[type_name_]6121 obj_ = class_.factory()6122 obj_.build(child_)6123 else:6124 raise NotImplementedError(6125 'Class not implemented for <any> element')6126 self.any.append(obj_)6127 elif nodeName_ == 'title': 6128 obj_ = title.factory()6129 obj_.build(child_)6130 self.title.append(obj_)6131 elif nodeName_ == 'creator': 6132 obj_ = creator.factory()6133 obj_.build(child_)6134 self.creator.append(obj_)6135 elif nodeName_ == 'subject': 6136 obj_ = subject.factory()6137 obj_.build(child_)6138 self.subject.append(obj_)6139 elif nodeName_ == 'description': 6140 obj_ = description.factory()6141 obj_.build(child_)6142 self.description.append(obj_)6143 elif nodeName_ == 'publisher': 6144 obj_ = publisher.factory()6145 obj_.build(child_)6146 self.publisher.append(obj_)6147 elif nodeName_ == 'contributor': 6148 obj_ = contributor.factory()6149 obj_.build(child_)6150 self.contributor.append(obj_)6151 elif nodeName_ == 'date': 6152 obj_ = date.factory()6153 obj_.build(child_)6154 self.date.append(obj_)6155 elif nodeName_ == 'type': 6156 obj_ = type_.factory()6157 obj_.build(child_)6158 self.type_.append(obj_)6159 elif nodeName_ == 'format': 6160 obj_ = format.factory()6161 obj_.build(child_)6162 self.format.append(obj_)6163 elif nodeName_ == 'identifier': 6164 obj_ = identifier.factory()6165 obj_.build(child_)6166 self.identifier.append(obj_)6167 elif nodeName_ == 'source': 6168 obj_ = source.factory()6169 obj_.build(child_)6170 self.source.append(obj_)6171 elif nodeName_ == 'language': 6172 obj_ = language.factory()6173 obj_.build(child_)6174 self.language.append(obj_)6175 elif nodeName_ == 'relation': 6176 obj_ = relation.factory()6177 obj_.build(child_)6178 self.relation.append(obj_)6179 elif nodeName_ == 'coverage': 6180 obj_ = coverage.factory()6181 obj_.build(child_)6182 self.coverage.append(obj_)6183 elif nodeName_ == 'rights': 6184 obj_ = rights.factory()6185 obj_.build(child_)6186 self.rights.append(obj_)6187 elif nodeName_ == 'alternative': 6188 obj_ = alternative.factory()6189 obj_.build(child_)6190 self.alternative.append(obj_)6191 elif nodeName_ == 'tableOfContents': 6192 obj_ = tableOfContents.factory()6193 obj_.build(child_)6194 self.tableOfContents.append(obj_)6195 elif nodeName_ == 'abstract': 6196 obj_ = abstract.factory()6197 obj_.build(child_)6198 self.abstract.append(obj_)6199 elif nodeName_ == 'created': 6200 obj_ = created.factory()6201 obj_.build(child_)6202 self.created.append(obj_)6203 elif nodeName_ == 'valid': 6204 obj_ = valid.factory()6205 obj_.build(child_)6206 self.valid.append(obj_)6207 elif nodeName_ == 'available': 6208 obj_ = available.factory()6209 obj_.build(child_)6210 self.available.append(obj_)6211 elif nodeName_ == 'issued': 6212 obj_ = issued.factory()6213 obj_.build(child_)6214 self.issued.append(obj_)6215 elif nodeName_ == 'modified': 6216 obj_ = modified.factory()6217 obj_.build(child_)6218 self.modified.append(obj_)6219 elif nodeName_ == 'dateAccepted': 6220 obj_ = dateAccepted.factory()6221 obj_.build(child_)6222 self.dateAccepted.append(obj_)6223 elif nodeName_ == 'dateCopyrighted': 6224 obj_ = dateCopyrighted.factory()6225 obj_.build(child_)6226 self.dateCopyrighted.append(obj_)6227 elif nodeName_ == 'dateSubmitted': 6228 obj_ = dateSubmitted.factory()6229 obj_.build(child_)6230 self.dateSubmitted.append(obj_)6231 elif nodeName_ == 'extent': 6232 obj_ = extent.factory()6233 obj_.build(child_)6234 self.extent.append(obj_)6235 elif nodeName_ == 'medium': 6236 obj_ = medium.factory()6237 obj_.build(child_)6238 self.medium.append(obj_)6239 elif nodeName_ == 'bibliographicCitation': 6240 obj_ = bibliographicCitation.factory()6241 obj_.build(child_)6242 self.bibliographicCitation.append(obj_)6243 elif nodeName_ == 'isVersionOf': 6244 obj_ = isVersionOf.factory()6245 obj_.build(child_)6246 self.isVersionOf.append(obj_)6247 elif nodeName_ == 'hasVersion': 6248 obj_ = hasVersion.factory()6249 obj_.build(child_)6250 self.hasVersion.append(obj_)6251 elif nodeName_ == 'isReplacedBy': 6252 obj_ = isReplacedBy.factory()6253 obj_.build(child_)6254 self.isReplacedBy.append(obj_)6255 elif nodeName_ == 'replaces': 6256 obj_ = replaces.factory()6257 obj_.build(child_)6258 self.replaces.append(obj_)6259 elif nodeName_ == 'isRequiredBy': 6260 obj_ = isRequiredBy.factory()6261 obj_.build(child_)6262 self.isRequiredBy.append(obj_)6263 elif nodeName_ == 'requires': 6264 obj_ = requires.factory()6265 obj_.build(child_)6266 self.requires.append(obj_)6267 elif nodeName_ == 'isPartOf': 6268 obj_ = isPartOf.factory()6269 obj_.build(child_)6270 self.isPartOf.append(obj_)6271 elif nodeName_ == 'hasPart': 6272 obj_ = hasPart.factory()6273 obj_.build(child_)6274 self.hasPart.append(obj_)6275 elif nodeName_ == 'isReferencedBy': 6276 obj_ = isReferencedBy.factory()6277 obj_.build(child_)6278 self.isReferencedBy.append(obj_)6279 elif nodeName_ == 'references': 6280 obj_ = references.factory()6281 obj_.build(child_)6282 self.references.append(obj_)6283 elif nodeName_ == 'isFormatOf': 6284 obj_ = isFormatOf.factory()6285 obj_.build(child_)6286 self.isFormatOf.append(obj_)6287 elif nodeName_ == 'hasFormat': 6288 obj_ = hasFormat.factory()6289 obj_.build(child_)6290 self.hasFormat.append(obj_)6291 elif nodeName_ == 'conformsTo': 6292 obj_ = conformsTo.factory()6293 obj_.build(child_)6294 self.conformsTo.append(obj_)6295 elif nodeName_ == 'spatial': 6296 obj_ = spatial.factory()6297 obj_.build(child_)6298 self.spatial.append(obj_)6299 elif nodeName_ == 'temporal': 6300 obj_ = temporal.factory()6301 obj_.build(child_)6302 self.temporal.append(obj_)6303 elif nodeName_ == 'accessRights': 6304 obj_ = accessRights.factory()6305 obj_.build(child_)6306 self.accessRights.append(obj_)6307 elif nodeName_ == 'license': 6308 obj_ = license.factory()6309 obj_.build(child_)6310 self.license.append(obj_)6311# end class elementContainer6312class TGN(SimpleLiteral):6313 subclass = None6314 superclass = SimpleLiteral6315 def __init__(self, lang=None, valueOf_=None):6316 super(TGN, self).__init__(lang, valueOf_, )6317 self.lang = _cast(None, lang)6318 self.valueOf_ = valueOf_6319 def factory(*args_, **kwargs_):6320 if TGN.subclass:6321 return TGN.subclass(*args_, **kwargs_)6322 else:6323 return TGN(*args_, **kwargs_)6324 factory = staticmethod(factory)6325 def get_lang(self): return self.lang6326 def set_lang(self, lang): self.lang = lang6327 def get_valueOf_(self): return self.valueOf_6328 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6329 def export(self, outfile, level, namespace_='cml:', name_='TGN', namespacedef_=''):6330 showIndent(outfile, level)6331 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6332 self.exportAttributes(outfile, level, [], namespace_, name_='TGN')6333 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6334 outfile.write(' xsi:type="TGN"')6335 if self.hasContent_():6336 outfile.write('>')6337 outfile.write(self.valueOf_)6338 self.exportChildren(outfile, level + 1, namespace_, name_)6339 outfile.write('</%s%s>\n' % (namespace_, name_))6340 else:6341 outfile.write('/>\n')6342 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='TGN'):6343 super(TGN, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TGN')6344 if self.lang is not None and 'lang' not in already_processed:6345 already_processed.append('lang')6346 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6347 def exportChildren(self, outfile, level, namespace_='cml:', name_='TGN'):6348 super(TGN, self).exportChildren(outfile, level, namespace_, name_)6349 pass6350 def hasContent_(self):6351 if (6352 self.valueOf_ or6353 super(TGN, self).hasContent_()6354 ):6355 return True6356 else:6357 return False6358 def exportLiteral(self, outfile, level, name_='TGN'):6359 level += 16360 self.exportLiteralAttributes(outfile, level, [], name_)6361 if self.hasContent_():6362 self.exportLiteralChildren(outfile, level, name_)6363 showIndent(outfile, level)6364 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6365 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6366 if self.lang is not None and 'lang' not in already_processed:6367 already_processed.append('lang')6368 showIndent(outfile, level)6369 outfile.write('lang = "%s",\n' % (self.lang,))6370 super(TGN, self).exportLiteralAttributes(outfile, level, already_processed, name_)6371 def exportLiteralChildren(self, outfile, level, name_):6372 super(TGN, self).exportLiteralChildren(outfile, level, name_)6373 pass6374 def build(self, node):6375 self.buildAttributes(node, node.attrib, [])6376 self.valueOf_ = get_all_text_(node)6377 for child in node:6378 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6379 self.buildChildren(child, node, nodeName_)6380 def buildAttributes(self, node, attrs, already_processed):6381 value = attrs.get('lang')6382 if value is not None and 'lang' not in already_processed:6383 already_processed.append('lang')6384 self.lang = value6385 super(TGN, self).buildAttributes(node, attrs, already_processed)6386 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6387 super(TGN, self).buildChildren(child_, node, nodeName_, True)6388 pass6389# end class TGN6390class Box(SimpleLiteral):6391 subclass = None6392 superclass = SimpleLiteral6393 def __init__(self, lang=None, valueOf_=None):6394 super(Box, self).__init__(lang, valueOf_, )6395 self.lang = _cast(None, lang)6396 self.valueOf_ = valueOf_6397 def factory(*args_, **kwargs_):6398 if Box.subclass:6399 return Box.subclass(*args_, **kwargs_)6400 else:6401 return Box(*args_, **kwargs_)6402 factory = staticmethod(factory)6403 def get_lang(self): return self.lang6404 def set_lang(self, lang): self.lang = lang6405 def get_valueOf_(self): return self.valueOf_6406 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6407 def export(self, outfile, level, namespace_='cml:', name_='Box', namespacedef_=''):6408 showIndent(outfile, level)6409 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6410 self.exportAttributes(outfile, level, [], namespace_, name_='Box')6411 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6412 outfile.write(' xsi:type="Box"')6413 if self.hasContent_():6414 outfile.write('>')6415 outfile.write(self.valueOf_)6416 self.exportChildren(outfile, level + 1, namespace_, name_)6417 outfile.write('</%s%s>\n' % (namespace_, name_))6418 else:6419 outfile.write('/>\n')6420 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='Box'):6421 super(Box, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Box')6422 if self.lang is not None and 'lang' not in already_processed:6423 already_processed.append('lang')6424 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6425 def exportChildren(self, outfile, level, namespace_='cml:', name_='Box'):6426 super(Box, self).exportChildren(outfile, level, namespace_, name_)6427 pass6428 def hasContent_(self):6429 if (6430 self.valueOf_ or6431 super(Box, self).hasContent_()6432 ):6433 return True6434 else:6435 return False6436 def exportLiteral(self, outfile, level, name_='Box'):6437 level += 16438 self.exportLiteralAttributes(outfile, level, [], name_)6439 if self.hasContent_():6440 self.exportLiteralChildren(outfile, level, name_)6441 showIndent(outfile, level)6442 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6443 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6444 if self.lang is not None and 'lang' not in already_processed:6445 already_processed.append('lang')6446 showIndent(outfile, level)6447 outfile.write('lang = "%s",\n' % (self.lang,))6448 super(Box, self).exportLiteralAttributes(outfile, level, already_processed, name_)6449 def exportLiteralChildren(self, outfile, level, name_):6450 super(Box, self).exportLiteralChildren(outfile, level, name_)6451 pass6452 def build(self, node):6453 self.buildAttributes(node, node.attrib, [])6454 self.valueOf_ = get_all_text_(node)6455 for child in node:6456 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6457 self.buildChildren(child, node, nodeName_)6458 def buildAttributes(self, node, attrs, already_processed):6459 value = attrs.get('lang')6460 if value is not None and 'lang' not in already_processed:6461 already_processed.append('lang')6462 self.lang = value6463 super(Box, self).buildAttributes(node, attrs, already_processed)6464 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6465 super(Box, self).buildChildren(child_, node, nodeName_, True)6466 pass6467# end class Box6468class ISO3166(SimpleLiteral):6469 subclass = None6470 superclass = SimpleLiteral6471 def __init__(self, lang=None, valueOf_=None):6472 super(ISO3166, self).__init__(lang, valueOf_, )6473 self.lang = _cast(None, lang)6474 self.valueOf_ = valueOf_6475 def factory(*args_, **kwargs_):6476 if ISO3166.subclass:6477 return ISO3166.subclass(*args_, **kwargs_)6478 else:6479 return ISO3166(*args_, **kwargs_)6480 factory = staticmethod(factory)6481 def get_lang(self): return self.lang6482 def set_lang(self, lang): self.lang = lang6483 def get_valueOf_(self): return self.valueOf_6484 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6485 def export(self, outfile, level, namespace_='cml:', name_='ISO3166', namespacedef_=''):6486 showIndent(outfile, level)6487 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6488 self.exportAttributes(outfile, level, [], namespace_, name_='ISO3166')6489 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6490 outfile.write(' xsi:type="ISO3166"')6491 if self.hasContent_():6492 outfile.write('>')6493 outfile.write(self.valueOf_)6494 self.exportChildren(outfile, level + 1, namespace_, name_)6495 outfile.write('</%s%s>\n' % (namespace_, name_))6496 else:6497 outfile.write('/>\n')6498 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='ISO3166'):6499 super(ISO3166, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ISO3166')6500 if self.lang is not None and 'lang' not in already_processed:6501 already_processed.append('lang')6502 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6503 def exportChildren(self, outfile, level, namespace_='cml:', name_='ISO3166'):6504 super(ISO3166, self).exportChildren(outfile, level, namespace_, name_)6505 pass6506 def hasContent_(self):6507 if (6508 self.valueOf_ or6509 super(ISO3166, self).hasContent_()6510 ):6511 return True6512 else:6513 return False6514 def exportLiteral(self, outfile, level, name_='ISO3166'):6515 level += 16516 self.exportLiteralAttributes(outfile, level, [], name_)6517 if self.hasContent_():6518 self.exportLiteralChildren(outfile, level, name_)6519 showIndent(outfile, level)6520 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6521 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6522 if self.lang is not None and 'lang' not in already_processed:6523 already_processed.append('lang')6524 showIndent(outfile, level)6525 outfile.write('lang = "%s",\n' % (self.lang,))6526 super(ISO3166, self).exportLiteralAttributes(outfile, level, already_processed, name_)6527 def exportLiteralChildren(self, outfile, level, name_):6528 super(ISO3166, self).exportLiteralChildren(outfile, level, name_)6529 pass6530 def build(self, node):6531 self.buildAttributes(node, node.attrib, [])6532 self.valueOf_ = get_all_text_(node)6533 for child in node:6534 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6535 self.buildChildren(child, node, nodeName_)6536 def buildAttributes(self, node, attrs, already_processed):6537 value = attrs.get('lang')6538 if value is not None and 'lang' not in already_processed:6539 already_processed.append('lang')6540 self.lang = value6541 super(ISO3166, self).buildAttributes(node, attrs, already_processed)6542 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6543 super(ISO3166, self).buildChildren(child_, node, nodeName_, True)6544 pass6545# end class ISO31666546class Point(SimpleLiteral):6547 subclass = None6548 superclass = SimpleLiteral6549 def __init__(self, lang=None, valueOf_=None):6550 super(Point, self).__init__(lang, valueOf_, )6551 self.lang = _cast(None, lang)6552 self.valueOf_ = valueOf_6553 def factory(*args_, **kwargs_):6554 if Point.subclass:6555 return Point.subclass(*args_, **kwargs_)6556 else:6557 return Point(*args_, **kwargs_)6558 factory = staticmethod(factory)6559 def get_lang(self): return self.lang6560 def set_lang(self, lang): self.lang = lang6561 def get_valueOf_(self): return self.valueOf_6562 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6563 def export(self, outfile, level, namespace_='cml:', name_='Point', namespacedef_=''):6564 showIndent(outfile, level)6565 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6566 self.exportAttributes(outfile, level, [], namespace_, name_='Point')6567 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6568 outfile.write(' xsi:type="Point"')6569 if self.hasContent_():6570 outfile.write('>')6571 outfile.write(self.valueOf_)6572 self.exportChildren(outfile, level + 1, namespace_, name_)6573 outfile.write('</%s%s>\n' % (namespace_, name_))6574 else:6575 outfile.write('/>\n')6576 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='Point'):6577 super(Point, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Point')6578 if self.lang is not None and 'lang' not in already_processed:6579 already_processed.append('lang')6580 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6581 def exportChildren(self, outfile, level, namespace_='cml:', name_='Point'):6582 super(Point, self).exportChildren(outfile, level, namespace_, name_)6583 pass6584 def hasContent_(self):6585 if (6586 self.valueOf_ or6587 super(Point, self).hasContent_()6588 ):6589 return True6590 else:6591 return False6592 def exportLiteral(self, outfile, level, name_='Point'):6593 level += 16594 self.exportLiteralAttributes(outfile, level, [], name_)6595 if self.hasContent_():6596 self.exportLiteralChildren(outfile, level, name_)6597 showIndent(outfile, level)6598 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6599 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6600 if self.lang is not None and 'lang' not in already_processed:6601 already_processed.append('lang')6602 showIndent(outfile, level)6603 outfile.write('lang = "%s",\n' % (self.lang,))6604 super(Point, self).exportLiteralAttributes(outfile, level, already_processed, name_)6605 def exportLiteralChildren(self, outfile, level, name_):6606 super(Point, self).exportLiteralChildren(outfile, level, name_)6607 pass6608 def build(self, node):6609 self.buildAttributes(node, node.attrib, [])6610 self.valueOf_ = get_all_text_(node)6611 for child in node:6612 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6613 self.buildChildren(child, node, nodeName_)6614 def buildAttributes(self, node, attrs, already_processed):6615 value = attrs.get('lang')6616 if value is not None and 'lang' not in already_processed:6617 already_processed.append('lang')6618 self.lang = value6619 super(Point, self).buildAttributes(node, attrs, already_processed)6620 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6621 super(Point, self).buildChildren(child_, node, nodeName_, True)6622 pass6623# end class Point6624class RFC4646(SimpleLiteral):6625 subclass = None6626 superclass = SimpleLiteral6627 def __init__(self, lang=None, valueOf_=None):6628 super(RFC4646, self).__init__(lang, valueOf_, )6629 self.lang = _cast(None, lang)6630 self.valueOf_ = valueOf_6631 def factory(*args_, **kwargs_):6632 if RFC4646.subclass:6633 return RFC4646.subclass(*args_, **kwargs_)6634 else:6635 return RFC4646(*args_, **kwargs_)6636 factory = staticmethod(factory)6637 def get_lang(self): return self.lang6638 def set_lang(self, lang): self.lang = lang6639 def get_valueOf_(self): return self.valueOf_6640 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6641 def export(self, outfile, level, namespace_='cml:', name_='RFC4646', namespacedef_=''):6642 showIndent(outfile, level)6643 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6644 self.exportAttributes(outfile, level, [], namespace_, name_='RFC4646')6645 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6646 outfile.write(' xsi:type="RFC4646"')6647 if self.hasContent_():6648 outfile.write('>')6649 outfile.write(self.valueOf_)6650 self.exportChildren(outfile, level + 1, namespace_, name_)6651 outfile.write('</%s%s>\n' % (namespace_, name_))6652 else:6653 outfile.write('/>\n')6654 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='RFC4646'):6655 super(RFC4646, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RFC4646')6656 if self.lang is not None and 'lang' not in already_processed:6657 already_processed.append('lang')6658 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6659 def exportChildren(self, outfile, level, namespace_='cml:', name_='RFC4646'):6660 super(RFC4646, self).exportChildren(outfile, level, namespace_, name_)6661 pass6662 def hasContent_(self):6663 if (6664 self.valueOf_ or6665 super(RFC4646, self).hasContent_()6666 ):6667 return True6668 else:6669 return False6670 def exportLiteral(self, outfile, level, name_='RFC4646'):6671 level += 16672 self.exportLiteralAttributes(outfile, level, [], name_)6673 if self.hasContent_():6674 self.exportLiteralChildren(outfile, level, name_)6675 showIndent(outfile, level)6676 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6677 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6678 if self.lang is not None and 'lang' not in already_processed:6679 already_processed.append('lang')6680 showIndent(outfile, level)6681 outfile.write('lang = "%s",\n' % (self.lang,))6682 super(RFC4646, self).exportLiteralAttributes(outfile, level, already_processed, name_)6683 def exportLiteralChildren(self, outfile, level, name_):6684 super(RFC4646, self).exportLiteralChildren(outfile, level, name_)6685 pass6686 def build(self, node):6687 self.buildAttributes(node, node.attrib, [])6688 self.valueOf_ = get_all_text_(node)6689 for child in node:6690 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6691 self.buildChildren(child, node, nodeName_)6692 def buildAttributes(self, node, attrs, already_processed):6693 value = attrs.get('lang')6694 if value is not None and 'lang' not in already_processed:6695 already_processed.append('lang')6696 self.lang = value6697 super(RFC4646, self).buildAttributes(node, attrs, already_processed)6698 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6699 super(RFC4646, self).buildChildren(child_, node, nodeName_, True)6700 pass6701# end class RFC46466702class RFC3066(SimpleLiteral):6703 subclass = None6704 superclass = SimpleLiteral6705 def __init__(self, lang=None, valueOf_=None):6706 super(RFC3066, self).__init__(lang, valueOf_, )6707 self.lang = _cast(None, lang)6708 self.valueOf_ = valueOf_6709 def factory(*args_, **kwargs_):6710 if RFC3066.subclass:6711 return RFC3066.subclass(*args_, **kwargs_)6712 else:6713 return RFC3066(*args_, **kwargs_)6714 factory = staticmethod(factory)6715 def get_lang(self): return self.lang6716 def set_lang(self, lang): self.lang = lang6717 def get_valueOf_(self): return self.valueOf_6718 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6719 def export(self, outfile, level, namespace_='cml:', name_='RFC3066', namespacedef_=''):6720 showIndent(outfile, level)6721 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6722 self.exportAttributes(outfile, level, [], namespace_, name_='RFC3066')6723 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6724 outfile.write(' xsi:type="RFC3066"')6725 if self.hasContent_():6726 outfile.write('>')6727 outfile.write(self.valueOf_)6728 self.exportChildren(outfile, level + 1, namespace_, name_)6729 outfile.write('</%s%s>\n' % (namespace_, name_))6730 else:6731 outfile.write('/>\n')6732 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='RFC3066'):6733 super(RFC3066, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RFC3066')6734 if self.lang is not None and 'lang' not in already_processed:6735 already_processed.append('lang')6736 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6737 def exportChildren(self, outfile, level, namespace_='cml:', name_='RFC3066'):6738 super(RFC3066, self).exportChildren(outfile, level, namespace_, name_)6739 pass6740 def hasContent_(self):6741 if (6742 self.valueOf_ or6743 super(RFC3066, self).hasContent_()6744 ):6745 return True6746 else:6747 return False6748 def exportLiteral(self, outfile, level, name_='RFC3066'):6749 level += 16750 self.exportLiteralAttributes(outfile, level, [], name_)6751 if self.hasContent_():6752 self.exportLiteralChildren(outfile, level, name_)6753 showIndent(outfile, level)6754 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6755 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6756 if self.lang is not None and 'lang' not in already_processed:6757 already_processed.append('lang')6758 showIndent(outfile, level)6759 outfile.write('lang = "%s",\n' % (self.lang,))6760 super(RFC3066, self).exportLiteralAttributes(outfile, level, already_processed, name_)6761 def exportLiteralChildren(self, outfile, level, name_):6762 super(RFC3066, self).exportLiteralChildren(outfile, level, name_)6763 pass6764 def build(self, node):6765 self.buildAttributes(node, node.attrib, [])6766 self.valueOf_ = get_all_text_(node)6767 for child in node:6768 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6769 self.buildChildren(child, node, nodeName_)6770 def buildAttributes(self, node, attrs, already_processed):6771 value = attrs.get('lang')6772 if value is not None and 'lang' not in already_processed:6773 already_processed.append('lang')6774 self.lang = value6775 super(RFC3066, self).buildAttributes(node, attrs, already_processed)6776 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6777 super(RFC3066, self).buildChildren(child_, node, nodeName_, True)6778 pass6779# end class RFC30666780class RFC1766(SimpleLiteral):6781 subclass = None6782 superclass = SimpleLiteral6783 def __init__(self, lang=None, valueOf_=None):6784 super(RFC1766, self).__init__(lang, valueOf_, )6785 self.lang = _cast(None, lang)6786 self.valueOf_ = valueOf_6787 def factory(*args_, **kwargs_):6788 if RFC1766.subclass:6789 return RFC1766.subclass(*args_, **kwargs_)6790 else:6791 return RFC1766(*args_, **kwargs_)6792 factory = staticmethod(factory)6793 def get_lang(self): return self.lang6794 def set_lang(self, lang): self.lang = lang6795 def get_valueOf_(self): return self.valueOf_6796 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6797 def export(self, outfile, level, namespace_='cml:', name_='RFC1766', namespacedef_=''):6798 showIndent(outfile, level)6799 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6800 self.exportAttributes(outfile, level, [], namespace_, name_='RFC1766')6801 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6802 outfile.write(' xsi:type="RFC1766"')6803 if self.hasContent_():6804 outfile.write('>')6805 outfile.write(self.valueOf_)6806 self.exportChildren(outfile, level + 1, namespace_, name_)6807 outfile.write('</%s%s>\n' % (namespace_, name_))6808 else:6809 outfile.write('/>\n')6810 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='RFC1766'):6811 super(RFC1766, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RFC1766')6812 if self.lang is not None and 'lang' not in already_processed:6813 already_processed.append('lang')6814 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6815 def exportChildren(self, outfile, level, namespace_='cml:', name_='RFC1766'):6816 super(RFC1766, self).exportChildren(outfile, level, namespace_, name_)6817 pass6818 def hasContent_(self):6819 if (6820 self.valueOf_ or6821 super(RFC1766, self).hasContent_()6822 ):6823 return True6824 else:6825 return False6826 def exportLiteral(self, outfile, level, name_='RFC1766'):6827 level += 16828 self.exportLiteralAttributes(outfile, level, [], name_)6829 if self.hasContent_():6830 self.exportLiteralChildren(outfile, level, name_)6831 showIndent(outfile, level)6832 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6833 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6834 if self.lang is not None and 'lang' not in already_processed:6835 already_processed.append('lang')6836 showIndent(outfile, level)6837 outfile.write('lang = "%s",\n' % (self.lang,))6838 super(RFC1766, self).exportLiteralAttributes(outfile, level, already_processed, name_)6839 def exportLiteralChildren(self, outfile, level, name_):6840 super(RFC1766, self).exportLiteralChildren(outfile, level, name_)6841 pass6842 def build(self, node):6843 self.buildAttributes(node, node.attrib, [])6844 self.valueOf_ = get_all_text_(node)6845 for child in node:6846 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6847 self.buildChildren(child, node, nodeName_)6848 def buildAttributes(self, node, attrs, already_processed):6849 value = attrs.get('lang')6850 if value is not None and 'lang' not in already_processed:6851 already_processed.append('lang')6852 self.lang = value6853 super(RFC1766, self).buildAttributes(node, attrs, already_processed)6854 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6855 super(RFC1766, self).buildChildren(child_, node, nodeName_, True)6856 pass6857# end class RFC17666858class ISO639_3(SimpleLiteral):6859 subclass = None6860 superclass = SimpleLiteral6861 def __init__(self, lang=None, valueOf_=None):6862 super(ISO639_3, self).__init__(lang, valueOf_, )6863 self.lang = _cast(None, lang)6864 self.valueOf_ = valueOf_6865 def factory(*args_, **kwargs_):6866 if ISO639_3.subclass:6867 return ISO639_3.subclass(*args_, **kwargs_)6868 else:6869 return ISO639_3(*args_, **kwargs_)6870 factory = staticmethod(factory)6871 def get_lang(self): return self.lang6872 def set_lang(self, lang): self.lang = lang6873 def get_valueOf_(self): return self.valueOf_6874 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6875 def export(self, outfile, level, namespace_='cml:', name_='ISO639-3', namespacedef_=''):6876 showIndent(outfile, level)6877 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6878 self.exportAttributes(outfile, level, [], namespace_, name_='ISO639-3')6879 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6880 outfile.write(' xsi:type="ISO639-3"')6881 if self.hasContent_():6882 outfile.write('>')6883 outfile.write(self.valueOf_)6884 self.exportChildren(outfile, level + 1, namespace_, name_)6885 outfile.write('</%s%s>\n' % (namespace_, name_))6886 else:6887 outfile.write('/>\n')6888 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='ISO639-3'):6889 super(ISO639_3, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ISO639-3')6890 if self.lang is not None and 'lang' not in already_processed:6891 already_processed.append('lang')6892 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6893 def exportChildren(self, outfile, level, namespace_='cml:', name_='ISO639-3'):6894 super(ISO639_3, self).exportChildren(outfile, level, namespace_, name_)6895 pass6896 def hasContent_(self):6897 if (6898 self.valueOf_ or6899 super(ISO639_3, self).hasContent_()6900 ):6901 return True6902 else:6903 return False6904 def exportLiteral(self, outfile, level, name_='ISO639-3'):6905 level += 16906 self.exportLiteralAttributes(outfile, level, [], name_)6907 if self.hasContent_():6908 self.exportLiteralChildren(outfile, level, name_)6909 showIndent(outfile, level)6910 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6911 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6912 if self.lang is not None and 'lang' not in already_processed:6913 already_processed.append('lang')6914 showIndent(outfile, level)6915 outfile.write('lang = "%s",\n' % (self.lang,))6916 super(ISO639_3, self).exportLiteralAttributes(outfile, level, already_processed, name_)6917 def exportLiteralChildren(self, outfile, level, name_):6918 super(ISO639_3, self).exportLiteralChildren(outfile, level, name_)6919 pass6920 def build(self, node):6921 self.buildAttributes(node, node.attrib, [])6922 self.valueOf_ = get_all_text_(node)6923 for child in node:6924 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]6925 self.buildChildren(child, node, nodeName_)6926 def buildAttributes(self, node, attrs, already_processed):6927 value = attrs.get('lang')6928 if value is not None and 'lang' not in already_processed:6929 already_processed.append('lang')6930 self.lang = value6931 super(ISO639_3, self).buildAttributes(node, attrs, already_processed)6932 def buildChildren(self, child_, node, nodeName_, from_subclass=False):6933 super(ISO639_3, self).buildChildren(child_, node, nodeName_, True)6934 pass6935# end class ISO639_36936class ISO639_2(SimpleLiteral):6937 subclass = None6938 superclass = SimpleLiteral6939 def __init__(self, lang=None, valueOf_=None):6940 super(ISO639_2, self).__init__(lang, valueOf_, )6941 self.lang = _cast(None, lang)6942 self.valueOf_ = valueOf_6943 def factory(*args_, **kwargs_):6944 if ISO639_2.subclass:6945 return ISO639_2.subclass(*args_, **kwargs_)6946 else:6947 return ISO639_2(*args_, **kwargs_)6948 factory = staticmethod(factory)6949 def get_lang(self): return self.lang6950 def set_lang(self, lang): self.lang = lang6951 def get_valueOf_(self): return self.valueOf_6952 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_6953 def export(self, outfile, level, namespace_='cml:', name_='ISO639-2', namespacedef_=''):6954 showIndent(outfile, level)6955 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))6956 self.exportAttributes(outfile, level, [], namespace_, name_='ISO639-2')6957 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')6958 outfile.write(' xsi:type="ISO639-2"')6959 if self.hasContent_():6960 outfile.write('>')6961 outfile.write(self.valueOf_)6962 self.exportChildren(outfile, level + 1, namespace_, name_)6963 outfile.write('</%s%s>\n' % (namespace_, name_))6964 else:6965 outfile.write('/>\n')6966 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='ISO639-2'):6967 super(ISO639_2, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ISO639-2')6968 if self.lang is not None and 'lang' not in already_processed:6969 already_processed.append('lang')6970 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))6971 def exportChildren(self, outfile, level, namespace_='cml:', name_='ISO639-2'):6972 super(ISO639_2, self).exportChildren(outfile, level, namespace_, name_)6973 pass6974 def hasContent_(self):6975 if (6976 self.valueOf_ or6977 super(ISO639_2, self).hasContent_()6978 ):6979 return True6980 else:6981 return False6982 def exportLiteral(self, outfile, level, name_='ISO639-2'):6983 level += 16984 self.exportLiteralAttributes(outfile, level, [], name_)6985 if self.hasContent_():6986 self.exportLiteralChildren(outfile, level, name_)6987 showIndent(outfile, level)6988 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))6989 def exportLiteralAttributes(self, outfile, level, already_processed, name_):6990 if self.lang is not None and 'lang' not in already_processed:6991 already_processed.append('lang')6992 showIndent(outfile, level)6993 outfile.write('lang = "%s",\n' % (self.lang,))6994 super(ISO639_2, self).exportLiteralAttributes(outfile, level, already_processed, name_)6995 def exportLiteralChildren(self, outfile, level, name_):6996 super(ISO639_2, self).exportLiteralChildren(outfile, level, name_)6997 pass6998 def build(self, node):6999 self.buildAttributes(node, node.attrib, [])7000 self.valueOf_ = get_all_text_(node)7001 for child in node:7002 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7003 self.buildChildren(child, node, nodeName_)7004 def buildAttributes(self, node, attrs, already_processed):7005 value = attrs.get('lang')7006 if value is not None and 'lang' not in already_processed:7007 already_processed.append('lang')7008 self.lang = value7009 super(ISO639_2, self).buildAttributes(node, attrs, already_processed)7010 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7011 super(ISO639_2, self).buildChildren(child_, node, nodeName_, True)7012 pass7013# end class ISO639_27014class URI(SimpleLiteral):7015 subclass = None7016 superclass = SimpleLiteral7017 def __init__(self, lang=None, valueOf_=None):7018 super(URI, self).__init__(lang, valueOf_, )7019 self.lang = _cast(None, lang)7020 self.valueOf_ = valueOf_7021 def factory(*args_, **kwargs_):7022 if URI.subclass:7023 return URI.subclass(*args_, **kwargs_)7024 else:7025 return URI(*args_, **kwargs_)7026 factory = staticmethod(factory)7027 def get_lang(self): return self.lang7028 def set_lang(self, lang): self.lang = lang7029 def get_valueOf_(self): return self.valueOf_7030 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7031 def export(self, outfile, level, namespace_='cml:', name_='URI', namespacedef_=''):7032 showIndent(outfile, level)7033 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7034 self.exportAttributes(outfile, level, [], namespace_, name_='URI')7035 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7036 outfile.write(' xsi:type="URI"')7037 if self.hasContent_():7038 outfile.write('>')7039 outfile.write(self.valueOf_)7040 self.exportChildren(outfile, level + 1, namespace_, name_)7041 outfile.write('</%s%s>\n' % (namespace_, name_))7042 else:7043 outfile.write('/>\n')7044 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='URI'):7045 super(URI, self).exportAttributes(outfile, level, already_processed, namespace_, name_='URI')7046 if self.lang is not None and 'lang' not in already_processed:7047 already_processed.append('lang')7048 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7049 def exportChildren(self, outfile, level, namespace_='cml:', name_='URI'):7050 super(URI, self).exportChildren(outfile, level, namespace_, name_)7051 pass7052 def hasContent_(self):7053 if (7054 self.valueOf_ or7055 super(URI, self).hasContent_()7056 ):7057 return True7058 else:7059 return False7060 def exportLiteral(self, outfile, level, name_='URI'):7061 level += 17062 self.exportLiteralAttributes(outfile, level, [], name_)7063 if self.hasContent_():7064 self.exportLiteralChildren(outfile, level, name_)7065 showIndent(outfile, level)7066 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7067 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7068 if self.lang is not None and 'lang' not in already_processed:7069 already_processed.append('lang')7070 showIndent(outfile, level)7071 outfile.write('lang = "%s",\n' % (self.lang,))7072 super(URI, self).exportLiteralAttributes(outfile, level, already_processed, name_)7073 def exportLiteralChildren(self, outfile, level, name_):7074 super(URI, self).exportLiteralChildren(outfile, level, name_)7075 pass7076 def build(self, node):7077 self.buildAttributes(node, node.attrib, [])7078 self.valueOf_ = get_all_text_(node)7079 for child in node:7080 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7081 self.buildChildren(child, node, nodeName_)7082 def buildAttributes(self, node, attrs, already_processed):7083 value = attrs.get('lang')7084 if value is not None and 'lang' not in already_processed:7085 already_processed.append('lang')7086 self.lang = value7087 super(URI, self).buildAttributes(node, attrs, already_processed)7088 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7089 super(URI, self).buildChildren(child_, node, nodeName_, True)7090 pass7091# end class URI7092class IMT(SimpleLiteral):7093 subclass = None7094 superclass = SimpleLiteral7095 def __init__(self, lang=None, valueOf_=None):7096 super(IMT, self).__init__(lang, valueOf_, )7097 self.lang = _cast(None, lang)7098 self.valueOf_ = valueOf_7099 def factory(*args_, **kwargs_):7100 if IMT.subclass:7101 return IMT.subclass(*args_, **kwargs_)7102 else:7103 return IMT(*args_, **kwargs_)7104 factory = staticmethod(factory)7105 def get_lang(self): return self.lang7106 def set_lang(self, lang): self.lang = lang7107 def get_valueOf_(self): return self.valueOf_7108 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7109 def export(self, outfile, level, namespace_='cml:', name_='IMT', namespacedef_=''):7110 showIndent(outfile, level)7111 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7112 self.exportAttributes(outfile, level, [], namespace_, name_='IMT')7113 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7114 outfile.write(' xsi:type="IMT"')7115 if self.hasContent_():7116 outfile.write('>')7117 outfile.write(self.valueOf_)7118 self.exportChildren(outfile, level + 1, namespace_, name_)7119 outfile.write('</%s%s>\n' % (namespace_, name_))7120 else:7121 outfile.write('/>\n')7122 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='IMT'):7123 super(IMT, self).exportAttributes(outfile, level, already_processed, namespace_, name_='IMT')7124 if self.lang is not None and 'lang' not in already_processed:7125 already_processed.append('lang')7126 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7127 def exportChildren(self, outfile, level, namespace_='cml:', name_='IMT'):7128 super(IMT, self).exportChildren(outfile, level, namespace_, name_)7129 pass7130 def hasContent_(self):7131 if (7132 self.valueOf_ or7133 super(IMT, self).hasContent_()7134 ):7135 return True7136 else:7137 return False7138 def exportLiteral(self, outfile, level, name_='IMT'):7139 level += 17140 self.exportLiteralAttributes(outfile, level, [], name_)7141 if self.hasContent_():7142 self.exportLiteralChildren(outfile, level, name_)7143 showIndent(outfile, level)7144 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7145 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7146 if self.lang is not None and 'lang' not in already_processed:7147 already_processed.append('lang')7148 showIndent(outfile, level)7149 outfile.write('lang = "%s",\n' % (self.lang,))7150 super(IMT, self).exportLiteralAttributes(outfile, level, already_processed, name_)7151 def exportLiteralChildren(self, outfile, level, name_):7152 super(IMT, self).exportLiteralChildren(outfile, level, name_)7153 pass7154 def build(self, node):7155 self.buildAttributes(node, node.attrib, [])7156 self.valueOf_ = get_all_text_(node)7157 for child in node:7158 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7159 self.buildChildren(child, node, nodeName_)7160 def buildAttributes(self, node, attrs, already_processed):7161 value = attrs.get('lang')7162 if value is not None and 'lang' not in already_processed:7163 already_processed.append('lang')7164 self.lang = value7165 super(IMT, self).buildAttributes(node, attrs, already_processed)7166 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7167 super(IMT, self).buildChildren(child_, node, nodeName_, True)7168 pass7169# end class IMT7170class DCMIType(SimpleLiteral):7171 subclass = None7172 superclass = SimpleLiteral7173 def __init__(self, lang=None, valueOf_=None):7174 super(DCMIType, self).__init__(lang, valueOf_, )7175 self.lang = _cast(None, lang)7176 self.valueOf_ = valueOf_7177 def factory(*args_, **kwargs_):7178 if DCMIType.subclass:7179 return DCMIType.subclass(*args_, **kwargs_)7180 else:7181 return DCMIType(*args_, **kwargs_)7182 factory = staticmethod(factory)7183 def get_lang(self): return self.lang7184 def set_lang(self, lang): self.lang = lang7185 def get_valueOf_(self): return self.valueOf_7186 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7187 def export(self, outfile, level, namespace_='cml:', name_='DCMIType', namespacedef_=''):7188 showIndent(outfile, level)7189 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7190 self.exportAttributes(outfile, level, [], namespace_, name_='DCMIType')7191 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7192 outfile.write(' xsi:type="DCMIType"')7193 if self.hasContent_():7194 outfile.write('>')7195 outfile.write(self.valueOf_)7196 self.exportChildren(outfile, level + 1, namespace_, name_)7197 outfile.write('</%s%s>\n' % (namespace_, name_))7198 else:7199 outfile.write('/>\n')7200 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='DCMIType'):7201 super(DCMIType, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DCMIType')7202 if self.lang is not None and 'lang' not in already_processed:7203 already_processed.append('lang')7204 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7205 def exportChildren(self, outfile, level, namespace_='cml:', name_='DCMIType'):7206 super(DCMIType, self).exportChildren(outfile, level, namespace_, name_)7207 pass7208 def hasContent_(self):7209 if (7210 self.valueOf_ or7211 super(DCMIType, self).hasContent_()7212 ):7213 return True7214 else:7215 return False7216 def exportLiteral(self, outfile, level, name_='DCMIType'):7217 level += 17218 self.exportLiteralAttributes(outfile, level, [], name_)7219 if self.hasContent_():7220 self.exportLiteralChildren(outfile, level, name_)7221 showIndent(outfile, level)7222 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7223 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7224 if self.lang is not None and 'lang' not in already_processed:7225 already_processed.append('lang')7226 showIndent(outfile, level)7227 outfile.write('lang = "%s",\n' % (self.lang,))7228 super(DCMIType, self).exportLiteralAttributes(outfile, level, already_processed, name_)7229 def exportLiteralChildren(self, outfile, level, name_):7230 super(DCMIType, self).exportLiteralChildren(outfile, level, name_)7231 pass7232 def build(self, node):7233 self.buildAttributes(node, node.attrib, [])7234 self.valueOf_ = get_all_text_(node)7235 for child in node:7236 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7237 self.buildChildren(child, node, nodeName_)7238 def buildAttributes(self, node, attrs, already_processed):7239 value = attrs.get('lang')7240 if value is not None and 'lang' not in already_processed:7241 already_processed.append('lang')7242 self.lang = value7243 super(DCMIType, self).buildAttributes(node, attrs, already_processed)7244 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7245 super(DCMIType, self).buildChildren(child_, node, nodeName_, True)7246 pass7247# end class DCMIType7248class W3CDTF(SimpleLiteral):7249 subclass = None7250 superclass = SimpleLiteral7251 def __init__(self, lang=None, valueOf_=None):7252 super(W3CDTF, self).__init__(lang, valueOf_, )7253 self.lang = _cast(None, lang)7254 self.valueOf_ = valueOf_7255 def factory(*args_, **kwargs_):7256 if W3CDTF.subclass:7257 return W3CDTF.subclass(*args_, **kwargs_)7258 else:7259 return W3CDTF(*args_, **kwargs_)7260 factory = staticmethod(factory)7261 def get_lang(self): return self.lang7262 def set_lang(self, lang): self.lang = lang7263 def get_valueOf_(self): return self.valueOf_7264 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7265 def export(self, outfile, level, namespace_='cml:', name_='W3CDTF', namespacedef_=''):7266 showIndent(outfile, level)7267 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7268 self.exportAttributes(outfile, level, [], namespace_, name_='W3CDTF')7269 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7270 outfile.write(' xsi:type="W3CDTF"')7271 if self.hasContent_():7272 outfile.write('>')7273 outfile.write(self.valueOf_)7274 self.exportChildren(outfile, level + 1, namespace_, name_)7275 outfile.write('</%s%s>\n' % (namespace_, name_))7276 else:7277 outfile.write('/>\n')7278 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='W3CDTF'):7279 super(W3CDTF, self).exportAttributes(outfile, level, already_processed, namespace_, name_='W3CDTF')7280 if self.lang is not None and 'lang' not in already_processed:7281 already_processed.append('lang')7282 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7283 def exportChildren(self, outfile, level, namespace_='cml:', name_='W3CDTF'):7284 super(W3CDTF, self).exportChildren(outfile, level, namespace_, name_)7285 pass7286 def hasContent_(self):7287 if (7288 self.valueOf_ or7289 super(W3CDTF, self).hasContent_()7290 ):7291 return True7292 else:7293 return False7294 def exportLiteral(self, outfile, level, name_='W3CDTF'):7295 level += 17296 self.exportLiteralAttributes(outfile, level, [], name_)7297 if self.hasContent_():7298 self.exportLiteralChildren(outfile, level, name_)7299 showIndent(outfile, level)7300 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7301 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7302 if self.lang is not None and 'lang' not in already_processed:7303 already_processed.append('lang')7304 showIndent(outfile, level)7305 outfile.write('lang = "%s",\n' % (self.lang,))7306 super(W3CDTF, self).exportLiteralAttributes(outfile, level, already_processed, name_)7307 def exportLiteralChildren(self, outfile, level, name_):7308 super(W3CDTF, self).exportLiteralChildren(outfile, level, name_)7309 pass7310 def build(self, node):7311 self.buildAttributes(node, node.attrib, [])7312 self.valueOf_ = get_all_text_(node)7313 for child in node:7314 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7315 self.buildChildren(child, node, nodeName_)7316 def buildAttributes(self, node, attrs, already_processed):7317 value = attrs.get('lang')7318 if value is not None and 'lang' not in already_processed:7319 already_processed.append('lang')7320 self.lang = value7321 super(W3CDTF, self).buildAttributes(node, attrs, already_processed)7322 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7323 super(W3CDTF, self).buildChildren(child_, node, nodeName_, True)7324 pass7325# end class W3CDTF7326class Period(SimpleLiteral):7327 subclass = None7328 superclass = SimpleLiteral7329 def __init__(self, lang=None, valueOf_=None):7330 super(Period, self).__init__(lang, valueOf_, )7331 self.lang = _cast(None, lang)7332 self.valueOf_ = valueOf_7333 def factory(*args_, **kwargs_):7334 if Period.subclass:7335 return Period.subclass(*args_, **kwargs_)7336 else:7337 return Period(*args_, **kwargs_)7338 factory = staticmethod(factory)7339 def get_lang(self): return self.lang7340 def set_lang(self, lang): self.lang = lang7341 def get_valueOf_(self): return self.valueOf_7342 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7343 def export(self, outfile, level, namespace_='cml:', name_='Period', namespacedef_=''):7344 showIndent(outfile, level)7345 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7346 self.exportAttributes(outfile, level, [], namespace_, name_='Period')7347 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7348 outfile.write(' xsi:type="Period"')7349 if self.hasContent_():7350 outfile.write('>')7351 outfile.write(self.valueOf_)7352 self.exportChildren(outfile, level + 1, namespace_, name_)7353 outfile.write('</%s%s>\n' % (namespace_, name_))7354 else:7355 outfile.write('/>\n')7356 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='Period'):7357 super(Period, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Period')7358 if self.lang is not None and 'lang' not in already_processed:7359 already_processed.append('lang')7360 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7361 def exportChildren(self, outfile, level, namespace_='cml:', name_='Period'):7362 super(Period, self).exportChildren(outfile, level, namespace_, name_)7363 pass7364 def hasContent_(self):7365 if (7366 self.valueOf_ or7367 super(Period, self).hasContent_()7368 ):7369 return True7370 else:7371 return False7372 def exportLiteral(self, outfile, level, name_='Period'):7373 level += 17374 self.exportLiteralAttributes(outfile, level, [], name_)7375 if self.hasContent_():7376 self.exportLiteralChildren(outfile, level, name_)7377 showIndent(outfile, level)7378 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7379 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7380 if self.lang is not None and 'lang' not in already_processed:7381 already_processed.append('lang')7382 showIndent(outfile, level)7383 outfile.write('lang = "%s",\n' % (self.lang,))7384 super(Period, self).exportLiteralAttributes(outfile, level, already_processed, name_)7385 def exportLiteralChildren(self, outfile, level, name_):7386 super(Period, self).exportLiteralChildren(outfile, level, name_)7387 pass7388 def build(self, node):7389 self.buildAttributes(node, node.attrib, [])7390 self.valueOf_ = get_all_text_(node)7391 for child in node:7392 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7393 self.buildChildren(child, node, nodeName_)7394 def buildAttributes(self, node, attrs, already_processed):7395 value = attrs.get('lang')7396 if value is not None and 'lang' not in already_processed:7397 already_processed.append('lang')7398 self.lang = value7399 super(Period, self).buildAttributes(node, attrs, already_processed)7400 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7401 super(Period, self).buildChildren(child_, node, nodeName_, True)7402 pass7403# end class Period7404class UDC(SimpleLiteral):7405 subclass = None7406 superclass = SimpleLiteral7407 def __init__(self, lang=None, valueOf_=None):7408 super(UDC, self).__init__(lang, valueOf_, )7409 self.lang = _cast(None, lang)7410 self.valueOf_ = valueOf_7411 def factory(*args_, **kwargs_):7412 if UDC.subclass:7413 return UDC.subclass(*args_, **kwargs_)7414 else:7415 return UDC(*args_, **kwargs_)7416 factory = staticmethod(factory)7417 def get_lang(self): return self.lang7418 def set_lang(self, lang): self.lang = lang7419 def get_valueOf_(self): return self.valueOf_7420 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7421 def export(self, outfile, level, namespace_='cml:', name_='UDC', namespacedef_=''):7422 showIndent(outfile, level)7423 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7424 self.exportAttributes(outfile, level, [], namespace_, name_='UDC')7425 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7426 outfile.write(' xsi:type="UDC"')7427 if self.hasContent_():7428 outfile.write('>')7429 outfile.write(self.valueOf_)7430 self.exportChildren(outfile, level + 1, namespace_, name_)7431 outfile.write('</%s%s>\n' % (namespace_, name_))7432 else:7433 outfile.write('/>\n')7434 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='UDC'):7435 super(UDC, self).exportAttributes(outfile, level, already_processed, namespace_, name_='UDC')7436 if self.lang is not None and 'lang' not in already_processed:7437 already_processed.append('lang')7438 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7439 def exportChildren(self, outfile, level, namespace_='cml:', name_='UDC'):7440 super(UDC, self).exportChildren(outfile, level, namespace_, name_)7441 pass7442 def hasContent_(self):7443 if (7444 self.valueOf_ or7445 super(UDC, self).hasContent_()7446 ):7447 return True7448 else:7449 return False7450 def exportLiteral(self, outfile, level, name_='UDC'):7451 level += 17452 self.exportLiteralAttributes(outfile, level, [], name_)7453 if self.hasContent_():7454 self.exportLiteralChildren(outfile, level, name_)7455 showIndent(outfile, level)7456 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7457 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7458 if self.lang is not None and 'lang' not in already_processed:7459 already_processed.append('lang')7460 showIndent(outfile, level)7461 outfile.write('lang = "%s",\n' % (self.lang,))7462 super(UDC, self).exportLiteralAttributes(outfile, level, already_processed, name_)7463 def exportLiteralChildren(self, outfile, level, name_):7464 super(UDC, self).exportLiteralChildren(outfile, level, name_)7465 pass7466 def build(self, node):7467 self.buildAttributes(node, node.attrib, [])7468 self.valueOf_ = get_all_text_(node)7469 for child in node:7470 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7471 self.buildChildren(child, node, nodeName_)7472 def buildAttributes(self, node, attrs, already_processed):7473 value = attrs.get('lang')7474 if value is not None and 'lang' not in already_processed:7475 already_processed.append('lang')7476 self.lang = value7477 super(UDC, self).buildAttributes(node, attrs, already_processed)7478 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7479 super(UDC, self).buildChildren(child_, node, nodeName_, True)7480 pass7481# end class UDC7482class LCC(SimpleLiteral):7483 subclass = None7484 superclass = SimpleLiteral7485 def __init__(self, lang=None, valueOf_=None):7486 super(LCC, self).__init__(lang, valueOf_, )7487 self.lang = _cast(None, lang)7488 self.valueOf_ = valueOf_7489 def factory(*args_, **kwargs_):7490 if LCC.subclass:7491 return LCC.subclass(*args_, **kwargs_)7492 else:7493 return LCC(*args_, **kwargs_)7494 factory = staticmethod(factory)7495 def get_lang(self): return self.lang7496 def set_lang(self, lang): self.lang = lang7497 def get_valueOf_(self): return self.valueOf_7498 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7499 def export(self, outfile, level, namespace_='cml:', name_='LCC', namespacedef_=''):7500 showIndent(outfile, level)7501 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7502 self.exportAttributes(outfile, level, [], namespace_, name_='LCC')7503 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7504 outfile.write(' xsi:type="LCC"')7505 if self.hasContent_():7506 outfile.write('>')7507 outfile.write(self.valueOf_)7508 self.exportChildren(outfile, level + 1, namespace_, name_)7509 outfile.write('</%s%s>\n' % (namespace_, name_))7510 else:7511 outfile.write('/>\n')7512 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='LCC'):7513 super(LCC, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LCC')7514 if self.lang is not None and 'lang' not in already_processed:7515 already_processed.append('lang')7516 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7517 def exportChildren(self, outfile, level, namespace_='cml:', name_='LCC'):7518 super(LCC, self).exportChildren(outfile, level, namespace_, name_)7519 pass7520 def hasContent_(self):7521 if (7522 self.valueOf_ or7523 super(LCC, self).hasContent_()7524 ):7525 return True7526 else:7527 return False7528 def exportLiteral(self, outfile, level, name_='LCC'):7529 level += 17530 self.exportLiteralAttributes(outfile, level, [], name_)7531 if self.hasContent_():7532 self.exportLiteralChildren(outfile, level, name_)7533 showIndent(outfile, level)7534 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7535 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7536 if self.lang is not None and 'lang' not in already_processed:7537 already_processed.append('lang')7538 showIndent(outfile, level)7539 outfile.write('lang = "%s",\n' % (self.lang,))7540 super(LCC, self).exportLiteralAttributes(outfile, level, already_processed, name_)7541 def exportLiteralChildren(self, outfile, level, name_):7542 super(LCC, self).exportLiteralChildren(outfile, level, name_)7543 pass7544 def build(self, node):7545 self.buildAttributes(node, node.attrib, [])7546 self.valueOf_ = get_all_text_(node)7547 for child in node:7548 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7549 self.buildChildren(child, node, nodeName_)7550 def buildAttributes(self, node, attrs, already_processed):7551 value = attrs.get('lang')7552 if value is not None and 'lang' not in already_processed:7553 already_processed.append('lang')7554 self.lang = value7555 super(LCC, self).buildAttributes(node, attrs, already_processed)7556 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7557 super(LCC, self).buildChildren(child_, node, nodeName_, True)7558 pass7559# end class LCC7560class DDC(SimpleLiteral):7561 subclass = None7562 superclass = SimpleLiteral7563 def __init__(self, lang=None, valueOf_=None):7564 super(DDC, self).__init__(lang, valueOf_, )7565 self.lang = _cast(None, lang)7566 self.valueOf_ = valueOf_7567 def factory(*args_, **kwargs_):7568 if DDC.subclass:7569 return DDC.subclass(*args_, **kwargs_)7570 else:7571 return DDC(*args_, **kwargs_)7572 factory = staticmethod(factory)7573 def get_lang(self): return self.lang7574 def set_lang(self, lang): self.lang = lang7575 def get_valueOf_(self): return self.valueOf_7576 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7577 def export(self, outfile, level, namespace_='cml:', name_='DDC', namespacedef_=''):7578 showIndent(outfile, level)7579 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7580 self.exportAttributes(outfile, level, [], namespace_, name_='DDC')7581 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7582 outfile.write(' xsi:type="DDC"')7583 if self.hasContent_():7584 outfile.write('>')7585 outfile.write(self.valueOf_)7586 self.exportChildren(outfile, level + 1, namespace_, name_)7587 outfile.write('</%s%s>\n' % (namespace_, name_))7588 else:7589 outfile.write('/>\n')7590 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='DDC'):7591 super(DDC, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DDC')7592 if self.lang is not None and 'lang' not in already_processed:7593 already_processed.append('lang')7594 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7595 def exportChildren(self, outfile, level, namespace_='cml:', name_='DDC'):7596 super(DDC, self).exportChildren(outfile, level, namespace_, name_)7597 pass7598 def hasContent_(self):7599 if (7600 self.valueOf_ or7601 super(DDC, self).hasContent_()7602 ):7603 return True7604 else:7605 return False7606 def exportLiteral(self, outfile, level, name_='DDC'):7607 level += 17608 self.exportLiteralAttributes(outfile, level, [], name_)7609 if self.hasContent_():7610 self.exportLiteralChildren(outfile, level, name_)7611 showIndent(outfile, level)7612 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7613 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7614 if self.lang is not None and 'lang' not in already_processed:7615 already_processed.append('lang')7616 showIndent(outfile, level)7617 outfile.write('lang = "%s",\n' % (self.lang,))7618 super(DDC, self).exportLiteralAttributes(outfile, level, already_processed, name_)7619 def exportLiteralChildren(self, outfile, level, name_):7620 super(DDC, self).exportLiteralChildren(outfile, level, name_)7621 pass7622 def build(self, node):7623 self.buildAttributes(node, node.attrib, [])7624 self.valueOf_ = get_all_text_(node)7625 for child in node:7626 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7627 self.buildChildren(child, node, nodeName_)7628 def buildAttributes(self, node, attrs, already_processed):7629 value = attrs.get('lang')7630 if value is not None and 'lang' not in already_processed:7631 already_processed.append('lang')7632 self.lang = value7633 super(DDC, self).buildAttributes(node, attrs, already_processed)7634 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7635 super(DDC, self).buildChildren(child_, node, nodeName_, True)7636 pass7637# end class DDC7638class MESH(SimpleLiteral):7639 subclass = None7640 superclass = SimpleLiteral7641 def __init__(self, lang=None, valueOf_=None):7642 super(MESH, self).__init__(lang, valueOf_, )7643 self.lang = _cast(None, lang)7644 self.valueOf_ = valueOf_7645 def factory(*args_, **kwargs_):7646 if MESH.subclass:7647 return MESH.subclass(*args_, **kwargs_)7648 else:7649 return MESH(*args_, **kwargs_)7650 factory = staticmethod(factory)7651 def get_lang(self): return self.lang7652 def set_lang(self, lang): self.lang = lang7653 def get_valueOf_(self): return self.valueOf_7654 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7655 def export(self, outfile, level, namespace_='cml:', name_='MESH', namespacedef_=''):7656 showIndent(outfile, level)7657 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7658 self.exportAttributes(outfile, level, [], namespace_, name_='MESH')7659 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7660 outfile.write(' xsi:type="MESH"')7661 if self.hasContent_():7662 outfile.write('>')7663 outfile.write(self.valueOf_)7664 self.exportChildren(outfile, level + 1, namespace_, name_)7665 outfile.write('</%s%s>\n' % (namespace_, name_))7666 else:7667 outfile.write('/>\n')7668 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='MESH'):7669 super(MESH, self).exportAttributes(outfile, level, already_processed, namespace_, name_='MESH')7670 if self.lang is not None and 'lang' not in already_processed:7671 already_processed.append('lang')7672 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7673 def exportChildren(self, outfile, level, namespace_='cml:', name_='MESH'):7674 super(MESH, self).exportChildren(outfile, level, namespace_, name_)7675 pass7676 def hasContent_(self):7677 if (7678 self.valueOf_ or7679 super(MESH, self).hasContent_()7680 ):7681 return True7682 else:7683 return False7684 def exportLiteral(self, outfile, level, name_='MESH'):7685 level += 17686 self.exportLiteralAttributes(outfile, level, [], name_)7687 if self.hasContent_():7688 self.exportLiteralChildren(outfile, level, name_)7689 showIndent(outfile, level)7690 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7691 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7692 if self.lang is not None and 'lang' not in already_processed:7693 already_processed.append('lang')7694 showIndent(outfile, level)7695 outfile.write('lang = "%s",\n' % (self.lang,))7696 super(MESH, self).exportLiteralAttributes(outfile, level, already_processed, name_)7697 def exportLiteralChildren(self, outfile, level, name_):7698 super(MESH, self).exportLiteralChildren(outfile, level, name_)7699 pass7700 def build(self, node):7701 self.buildAttributes(node, node.attrib, [])7702 self.valueOf_ = get_all_text_(node)7703 for child in node:7704 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7705 self.buildChildren(child, node, nodeName_)7706 def buildAttributes(self, node, attrs, already_processed):7707 value = attrs.get('lang')7708 if value is not None and 'lang' not in already_processed:7709 already_processed.append('lang')7710 self.lang = value7711 super(MESH, self).buildAttributes(node, attrs, already_processed)7712 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7713 super(MESH, self).buildChildren(child_, node, nodeName_, True)7714 pass7715# end class MESH7716class LCSH(SimpleLiteral):7717 subclass = None7718 superclass = SimpleLiteral7719 def __init__(self, lang=None, valueOf_=None):7720 super(LCSH, self).__init__(lang, valueOf_, )7721 self.lang = _cast(None, lang)7722 self.valueOf_ = valueOf_7723 def factory(*args_, **kwargs_):7724 if LCSH.subclass:7725 return LCSH.subclass(*args_, **kwargs_)7726 else:7727 return LCSH(*args_, **kwargs_)7728 factory = staticmethod(factory)7729 def get_lang(self): return self.lang7730 def set_lang(self, lang): self.lang = lang7731 def get_valueOf_(self): return self.valueOf_7732 def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_7733 def export(self, outfile, level, namespace_='cml:', name_='LCSH', namespacedef_=''):7734 showIndent(outfile, level)7735 outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))7736 self.exportAttributes(outfile, level, [], namespace_, name_='LCSH')7737 outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')7738 outfile.write(' xsi:type="LCSH"')7739 if self.hasContent_():7740 outfile.write('>')7741 outfile.write(self.valueOf_)7742 self.exportChildren(outfile, level + 1, namespace_, name_)7743 outfile.write('</%s%s>\n' % (namespace_, name_))7744 else:7745 outfile.write('/>\n')7746 def exportAttributes(self, outfile, level, already_processed, namespace_='cml:', name_='LCSH'):7747 super(LCSH, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LCSH')7748 if self.lang is not None and 'lang' not in already_processed:7749 already_processed.append('lang')7750 outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))7751 def exportChildren(self, outfile, level, namespace_='cml:', name_='LCSH'):7752 super(LCSH, self).exportChildren(outfile, level, namespace_, name_)7753 pass7754 def hasContent_(self):7755 if (7756 self.valueOf_ or7757 super(LCSH, self).hasContent_()7758 ):7759 return True7760 else:7761 return False7762 def exportLiteral(self, outfile, level, name_='LCSH'):7763 level += 17764 self.exportLiteralAttributes(outfile, level, [], name_)7765 if self.hasContent_():7766 self.exportLiteralChildren(outfile, level, name_)7767 showIndent(outfile, level)7768 outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))7769 def exportLiteralAttributes(self, outfile, level, already_processed, name_):7770 if self.lang is not None and 'lang' not in already_processed:7771 already_processed.append('lang')7772 showIndent(outfile, level)7773 outfile.write('lang = "%s",\n' % (self.lang,))7774 super(LCSH, self).exportLiteralAttributes(outfile, level, already_processed, name_)7775 def exportLiteralChildren(self, outfile, level, name_):7776 super(LCSH, self).exportLiteralChildren(outfile, level, name_)7777 pass7778 def build(self, node):7779 self.buildAttributes(node, node.attrib, [])7780 self.valueOf_ = get_all_text_(node)7781 for child in node:7782 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]7783 self.buildChildren(child, node, nodeName_)7784 def buildAttributes(self, node, attrs, already_processed):7785 value = attrs.get('lang')7786 if value is not None and 'lang' not in already_processed:7787 already_processed.append('lang')7788 self.lang = value7789 super(LCSH, self).buildAttributes(node, attrs, already_processed)7790 def buildChildren(self, child_, node, nodeName_, from_subclass=False):7791 super(LCSH, self).buildChildren(child_, node, nodeName_, True)7792 pass7793# end class LCSH7794USAGE_TEXT = """...
gends_user_methods_senderinfo.py
Source:gends_user_methods_senderinfo.py
...93 source='''\94 def build(self, node):95 already_processed = set()96 self.buildAttributes(node, node.attrib, already_processed)97 self.valueOf_ = get_all_text_(node)98 self.validate_valueOf_(self.valueOf_)99 for child in node:100 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]101 self.buildChildren(child, node, nodeName_)102 return self103''',104 class_names=r'^SellerAccountIDType|SellerAccountIDType2$',105 )106method30 = MethodSpec(name='validate_IdentificationSchemeName',107 source='''\108 def validate_IdentificationSchemeName(self, value):109 if ( value == "IBAN" ):110 pass111 else:112 raise_value_error( value, 'Expected "IBAN"' )113 return value114''',115 class_names=r'^SellerAccountIDType|SellerAccountIDType2$',116 )117method40 = MethodSpec(name='buildAttributes',118 source='''\119 def buildAttributes(self, node, attrs, already_processed):120 value = find_attr_value_('IdentificationSchemeName', node)121 if value is not None and 'IdentificationSchemeName' not in already_processed:122 already_processed.add('IdentificationSchemeName')123 self.IdentificationSchemeName = value124 self.validate_IdentificationSchemeName(self.IdentificationSchemeName)125 value = find_attr_value_('xsi:type', node)126 if value is not None and 'xsi:type' not in already_processed:127 already_processed.add('xsi:type')128 self.extensiontype_ = value129''',130 class_names=r'^SellerAccountIDType|SellerAccountIDType2$',131 )132method50 = MethodSpec(name='validate_valueOf_',133 source='''\134 def validate_valueOf_(self, value):135 if ( isinstance( value, basestring ) and 8 <= value.__len__() <= 11 ):136 pass137 else:138 raise_value_error( value, 'Expected value between 8..11 characters' )139 return value140''',141 class_names=r'^SellerBicType|SellerBicType2$',142 )143method60 = MethodSpec(name='build',144 source='''\145 def build(self, node):146 already_processed = set()147 self.buildAttributes(node, node.attrib, already_processed)148 self.valueOf_ = get_all_text_(node)149 self.validate_valueOf_(self.valueOf_)150 for child in node:151 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]152 self.buildChildren(child, node, nodeName_)153 return self154''',155 class_names=r'^SellerBicType|SellerBicType2$',156 )157method70 = MethodSpec(name='validate_IdentificationSchemeName',158 source='''\159 def validate_IdentificationSchemeName(self, value):160 if ( value == "BIC" ):161 pass162 else:163 raise_value_error( value, 'Expected "BIC"' )164 return value165''',166 class_names=r'^SellerBicType|SellerBicType2$',167 )168method80 = MethodSpec(name='buildAttributes',169 source='''\170 def buildAttributes(self, node, attrs, already_processed):171 value = find_attr_value_('IdentificationSchemeName', node)172 if value is not None and 'IdentificationSchemeName' not in already_processed:173 already_processed.add('IdentificationSchemeName')174 self.IdentificationSchemeName = value175 self.validate_IdentificationSchemeName(self.IdentificationSchemeName)176 value = find_attr_value_('xsi:type', node)177 if value is not None and 'xsi:type' not in already_processed:178 already_processed.add('xsi:type')179 self.extensiontype_ = value180''',181 class_names=r'^SellerBicType|SellerBicType2$',182 )183method90 = MethodSpec(name='validate_SellerInstructionFreeTextType',184 source='''\185 def validate_SellerInstructionFreeTextType(self, value):186 if ( value.__len__() <= 3 ):187 pass188 else:189 raise_value_error( value.__len__(), 'Expected maximum of 3 elements' )190 return value191''',192 class_names=r'^SellerInvoiceDetailsType$',193 )194method91 = MethodSpec(name='validate_SellerInvoiceTypeDetailsType',195 source='''\196 def validate_SellerInvoiceTypeDetailsType(self, value):197 if ( value.__len__() <= 3 ):198 pass199 else:200 raise_value_error( value.__len__(), 'Expected maximum of 3 elements' )201 return value202''',203 class_names=r'^SellerInvoiceDetailsType$',204 )205method100 = MethodSpec(name='buildChildren',206 source='''\207 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):208 if nodeName_ == 'SellerDirectDebitIdentifier':209 SellerDirectDebitIdentifier_ = child_.text210 SellerDirectDebitIdentifier_ = self.gds_validate_string(SellerDirectDebitIdentifier_, node, 'SellerDirectDebitIdentifier')211 self.SellerDirectDebitIdentifier = SellerDirectDebitIdentifier_212 self.validate_genericStringType0_35(self.SellerDirectDebitIdentifier) # validate type genericStringType0_35213 elif nodeName_ == 'PaymentInstructionIdentifier':214 PaymentInstructionIdentifier_ = child_.text215 PaymentInstructionIdentifier_ = self.gds_validate_string(PaymentInstructionIdentifier_, node, 'PaymentInstructionIdentifier')216 self.PaymentInstructionIdentifier = PaymentInstructionIdentifier_217 self.validate_genericStringType1_35(self.PaymentInstructionIdentifier) # validate type genericStringType1_35218 elif nodeName_ == 'SellerInstructionFreeText':219 obj_ = SellerInstructionFreeTextType.factory()220 obj_.build(child_)221 self.SellerInstructionFreeText.append(obj_)222 self.validate_SellerInstructionFreeTextType(self.SellerInstructionFreeText)223 obj_.original_tagname_ = 'SellerInstructionFreeText'224 elif nodeName_ == 'SellerInvoiceTypeDetails':225 obj_ = SellerInvoiceTypeDetailsType.factory()226 obj_.build(child_)227 self.SellerInvoiceTypeDetails.append(obj_)228 self.validate_SellerInvoiceTypeDetailsType(self.SellerInvoiceTypeDetails)229 obj_.original_tagname_ = 'SellerInvoiceTypeDetails'230 elif nodeName_ == 'SellerServiceCode':231 SellerServiceCode_ = child_.text232 SellerServiceCode_ = self.gds_validate_string(SellerServiceCode_, node, 'SellerServiceCode')233 self.SellerServiceCode = SellerServiceCode_234 self.validate_SellerServiceCodeType(self.SellerServiceCode) # validate type SellerServiceCodeType235''',236 class_names=r'^SellerInvoiceDetailsType$',237 )238method110 = MethodSpec(name='validate_valueOf_',239 source='''\240 def validate_valueOf_(self, value):241 if ( isinstance( value, basestring ) and 1 <= value.__len__() <= 420 ):242 pass243 else:244 raise_value_error( value, 'Expected value between 1..420 characters' )245 return value246''',247 class_names=r'^SellerInstructionFreeTextType$',248 )249method120 = MethodSpec(name='build',250 source='''\251 def build(self, node):252 already_processed = set()253 self.buildAttributes(node, node.attrib, already_processed)254 self.valueOf_ = get_all_text_(node)255 self.validate_valueOf_(self.valueOf_)256 for child in node:257 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]258 self.buildChildren(child, node, nodeName_)259 return self260''',261 class_names=r'^SellerInstructionFreeTextType$',262 )263method130 = MethodSpec(name='validate_valueOf_',264 source='''\265 def validate_valueOf_(self, value):266 if ( isinstance( value, basestring ) and value.__len__() <= 35 ):267 pass268 else:269 raise_value_error( value, 'Expected value less than 35 characters' )270 return value271''',272 class_names=r'^SellerInvoiceTypeTextType$',273 )274method140 = MethodSpec(name='build',275 source='''\276 def build(self, node):277 already_processed = set()278 self.buildAttributes(node, node.attrib, already_processed)279 self.valueOf_ = get_all_text_(node)280 self.validate_valueOf_(self.valueOf_)281 for child in node:282 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]283 self.buildChildren(child, node, nodeName_)284 return self285''',286 class_names=r'^SellerInvoiceTypeTextType$',287 )288method150 = MethodSpec(name='validate_valueOf_',289 source='''\290 def validate_valueOf_(self, value):291 if ( isinstance( value, basestring ) and 4 <= value.__len__() <= 70 ):292 pass293 else:294 raise_value_error( value, 'Expected value between 4..70 characters' )295 return value296''',297 class_names=r'^SellerInvoiceIdentifierTextType3$',298 )299method160 = MethodSpec(name='build',300 source='''\301 def build(self, node):302 already_processed = set()303 self.buildAttributes(node, node.attrib, already_processed)304 self.valueOf_ = get_all_text_(node)305 self.validate_valueOf_(self.valueOf_)306 for child in node:307 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]308 self.buildChildren(child, node, nodeName_)309 return self310''',311 class_names=r'^SellerInvoiceIdentifierTextType3$',312 )313method170 = MethodSpec(name='validate_valueOf_',314 source='''\315 def validate_SellerInvoiceIdentifierTextType3(self, value):316 if ( value.__len__() <= 2 ):317 pass318 else:319 raise_value_error( value, 'Expected maximum of 2 elements' )320 return value321''',322 class_names=r'^SellerInvoiceTypeDetailsType$',323 )324method180 = MethodSpec(name='buildChildren',325 source='''\326 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):327 if nodeName_ == 'SellerInvoiceTypeText':328 obj_ = SellerInvoiceTypeTextType.factory()329 obj_.build(child_)330 self.SellerInvoiceTypeText = obj_331 obj_.original_tagname_ = 'SellerInvoiceTypeText'332 elif nodeName_ == 'SellerInvoiceIdentifierText':333 obj_ = SellerInvoiceIdentifierTextType3.factory()334 obj_.build(child_)335 self.SellerInvoiceIdentifierText.append(obj_)336 self.validate_SellerInvoiceIdentifierTextType3(self.SellerInvoiceIdentifierText);337 obj_.original_tagname_ = 'SellerInvoiceIdentifierText'338''',339 class_names=r'^SellerInvoiceTypeDetailsType$',340 )341method190 = MethodSpec(name='validate_valueOf_',342 source='''\343 def validate_valueOf_(self, value):344 import datetime345 if ( datetime.datetime.strptime( value, '%%Y%%m%%d\' ).strftime( '%%Y%%m%%d\' ) == value ):346 pass347 else:348 raise_value_error( value, 'Time format does not match' )349 return value350''',351 class_names=r'^date$',352 )353method200 = MethodSpec(name='build',354 source='''\355 def build(self, node):356 already_processed = set()357 self.buildAttributes(node, node.attrib, already_processed)358 self.valueOf_ = get_all_text_(node)359 self.validate_valueOf_(self.valueOf_)360 for child in node:361 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]362 self.buildChildren(child, node, nodeName_)363 return self364''',365 class_names=r'^date$',366 )367method210 = MethodSpec(name='validate_Format',368 source='''\369 def validate_Format(self, value):370 if ( value == "CCYYMMDD" ):371 pass372 else:...
gends_user_methods_finvoice.py
Source:gends_user_methods_finvoice.py
...93 source='''\94 def build(self, node):95 already_processed = set()96 self.buildAttributes(node, node.attrib, already_processed)97 self.valueOf_ = get_all_text_(node)98 self.validate_valueOf_(self.valueOf_)99 for child in node:100 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]101 self.buildChildren(child, node, nodeName_)102 return self103''',104 class_names=r'^SellerAccountIDType|SellerAccountIDType2$',105 )106method30 = MethodSpec(name='validate_IdentificationSchemeName',107 source='''\108 def validate_IdentificationSchemeName(self, value):109 if ( value == "IBAN" ):110 pass111 else:112 raise_value_error( value, 'Expected "IBAN"' )113 return value114''',115 class_names=r'^SellerAccountIDType|SellerAccountIDType2$',116 )117method40 = MethodSpec(name='buildAttributes',118 source='''\119 def buildAttributes(self, node, attrs, already_processed):120 value = find_attr_value_('IdentificationSchemeName', node)121 if value is not None and 'IdentificationSchemeName' not in already_processed:122 already_processed.add('IdentificationSchemeName')123 self.IdentificationSchemeName = value124 self.validate_IdentificationSchemeName(self.IdentificationSchemeName)125 value = find_attr_value_('xsi:type', node)126 if value is not None and 'xsi:type' not in already_processed:127 already_processed.add('xsi:type')128 self.extensiontype_ = value129''',130 class_names=r'^SellerAccountIDType|SellerAccountIDType2$',131 )132method50 = MethodSpec(name='validate_valueOf_',133 source='''\134 def validate_valueOf_(self, value):135 if ( isinstance( value, basestring ) and 8 <= value.__len__() <= 11 ):136 pass137 else:138 raise_value_error( value, 'Expected value between 8..11 characters' )139 return value140''',141 class_names=r'^SellerBicType|SellerBicType2$',142 )143method60 = MethodSpec(name='build',144 source='''\145 def build(self, node):146 already_processed = set()147 self.buildAttributes(node, node.attrib, already_processed)148 self.valueOf_ = get_all_text_(node)149 self.validate_valueOf_(self.valueOf_)150 for child in node:151 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]152 self.buildChildren(child, node, nodeName_)153 return self154''',155 class_names=r'^SellerBicType|SellerBicType2$',156 )157method70 = MethodSpec(name='validate_IdentificationSchemeName',158 source='''\159 def validate_IdentificationSchemeName(self, value):160 if ( value == "BIC" ):161 pass162 else:163 raise_value_error( value, 'Expected "BIC"' )164 return value165''',166 class_names=r'^SellerBicType|SellerBicType2$',167 )168method80 = MethodSpec(name='buildAttributes',169 source='''\170 def buildAttributes(self, node, attrs, already_processed):171 value = find_attr_value_('IdentificationSchemeName', node)172 if value is not None and 'IdentificationSchemeName' not in already_processed:173 already_processed.add('IdentificationSchemeName')174 self.IdentificationSchemeName = value175 self.validate_IdentificationSchemeName(self.IdentificationSchemeName)176 value = find_attr_value_('xsi:type', node)177 if value is not None and 'xsi:type' not in already_processed:178 already_processed.add('xsi:type')179 self.extensiontype_ = value180''',181 class_names=r'^SellerBicType|SellerBicType2$',182 )183method90 = MethodSpec(name='validate_SellerInstructionFreeTextType',184 source='''\185 def validate_SellerInstructionFreeTextType(self, value):186 if ( value.__len__() <= 3 ):187 pass188 else:189 raise_value_error( value.__len__(), 'Expected maximum of 3 elements' )190 return value191''',192 class_names=r'^SellerInvoiceDetailsType$',193 )194method91 = MethodSpec(name='validate_SellerInvoiceTypeDetailsType',195 source='''\196 def validate_SellerInvoiceTypeDetailsType(self, value):197 if ( value.__len__() <= 3 ):198 pass199 else:200 raise_value_error( value.__len__(), 'Expected maximum of 3 elements' )201 return value202''',203 class_names=r'^SellerInvoiceDetailsType$',204 )205method100 = MethodSpec(name='buildChildren',206 source='''\207 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):208 if nodeName_ == 'SellerDirectDebitIdentifier':209 SellerDirectDebitIdentifier_ = child_.text210 SellerDirectDebitIdentifier_ = self.gds_validate_string(SellerDirectDebitIdentifier_, node, 'SellerDirectDebitIdentifier')211 self.SellerDirectDebitIdentifier = SellerDirectDebitIdentifier_212 self.validate_genericStringType0_35(self.SellerDirectDebitIdentifier) # validate type genericStringType0_35213 elif nodeName_ == 'PaymentInstructionIdentifier':214 PaymentInstructionIdentifier_ = child_.text215 PaymentInstructionIdentifier_ = self.gds_validate_string(PaymentInstructionIdentifier_, node, 'PaymentInstructionIdentifier')216 self.PaymentInstructionIdentifier = PaymentInstructionIdentifier_217 self.validate_genericStringType1_35(self.PaymentInstructionIdentifier) # validate type genericStringType1_35218 elif nodeName_ == 'SellerInstructionFreeText':219 obj_ = SellerInstructionFreeTextType.factory()220 obj_.build(child_)221 self.SellerInstructionFreeText.append(obj_)222 self.validate_SellerInstructionFreeTextType(self.SellerInstructionFreeText)223 obj_.original_tagname_ = 'SellerInstructionFreeText'224 elif nodeName_ == 'SellerInvoiceTypeDetails':225 obj_ = SellerInvoiceTypeDetailsType.factory()226 obj_.build(child_)227 self.SellerInvoiceTypeDetails.append(obj_)228 self.validate_SellerInvoiceTypeDetailsType(self.SellerInvoiceTypeDetails)229 obj_.original_tagname_ = 'SellerInvoiceTypeDetails'230 elif nodeName_ == 'SellerServiceCode':231 SellerServiceCode_ = child_.text232 SellerServiceCode_ = self.gds_validate_string(SellerServiceCode_, node, 'SellerServiceCode')233 self.SellerServiceCode = SellerServiceCode_234 self.validate_SellerServiceCodeType(self.SellerServiceCode) # validate type SellerServiceCodeType235''',236 class_names=r'^SellerInvoiceDetailsType$',237 )238method110 = MethodSpec(name='validate_valueOf_',239 source='''\240 def validate_valueOf_(self, value):241 if ( isinstance( value, basestring ) and 1 <= value.__len__() <= 420 ):242 pass243 else:244 raise_value_error( value, 'Expected value between 1..420 characters' )245 return value246''',247 class_names=r'^SellerInstructionFreeTextType$',248 )249method120 = MethodSpec(name='build',250 source='''\251 def build(self, node):252 already_processed = set()253 self.buildAttributes(node, node.attrib, already_processed)254 self.valueOf_ = get_all_text_(node)255 self.validate_valueOf_(self.valueOf_)256 for child in node:257 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]258 self.buildChildren(child, node, nodeName_)259 return self260''',261 class_names=r'^SellerInstructionFreeTextType$',262 )263method130 = MethodSpec(name='validate_valueOf_',264 source='''\265 def validate_valueOf_(self, value):266 if ( isinstance( value, basestring ) and value.__len__() <= 35 ):267 pass268 else:269 raise_value_error( value, 'Expected value less than 35 characters' )270 return value271''',272 class_names=r'^SellerInvoiceTypeTextType$',273 )274method140 = MethodSpec(name='build',275 source='''\276 def build(self, node):277 already_processed = set()278 self.buildAttributes(node, node.attrib, already_processed)279 self.valueOf_ = get_all_text_(node)280 self.validate_valueOf_(self.valueOf_)281 for child in node:282 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]283 self.buildChildren(child, node, nodeName_)284 return self285''',286 class_names=r'^SellerInvoiceTypeTextType$',287 )288method150 = MethodSpec(name='validate_valueOf_',289 source='''\290 def validate_valueOf_(self, value):291 if ( isinstance( value, basestring ) and 4 <= value.__len__() <= 70 ):292 pass293 else:294 raise_value_error( value, 'Expected value between 4..70 characters' )295 return value296''',297 class_names=r'^SellerInvoiceIdentifierTextType3$',298 )299method160 = MethodSpec(name='build',300 source='''\301 def build(self, node):302 already_processed = set()303 self.buildAttributes(node, node.attrib, already_processed)304 self.valueOf_ = get_all_text_(node)305 self.validate_valueOf_(self.valueOf_)306 for child in node:307 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]308 self.buildChildren(child, node, nodeName_)309 return self310''',311 class_names=r'^SellerInvoiceIdentifierTextType3$',312 )313method170 = MethodSpec(name='validate_valueOf_',314 source='''\315 def validate_SellerInvoiceIdentifierTextType3(self, value):316 if ( value.__len__() <= 2 ):317 pass318 else:319 raise_value_error( value, 'Expected maximum of 2 elements' )320 return value321''',322 class_names=r'^SellerInvoiceTypeDetailsType$',323 )324method180 = MethodSpec(name='buildChildren',325 source='''\326 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):327 if nodeName_ == 'SellerInvoiceTypeText':328 obj_ = SellerInvoiceTypeTextType.factory()329 obj_.build(child_)330 self.SellerInvoiceTypeText = obj_331 obj_.original_tagname_ = 'SellerInvoiceTypeText'332 elif nodeName_ == 'SellerInvoiceIdentifierText':333 obj_ = SellerInvoiceIdentifierTextType3.factory()334 obj_.build(child_)335 self.SellerInvoiceIdentifierText.append(obj_)336 self.validate_SellerInvoiceIdentifierTextType3(self.SellerInvoiceIdentifierText);337 obj_.original_tagname_ = 'SellerInvoiceIdentifierText'338''',339 class_names=r'^SellerInvoiceTypeDetailsType$',340 )341method190 = MethodSpec(name='validate_valueOf_',342 source='''\343 def validate_valueOf_(self, value):344 import datetime345 if ( datetime.datetime.strptime( value, '%%Y%%m%%d\' ).strftime( '%%Y%%m%%d\' ) == value ):346 pass347 else:348 raise_value_error( value, 'Time format does not match' )349 return value350''',351 class_names=r'^date$',352 )353method200 = MethodSpec(name='build',354 source='''\355 def build(self, node):356 already_processed = set()357 self.buildAttributes(node, node.attrib, already_processed)358 self.valueOf_ = get_all_text_(node)359 self.validate_valueOf_(self.valueOf_)360 for child in node:361 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]362 self.buildChildren(child, node, nodeName_)363 return self364''',365 class_names=r'^date$',366 )367method210 = MethodSpec(name='validate_Format',368 source='''\369 def validate_Format(self, value):370 if ( value == "CCYYMMDD" ):371 pass372 else:...
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!!