How to use buildAttributes method in autotest

Best Python code snippet using autotest_python

cff.py

Source:cff.py Github

copy

Full Screen

...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 = """7795Usage: python <Parser>.py [ -s ] <in_xml_file>7796"""7797def usage():7798 print USAGE_TEXT7799 sys.exit(1)7800def get_root_tag(node):7801 tag = Tag_pattern_.match(node.tag).groups()[-1]7802 rootClass = globals().get(tag)7803 return tag, rootClass...

Full Screen

Full Screen

compoundsuper.py

Source:compoundsuper.py Github

copy

Full Screen

...150 else:151 return False152 def build(self, node_):153 attrs = node_.attributes154 self.buildAttributes(attrs)155 for child_ in node_.childNodes:156 nodeName_ = child_.nodeName.split(':')[-1]157 self.buildChildren(child_, nodeName_)158 def buildAttributes(self, attrs):159 if attrs.get('version'):160 self.version = attrs.get('version').value161 def buildChildren(self, child_, nodeName_):162 if child_.nodeType == Node.ELEMENT_NODE and \163 nodeName_ == 'compounddef':164 obj_ = compounddefType.factory()165 obj_.build(child_)166 self.set_compounddef(obj_)167# end class DoxygenType168class compounddefType(GeneratedsSuper):169 subclass = None170 superclass = None171 def __init__(self, kind=None, prot=None, id=None, compoundname=None, title=None, basecompoundref=None, derivedcompoundref=None, includes=None, includedby=None, incdepgraph=None, invincdepgraph=None, innerdir=None, innerfile=None, innerclass=None, innernamespace=None, innerpage=None, innergroup=None, templateparamlist=None, sectiondef=None, briefdescription=None, detaileddescription=None, inheritancegraph=None, collaborationgraph=None, programlisting=None, location=None, listofallmembers=None):172 self.kind = kind173 self.prot = prot174 self.id = id175 self.compoundname = compoundname176 self.title = title177 if basecompoundref is None:178 self.basecompoundref = []179 else:180 self.basecompoundref = basecompoundref181 if derivedcompoundref is None:182 self.derivedcompoundref = []183 else:184 self.derivedcompoundref = derivedcompoundref185 if includes is None:186 self.includes = []187 else:188 self.includes = includes189 if includedby is None:190 self.includedby = []191 else:192 self.includedby = includedby193 self.incdepgraph = incdepgraph194 self.invincdepgraph = invincdepgraph195 if innerdir is None:196 self.innerdir = []197 else:198 self.innerdir = innerdir199 if innerfile is None:200 self.innerfile = []201 else:202 self.innerfile = innerfile203 if innerclass is None:204 self.innerclass = []205 else:206 self.innerclass = innerclass207 if innernamespace is None:208 self.innernamespace = []209 else:210 self.innernamespace = innernamespace211 if innerpage is None:212 self.innerpage = []213 else:214 self.innerpage = innerpage215 if innergroup is None:216 self.innergroup = []217 else:218 self.innergroup = innergroup219 self.templateparamlist = templateparamlist220 if sectiondef is None:221 self.sectiondef = []222 else:223 self.sectiondef = sectiondef224 self.briefdescription = briefdescription225 self.detaileddescription = detaileddescription226 self.inheritancegraph = inheritancegraph227 self.collaborationgraph = collaborationgraph228 self.programlisting = programlisting229 self.location = location230 self.listofallmembers = listofallmembers231 self.namespaces = []232 def factory(*args_, **kwargs_):233 if compounddefType.subclass:234 return compounddefType.subclass(*args_, **kwargs_)235 else:236 return compounddefType(*args_, **kwargs_)237 factory = staticmethod(factory)238 def get_compoundname(self): return self.compoundname239 def set_compoundname(self, compoundname): self.compoundname = compoundname240 def get_title(self): return self.title241 def set_title(self, title): self.title = title242 def get_basecompoundref(self): return self.basecompoundref243 def set_basecompoundref(self, basecompoundref): self.basecompoundref = basecompoundref244 def add_basecompoundref(self, value): self.basecompoundref.append(value)245 def insert_basecompoundref(self, index, value): self.basecompoundref[index] = value246 def get_derivedcompoundref(self): return self.derivedcompoundref247 def set_derivedcompoundref(self, derivedcompoundref): self.derivedcompoundref = derivedcompoundref248 def add_derivedcompoundref(self, value): self.derivedcompoundref.append(value)249 def insert_derivedcompoundref(self, index, value): self.derivedcompoundref[index] = value250 def get_includes(self): return self.includes251 def set_includes(self, includes): self.includes = includes252 def add_includes(self, value): self.includes.append(value)253 def insert_includes(self, index, value): self.includes[index] = value254 def get_includedby(self): return self.includedby255 def set_includedby(self, includedby): self.includedby = includedby256 def add_includedby(self, value): self.includedby.append(value)257 def insert_includedby(self, index, value): self.includedby[index] = value258 def get_incdepgraph(self): return self.incdepgraph259 def set_incdepgraph(self, incdepgraph): self.incdepgraph = incdepgraph260 def get_invincdepgraph(self): return self.invincdepgraph261 def set_invincdepgraph(self, invincdepgraph): self.invincdepgraph = invincdepgraph262 def get_innerdir(self): return self.innerdir263 def set_innerdir(self, innerdir): self.innerdir = innerdir264 def add_innerdir(self, value): self.innerdir.append(value)265 def insert_innerdir(self, index, value): self.innerdir[index] = value266 def get_innerfile(self): return self.innerfile267 def set_innerfile(self, innerfile): self.innerfile = innerfile268 def add_innerfile(self, value): self.innerfile.append(value)269 def insert_innerfile(self, index, value): self.innerfile[index] = value270 def get_innerclass(self): return self.innerclass271 def set_innerclass(self, innerclass): self.innerclass = innerclass272 def add_innerclass(self, value): self.innerclass.append(value)273 def insert_innerclass(self, index, value): self.innerclass[index] = value274 def get_innernamespace(self): return self.innernamespace275 def set_innernamespace(self, innernamespace): self.innernamespace = innernamespace276 def add_innernamespace(self, value): self.innernamespace.append(value)277 def insert_innernamespace(self, index, value): self.innernamespace[index] = value278 def get_innerpage(self): return self.innerpage279 def set_innerpage(self, innerpage): self.innerpage = innerpage280 def add_innerpage(self, value): self.innerpage.append(value)281 def insert_innerpage(self, index, value): self.innerpage[index] = value282 def get_innergroup(self): return self.innergroup283 def set_innergroup(self, innergroup): self.innergroup = innergroup284 def add_innergroup(self, value): self.innergroup.append(value)285 def insert_innergroup(self, index, value): self.innergroup[index] = value286 def get_templateparamlist(self): return self.templateparamlist287 def set_templateparamlist(self, templateparamlist): self.templateparamlist = templateparamlist288 def get_sectiondef(self): return self.sectiondef289 def set_sectiondef(self, sectiondef): self.sectiondef = sectiondef290 def add_sectiondef(self, value): self.sectiondef.append(value)291 def insert_sectiondef(self, index, value): self.sectiondef[index] = value292 def get_briefdescription(self): return self.briefdescription293 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription294 def get_detaileddescription(self): return self.detaileddescription295 def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription296 def get_inheritancegraph(self): return self.inheritancegraph297 def set_inheritancegraph(self, inheritancegraph): self.inheritancegraph = inheritancegraph298 def get_collaborationgraph(self): return self.collaborationgraph299 def set_collaborationgraph(self, collaborationgraph): self.collaborationgraph = collaborationgraph300 def get_programlisting(self): return self.programlisting301 def set_programlisting(self, programlisting): self.programlisting = programlisting302 def get_location(self): return self.location303 def set_location(self, location): self.location = location304 def get_listofallmembers(self): return self.listofallmembers305 def set_listofallmembers(self, listofallmembers): self.listofallmembers = listofallmembers306 def get_kind(self): return self.kind307 def set_kind(self, kind): self.kind = kind308 def get_prot(self): return self.prot309 def set_prot(self, prot): self.prot = prot310 def get_id(self): return self.id311 def set_id(self, id): self.id = id312 def hasContent_(self):313 if (314 self.compoundname is not None or315 self.title is not None or316 self.basecompoundref is not None or317 self.derivedcompoundref is not None or318 self.includes is not None or319 self.includedby is not None or320 self.incdepgraph is not None or321 self.invincdepgraph is not None or322 self.innerdir is not None or323 self.innerfile is not None or324 self.innerclass is not None or325 self.innernamespace is not None or326 self.innerpage is not None or327 self.innergroup is not None or328 self.templateparamlist is not None or329 self.sectiondef is not None or330 self.briefdescription is not None or331 self.detaileddescription is not None or332 self.inheritancegraph is not None or333 self.collaborationgraph is not None or334 self.programlisting is not None or335 self.location is not None or336 self.listofallmembers is not None337 ):338 return True339 else:340 return False341 def build(self, node_):342 attrs = node_.attributes343 self.buildAttributes(attrs)344 for child_ in node_.childNodes:345 nodeName_ = child_.nodeName.split(':')[-1]346 self.buildChildren(child_, nodeName_)347 def buildAttributes(self, attrs):348 if attrs.get('kind'):349 self.kind = attrs.get('kind').value350 if attrs.get('prot'):351 self.prot = attrs.get('prot').value352 if attrs.get('id'):353 self.id = attrs.get('id').value354 def buildChildren(self, child_, nodeName_):355 if child_.nodeType == Node.ELEMENT_NODE and \356 nodeName_ == 'compoundname':357 compoundname_ = ''358 for text__content_ in child_.childNodes:359 compoundname_ += text__content_.nodeValue360 self.compoundname = compoundname_361 elif child_.nodeType == Node.ELEMENT_NODE and \362 nodeName_ == 'title':363 obj_ = docTitleType.factory()364 obj_.build(child_)365 self.set_title(obj_)366 elif child_.nodeType == Node.ELEMENT_NODE and \367 nodeName_ == 'basecompoundref':368 obj_ = compoundRefType.factory()369 obj_.build(child_)370 self.basecompoundref.append(obj_)371 elif child_.nodeType == Node.ELEMENT_NODE and \372 nodeName_ == 'derivedcompoundref':373 obj_ = compoundRefType.factory()374 obj_.build(child_)375 self.derivedcompoundref.append(obj_)376 elif child_.nodeType == Node.ELEMENT_NODE and \377 nodeName_ == 'includes':378 obj_ = incType.factory()379 obj_.build(child_)380 self.includes.append(obj_)381 elif child_.nodeType == Node.ELEMENT_NODE and \382 nodeName_ == 'includedby':383 obj_ = incType.factory()384 obj_.build(child_)385 self.includedby.append(obj_)386 elif child_.nodeType == Node.ELEMENT_NODE and \387 nodeName_ == 'incdepgraph':388 obj_ = graphType.factory()389 obj_.build(child_)390 self.set_incdepgraph(obj_)391 elif child_.nodeType == Node.ELEMENT_NODE and \392 nodeName_ == 'invincdepgraph':393 obj_ = graphType.factory()394 obj_.build(child_)395 self.set_invincdepgraph(obj_)396 elif child_.nodeType == Node.ELEMENT_NODE and \397 nodeName_ == 'innerdir':398 obj_ = refType.factory(nodeName_)399 obj_.build(child_)400 self.innerdir.append(obj_)401 elif child_.nodeType == Node.ELEMENT_NODE and \402 nodeName_ == 'innerfile':403 obj_ = refType.factory(nodeName_)404 obj_.build(child_)405 self.innerfile.append(obj_)406 elif child_.nodeType == Node.ELEMENT_NODE and \407 nodeName_ == 'innerclass':408 obj_ = refType.factory(nodeName_)409 obj_.build(child_)410 self.innerclass.append(obj_)411 self.namespaces.append(obj_.content_[0].getValue())412 elif child_.nodeType == Node.ELEMENT_NODE and \413 nodeName_ == 'innernamespace':414 obj_ = refType.factory(nodeName_)415 obj_.build(child_)416 self.innernamespace.append(obj_)417 self.namespaces.append(obj_.content_[0].getValue())418 elif child_.nodeType == Node.ELEMENT_NODE and \419 nodeName_ == 'innerpage':420 obj_ = refType.factory(nodeName_)421 obj_.build(child_)422 self.innerpage.append(obj_)423 elif child_.nodeType == Node.ELEMENT_NODE and \424 nodeName_ == 'innergroup':425 obj_ = refType.factory(nodeName_)426 obj_.build(child_)427 self.innergroup.append(obj_)428 elif child_.nodeType == Node.ELEMENT_NODE and \429 nodeName_ == 'templateparamlist':430 obj_ = templateparamlistType.factory()431 obj_.build(child_)432 self.set_templateparamlist(obj_)433 elif child_.nodeType == Node.ELEMENT_NODE and \434 nodeName_ == 'sectiondef':435 obj_ = sectiondefType.factory()436 obj_.build(child_)437 self.sectiondef.append(obj_)438 elif child_.nodeType == Node.ELEMENT_NODE and \439 nodeName_ == 'briefdescription':440 obj_ = descriptionType.factory()441 obj_.build(child_)442 self.set_briefdescription(obj_)443 elif child_.nodeType == Node.ELEMENT_NODE and \444 nodeName_ == 'detaileddescription':445 obj_ = descriptionType.factory()446 obj_.build(child_)447 self.set_detaileddescription(obj_)448 elif child_.nodeType == Node.ELEMENT_NODE and \449 nodeName_ == 'inheritancegraph':450 obj_ = graphType.factory()451 obj_.build(child_)452 self.set_inheritancegraph(obj_)453 elif child_.nodeType == Node.ELEMENT_NODE and \454 nodeName_ == 'collaborationgraph':455 obj_ = graphType.factory()456 obj_.build(child_)457 self.set_collaborationgraph(obj_)458 elif child_.nodeType == Node.ELEMENT_NODE and \459 nodeName_ == 'programlisting':460 obj_ = listingType.factory()461 obj_.build(child_)462 self.set_programlisting(obj_)463 elif child_.nodeType == Node.ELEMENT_NODE and \464 nodeName_ == 'location':465 obj_ = locationType.factory()466 obj_.build(child_)467 self.set_location(obj_)468 elif child_.nodeType == Node.ELEMENT_NODE and \469 nodeName_ == 'listofallmembers':470 obj_ = listofallmembersType.factory()471 obj_.build(child_)472 self.set_listofallmembers(obj_)473# end class compounddefType474class listofallmembersType(GeneratedsSuper):475 subclass = None476 superclass = None477 def __init__(self, member=None):478 if member is None:479 self.member = []480 else:481 self.member = member482 def factory(*args_, **kwargs_):483 if listofallmembersType.subclass:484 return listofallmembersType.subclass(*args_, **kwargs_)485 else:486 return listofallmembersType(*args_, **kwargs_)487 factory = staticmethod(factory)488 def get_member(self): return self.member489 def set_member(self, member): self.member = member490 def add_member(self, value): self.member.append(value)491 def insert_member(self, index, value): self.member[index] = value492 def hasContent_(self):493 if (494 self.member is not None495 ):496 return True497 else:498 return False499 def build(self, node_):500 attrs = node_.attributes501 self.buildAttributes(attrs)502 for child_ in node_.childNodes:503 nodeName_ = child_.nodeName.split(':')[-1]504 self.buildChildren(child_, nodeName_)505 def buildAttributes(self, attrs):506 pass507 def buildChildren(self, child_, nodeName_):508 if child_.nodeType == Node.ELEMENT_NODE and \509 nodeName_ == 'member':510 obj_ = memberRefType.factory()511 obj_.build(child_)512 self.member.append(obj_)513# end class listofallmembersType514class memberRefType(GeneratedsSuper):515 subclass = None516 superclass = None517 def __init__(self, virt=None, prot=None, refid=None, ambiguityscope=None, scope=None, name=None):518 self.virt = virt519 self.prot = prot520 self.refid = refid521 self.ambiguityscope = ambiguityscope522 self.scope = scope523 self.name = name524 def factory(*args_, **kwargs_):525 if memberRefType.subclass:526 return memberRefType.subclass(*args_, **kwargs_)527 else:528 return memberRefType(*args_, **kwargs_)529 factory = staticmethod(factory)530 def get_scope(self): return self.scope531 def set_scope(self, scope): self.scope = scope532 def get_name(self): return self.name533 def set_name(self, name): self.name = name534 def get_virt(self): return self.virt535 def set_virt(self, virt): self.virt = virt536 def get_prot(self): return self.prot537 def set_prot(self, prot): self.prot = prot538 def get_refid(self): return self.refid539 def set_refid(self, refid): self.refid = refid540 def get_ambiguityscope(self): return self.ambiguityscope541 def set_ambiguityscope(self, ambiguityscope): self.ambiguityscope = ambiguityscope542 def hasContent_(self):543 if (544 self.scope is not None or545 self.name is not None546 ):547 return True548 else:549 return False550 def build(self, node_):551 attrs = node_.attributes552 self.buildAttributes(attrs)553 for child_ in node_.childNodes:554 nodeName_ = child_.nodeName.split(':')[-1]555 self.buildChildren(child_, nodeName_)556 def buildAttributes(self, attrs):557 if attrs.get('virt'):558 self.virt = attrs.get('virt').value559 if attrs.get('prot'):560 self.prot = attrs.get('prot').value561 if attrs.get('refid'):562 self.refid = attrs.get('refid').value563 if attrs.get('ambiguityscope'):564 self.ambiguityscope = attrs.get('ambiguityscope').value565 def buildChildren(self, child_, nodeName_):566 if child_.nodeType == Node.ELEMENT_NODE and \567 nodeName_ == 'scope':568 scope_ = ''569 for text__content_ in child_.childNodes:570 scope_ += text__content_.nodeValue571 self.scope = scope_572 elif child_.nodeType == Node.ELEMENT_NODE and \573 nodeName_ == 'name':574 name_ = ''575 for text__content_ in child_.childNodes:576 name_ += text__content_.nodeValue577 self.name = name_578# end class memberRefType579class scope(GeneratedsSuper):580 subclass = None581 superclass = None582 def __init__(self, valueOf_=''):583 self.valueOf_ = valueOf_584 def factory(*args_, **kwargs_):585 if scope.subclass:586 return scope.subclass(*args_, **kwargs_)587 else:588 return scope(*args_, **kwargs_)589 factory = staticmethod(factory)590 def getValueOf_(self): return self.valueOf_591 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_592 def hasContent_(self):593 if (594 self.valueOf_ is not None595 ):596 return True597 else:598 return False599 def build(self, node_):600 attrs = node_.attributes601 self.buildAttributes(attrs)602 self.valueOf_ = ''603 for child_ in node_.childNodes:604 nodeName_ = child_.nodeName.split(':')[-1]605 self.buildChildren(child_, nodeName_)606 def buildAttributes(self, attrs):607 pass608 def buildChildren(self, child_, nodeName_):609 if child_.nodeType == Node.TEXT_NODE:610 self.valueOf_ += child_.nodeValue611 elif child_.nodeType == Node.CDATA_SECTION_NODE:612 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'613# end class scope614class name(GeneratedsSuper):615 subclass = None616 superclass = None617 def __init__(self, valueOf_=''):618 self.valueOf_ = valueOf_619 def factory(*args_, **kwargs_):620 if name.subclass:621 return name.subclass(*args_, **kwargs_)622 else:623 return name(*args_, **kwargs_)624 factory = staticmethod(factory)625 def getValueOf_(self): return self.valueOf_626 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_627 def hasContent_(self):628 if (629 self.valueOf_ is not None630 ):631 return True632 else:633 return False634 def build(self, node_):635 attrs = node_.attributes636 self.buildAttributes(attrs)637 self.valueOf_ = ''638 for child_ in node_.childNodes:639 nodeName_ = child_.nodeName.split(':')[-1]640 self.buildChildren(child_, nodeName_)641 def buildAttributes(self, attrs):642 pass643 def buildChildren(self, child_, nodeName_):644 if child_.nodeType == Node.TEXT_NODE:645 self.valueOf_ += child_.nodeValue646 elif child_.nodeType == Node.CDATA_SECTION_NODE:647 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'648# end class name649class compoundRefType(GeneratedsSuper):650 subclass = None651 superclass = None652 def __init__(self, virt=None, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None):653 self.virt = virt654 self.prot = prot655 self.refid = refid656 if mixedclass_ is None:657 self.mixedclass_ = MixedContainer658 else:659 self.mixedclass_ = mixedclass_660 if content_ is None:661 self.content_ = []662 else:663 self.content_ = content_664 def factory(*args_, **kwargs_):665 if compoundRefType.subclass:666 return compoundRefType.subclass(*args_, **kwargs_)667 else:668 return compoundRefType(*args_, **kwargs_)669 factory = staticmethod(factory)670 def get_virt(self): return self.virt671 def set_virt(self, virt): self.virt = virt672 def get_prot(self): return self.prot673 def set_prot(self, prot): self.prot = prot674 def get_refid(self): return self.refid675 def set_refid(self, refid): self.refid = refid676 def getValueOf_(self): return self.valueOf_677 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_678 def hasContent_(self):679 if (680 self.valueOf_ is not None681 ):682 return True683 else:684 return False685 def build(self, node_):686 attrs = node_.attributes687 self.buildAttributes(attrs)688 self.valueOf_ = ''689 for child_ in node_.childNodes:690 nodeName_ = child_.nodeName.split(':')[-1]691 self.buildChildren(child_, nodeName_)692 def buildAttributes(self, attrs):693 if attrs.get('virt'):694 self.virt = attrs.get('virt').value695 if attrs.get('prot'):696 self.prot = attrs.get('prot').value697 if attrs.get('refid'):698 self.refid = attrs.get('refid').value699 def buildChildren(self, child_, nodeName_):700 if child_.nodeType == Node.TEXT_NODE:701 obj_ = self.mixedclass_(MixedContainer.CategoryText,702 MixedContainer.TypeNone, '', child_.nodeValue)703 self.content_.append(obj_)704 if child_.nodeType == Node.TEXT_NODE:705 self.valueOf_ += child_.nodeValue706 elif child_.nodeType == Node.CDATA_SECTION_NODE:707 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'708# end class compoundRefType709class reimplementType(GeneratedsSuper):710 subclass = None711 superclass = None712 def __init__(self, refid=None, valueOf_='', mixedclass_=None, content_=None):713 self.refid = refid714 if mixedclass_ is None:715 self.mixedclass_ = MixedContainer716 else:717 self.mixedclass_ = mixedclass_718 if content_ is None:719 self.content_ = []720 else:721 self.content_ = content_722 def factory(*args_, **kwargs_):723 if reimplementType.subclass:724 return reimplementType.subclass(*args_, **kwargs_)725 else:726 return reimplementType(*args_, **kwargs_)727 factory = staticmethod(factory)728 def get_refid(self): return self.refid729 def set_refid(self, refid): self.refid = refid730 def getValueOf_(self): return self.valueOf_731 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_732 def hasContent_(self):733 if (734 self.valueOf_ is not None735 ):736 return True737 else:738 return False739 def build(self, node_):740 attrs = node_.attributes741 self.buildAttributes(attrs)742 self.valueOf_ = ''743 for child_ in node_.childNodes:744 nodeName_ = child_.nodeName.split(':')[-1]745 self.buildChildren(child_, nodeName_)746 def buildAttributes(self, attrs):747 if attrs.get('refid'):748 self.refid = attrs.get('refid').value749 def buildChildren(self, child_, nodeName_):750 if child_.nodeType == Node.TEXT_NODE:751 obj_ = self.mixedclass_(MixedContainer.CategoryText,752 MixedContainer.TypeNone, '', child_.nodeValue)753 self.content_.append(obj_)754 if child_.nodeType == Node.TEXT_NODE:755 self.valueOf_ += child_.nodeValue756 elif child_.nodeType == Node.CDATA_SECTION_NODE:757 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'758# end class reimplementType759class incType(GeneratedsSuper):760 subclass = None761 superclass = None762 def __init__(self, local=None, refid=None, valueOf_='', mixedclass_=None, content_=None):763 self.local = local764 self.refid = refid765 if mixedclass_ is None:766 self.mixedclass_ = MixedContainer767 else:768 self.mixedclass_ = mixedclass_769 if content_ is None:770 self.content_ = []771 else:772 self.content_ = content_773 def factory(*args_, **kwargs_):774 if incType.subclass:775 return incType.subclass(*args_, **kwargs_)776 else:777 return incType(*args_, **kwargs_)778 factory = staticmethod(factory)779 def get_local(self): return self.local780 def set_local(self, local): self.local = local781 def get_refid(self): return self.refid782 def set_refid(self, refid): self.refid = refid783 def getValueOf_(self): return self.valueOf_784 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_785 def hasContent_(self):786 if (787 self.valueOf_ is not None788 ):789 return True790 else:791 return False792 def build(self, node_):793 attrs = node_.attributes794 self.buildAttributes(attrs)795 self.valueOf_ = ''796 for child_ in node_.childNodes:797 nodeName_ = child_.nodeName.split(':')[-1]798 self.buildChildren(child_, nodeName_)799 def buildAttributes(self, attrs):800 if attrs.get('local'):801 self.local = attrs.get('local').value802 if attrs.get('refid'):803 self.refid = attrs.get('refid').value804 def buildChildren(self, child_, nodeName_):805 if child_.nodeType == Node.TEXT_NODE:806 obj_ = self.mixedclass_(MixedContainer.CategoryText,807 MixedContainer.TypeNone, '', child_.nodeValue)808 self.content_.append(obj_)809 if child_.nodeType == Node.TEXT_NODE:810 self.valueOf_ += child_.nodeValue811 elif child_.nodeType == Node.CDATA_SECTION_NODE:812 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'813# end class incType814class refType(GeneratedsSuper):815 subclass = None816 superclass = None817 def __init__(self, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None):818 self.prot = prot819 self.refid = refid820 if mixedclass_ is None:821 self.mixedclass_ = MixedContainer822 else:823 self.mixedclass_ = mixedclass_824 if content_ is None:825 self.content_ = []826 else:827 self.content_ = content_828 def factory(*args_, **kwargs_):829 if refType.subclass:830 return refType.subclass(*args_, **kwargs_)831 else:832 return refType(*args_, **kwargs_)833 factory = staticmethod(factory)834 def get_prot(self): return self.prot835 def set_prot(self, prot): self.prot = prot836 def get_refid(self): return self.refid837 def set_refid(self, refid): self.refid = refid838 def getValueOf_(self): return self.valueOf_839 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_840 def hasContent_(self):841 if (842 self.valueOf_ is not None843 ):844 return True845 else:846 return False847 def build(self, node_):848 attrs = node_.attributes849 self.buildAttributes(attrs)850 self.valueOf_ = ''851 for child_ in node_.childNodes:852 nodeName_ = child_.nodeName.split(':')[-1]853 self.buildChildren(child_, nodeName_)854 def buildAttributes(self, attrs):855 if attrs.get('prot'):856 self.prot = attrs.get('prot').value857 if attrs.get('refid'):858 self.refid = attrs.get('refid').value859 def buildChildren(self, child_, nodeName_):860 if child_.nodeType == Node.TEXT_NODE:861 obj_ = self.mixedclass_(MixedContainer.CategoryText,862 MixedContainer.TypeNone, '', child_.nodeValue)863 self.content_.append(obj_)864 if child_.nodeType == Node.TEXT_NODE:865 self.valueOf_ += child_.nodeValue866 elif child_.nodeType == Node.CDATA_SECTION_NODE:867 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'868# end class refType869class refTextType(GeneratedsSuper):870 subclass = None871 superclass = None872 def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None):873 self.refid = refid874 self.kindref = kindref875 self.external = external876 if mixedclass_ is None:877 self.mixedclass_ = MixedContainer878 else:879 self.mixedclass_ = mixedclass_880 if content_ is None:881 self.content_ = []882 else:883 self.content_ = content_884 def factory(*args_, **kwargs_):885 if refTextType.subclass:886 return refTextType.subclass(*args_, **kwargs_)887 else:888 return refTextType(*args_, **kwargs_)889 factory = staticmethod(factory)890 def get_refid(self): return self.refid891 def set_refid(self, refid): self.refid = refid892 def get_kindref(self): return self.kindref893 def set_kindref(self, kindref): self.kindref = kindref894 def get_external(self): return self.external895 def set_external(self, external): self.external = external896 def getValueOf_(self): return self.valueOf_897 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_898 def hasContent_(self):899 if (900 self.valueOf_ is not None901 ):902 return True903 else:904 return False905 def build(self, node_):906 attrs = node_.attributes907 self.buildAttributes(attrs)908 self.valueOf_ = ''909 for child_ in node_.childNodes:910 nodeName_ = child_.nodeName.split(':')[-1]911 self.buildChildren(child_, nodeName_)912 def buildAttributes(self, attrs):913 if attrs.get('refid'):914 self.refid = attrs.get('refid').value915 if attrs.get('kindref'):916 self.kindref = attrs.get('kindref').value917 if attrs.get('external'):918 self.external = attrs.get('external').value919 def buildChildren(self, child_, nodeName_):920 if child_.nodeType == Node.TEXT_NODE:921 obj_ = self.mixedclass_(MixedContainer.CategoryText,922 MixedContainer.TypeNone, '', child_.nodeValue)923 self.content_.append(obj_)924 if child_.nodeType == Node.TEXT_NODE:925 self.valueOf_ += child_.nodeValue926 elif child_.nodeType == Node.CDATA_SECTION_NODE:927 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'928# end class refTextType929class sectiondefType(GeneratedsSuper):930 subclass = None931 superclass = None932 def __init__(self, kind=None, header=None, description=None, memberdef=None):933 self.kind = kind934 self.header = header935 self.description = description936 if memberdef is None:937 self.memberdef = []938 else:939 self.memberdef = memberdef940 def factory(*args_, **kwargs_):941 if sectiondefType.subclass:942 return sectiondefType.subclass(*args_, **kwargs_)943 else:944 return sectiondefType(*args_, **kwargs_)945 factory = staticmethod(factory)946 def get_header(self): return self.header947 def set_header(self, header): self.header = header948 def get_description(self): return self.description949 def set_description(self, description): self.description = description950 def get_memberdef(self): return self.memberdef951 def set_memberdef(self, memberdef): self.memberdef = memberdef952 def add_memberdef(self, value): self.memberdef.append(value)953 def insert_memberdef(self, index, value): self.memberdef[index] = value954 def get_kind(self): return self.kind955 def set_kind(self, kind): self.kind = kind956 def hasContent_(self):957 if (958 self.header is not None or959 self.description is not None or960 self.memberdef is not None961 ):962 return True963 else:964 return False965 def build(self, node_):966 attrs = node_.attributes967 self.buildAttributes(attrs)968 for child_ in node_.childNodes:969 nodeName_ = child_.nodeName.split(':')[-1]970 self.buildChildren(child_, nodeName_)971 def buildAttributes(self, attrs):972 if attrs.get('kind'):973 self.kind = attrs.get('kind').value974 def buildChildren(self, child_, nodeName_):975 if child_.nodeType == Node.ELEMENT_NODE and \976 nodeName_ == 'header':977 header_ = ''978 for text__content_ in child_.childNodes:979 header_ += text__content_.nodeValue980 self.header = header_981 elif child_.nodeType == Node.ELEMENT_NODE and \982 nodeName_ == 'description':983 obj_ = descriptionType.factory()984 obj_.build(child_)985 self.set_description(obj_)986 elif child_.nodeType == Node.ELEMENT_NODE and \987 nodeName_ == 'memberdef':988 obj_ = memberdefType.factory()989 obj_.build(child_)990 self.memberdef.append(obj_)991# end class sectiondefType992class memberdefType(GeneratedsSuper):993 subclass = None994 superclass = None995 def __init__(self, initonly=None, kind=None, volatile=None, const=None, raisexx=None, virt=None, readable=None, prot=None, explicit=None, new=None, final=None, writable=None, add=None, static=None, remove=None, sealed=None, mutable=None, gettable=None, inline=None, settable=None, id=None, templateparamlist=None, type_=None, definition=None, argsstring=None, name=None, read=None, write=None, bitfield=None, reimplements=None, reimplementedby=None, param=None, enumvalue=None, initializer=None, exceptions=None, briefdescription=None, detaileddescription=None, inbodydescription=None, location=None, references=None, referencedby=None):996 self.initonly = initonly997 self.kind = kind998 self.volatile = volatile999 self.const = const1000 self.raisexx = raisexx1001 self.virt = virt1002 self.readable = readable1003 self.prot = prot1004 self.explicit = explicit1005 self.new = new1006 self.final = final1007 self.writable = writable1008 self.add = add1009 self.static = static1010 self.remove = remove1011 self.sealed = sealed1012 self.mutable = mutable1013 self.gettable = gettable1014 self.inline = inline1015 self.settable = settable1016 self.id = id1017 self.templateparamlist = templateparamlist1018 self.type_ = type_1019 self.definition = definition1020 self.argsstring = argsstring1021 self.name = name1022 self.read = read1023 self.write = write1024 self.bitfield = bitfield1025 if reimplements is None:1026 self.reimplements = []1027 else:1028 self.reimplements = reimplements1029 if reimplementedby is None:1030 self.reimplementedby = []1031 else:1032 self.reimplementedby = reimplementedby1033 if param is None:1034 self.param = []1035 else:1036 self.param = param1037 if enumvalue is None:1038 self.enumvalue = []1039 else:1040 self.enumvalue = enumvalue1041 self.initializer = initializer1042 self.exceptions = exceptions1043 self.briefdescription = briefdescription1044 self.detaileddescription = detaileddescription1045 self.inbodydescription = inbodydescription1046 self.location = location1047 if references is None:1048 self.references = []1049 else:1050 self.references = references1051 if referencedby is None:1052 self.referencedby = []1053 else:1054 self.referencedby = referencedby1055 def factory(*args_, **kwargs_):1056 if memberdefType.subclass:1057 return memberdefType.subclass(*args_, **kwargs_)1058 else:1059 return memberdefType(*args_, **kwargs_)1060 factory = staticmethod(factory)1061 def get_templateparamlist(self): return self.templateparamlist1062 def set_templateparamlist(self, templateparamlist): self.templateparamlist = templateparamlist1063 def get_type(self): return self.type_1064 def set_type(self, type_): self.type_ = type_1065 def get_definition(self): return self.definition1066 def set_definition(self, definition): self.definition = definition1067 def get_argsstring(self): return self.argsstring1068 def set_argsstring(self, argsstring): self.argsstring = argsstring1069 def get_name(self): return self.name1070 def set_name(self, name): self.name = name1071 def get_read(self): return self.read1072 def set_read(self, read): self.read = read1073 def get_write(self): return self.write1074 def set_write(self, write): self.write = write1075 def get_bitfield(self): return self.bitfield1076 def set_bitfield(self, bitfield): self.bitfield = bitfield1077 def get_reimplements(self): return self.reimplements1078 def set_reimplements(self, reimplements): self.reimplements = reimplements1079 def add_reimplements(self, value): self.reimplements.append(value)1080 def insert_reimplements(self, index, value): self.reimplements[index] = value1081 def get_reimplementedby(self): return self.reimplementedby1082 def set_reimplementedby(self, reimplementedby): self.reimplementedby = reimplementedby1083 def add_reimplementedby(self, value): self.reimplementedby.append(value)1084 def insert_reimplementedby(self, index, value): self.reimplementedby[index] = value1085 def get_param(self): return self.param1086 def set_param(self, param): self.param = param1087 def add_param(self, value): self.param.append(value)1088 def insert_param(self, index, value): self.param[index] = value1089 def get_enumvalue(self): return self.enumvalue1090 def set_enumvalue(self, enumvalue): self.enumvalue = enumvalue1091 def add_enumvalue(self, value): self.enumvalue.append(value)1092 def insert_enumvalue(self, index, value): self.enumvalue[index] = value1093 def get_initializer(self): return self.initializer1094 def set_initializer(self, initializer): self.initializer = initializer1095 def get_exceptions(self): return self.exceptions1096 def set_exceptions(self, exceptions): self.exceptions = exceptions1097 def get_briefdescription(self): return self.briefdescription1098 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription1099 def get_detaileddescription(self): return self.detaileddescription1100 def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription1101 def get_inbodydescription(self): return self.inbodydescription1102 def set_inbodydescription(self, inbodydescription): self.inbodydescription = inbodydescription1103 def get_location(self): return self.location1104 def set_location(self, location): self.location = location1105 def get_references(self): return self.references1106 def set_references(self, references): self.references = references1107 def add_references(self, value): self.references.append(value)1108 def insert_references(self, index, value): self.references[index] = value1109 def get_referencedby(self): return self.referencedby1110 def set_referencedby(self, referencedby): self.referencedby = referencedby1111 def add_referencedby(self, value): self.referencedby.append(value)1112 def insert_referencedby(self, index, value): self.referencedby[index] = value1113 def get_initonly(self): return self.initonly1114 def set_initonly(self, initonly): self.initonly = initonly1115 def get_kind(self): return self.kind1116 def set_kind(self, kind): self.kind = kind1117 def get_volatile(self): return self.volatile1118 def set_volatile(self, volatile): self.volatile = volatile1119 def get_const(self): return self.const1120 def set_const(self, const): self.const = const1121 def get_raise(self): return self.raisexx1122 def set_raise(self, raisexx): self.raisexx = raisexx1123 def get_virt(self): return self.virt1124 def set_virt(self, virt): self.virt = virt1125 def get_readable(self): return self.readable1126 def set_readable(self, readable): self.readable = readable1127 def get_prot(self): return self.prot1128 def set_prot(self, prot): self.prot = prot1129 def get_explicit(self): return self.explicit1130 def set_explicit(self, explicit): self.explicit = explicit1131 def get_new(self): return self.new1132 def set_new(self, new): self.new = new1133 def get_final(self): return self.final1134 def set_final(self, final): self.final = final1135 def get_writable(self): return self.writable1136 def set_writable(self, writable): self.writable = writable1137 def get_add(self): return self.add1138 def set_add(self, add): self.add = add1139 def get_static(self): return self.static1140 def set_static(self, static): self.static = static1141 def get_remove(self): return self.remove1142 def set_remove(self, remove): self.remove = remove1143 def get_sealed(self): return self.sealed1144 def set_sealed(self, sealed): self.sealed = sealed1145 def get_mutable(self): return self.mutable1146 def set_mutable(self, mutable): self.mutable = mutable1147 def get_gettable(self): return self.gettable1148 def set_gettable(self, gettable): self.gettable = gettable1149 def get_inline(self): return self.inline1150 def set_inline(self, inline): self.inline = inline1151 def get_settable(self): return self.settable1152 def set_settable(self, settable): self.settable = settable1153 def get_id(self): return self.id1154 def set_id(self, id): self.id = id1155 def hasContent_(self):1156 if (1157 self.templateparamlist is not None or1158 self.type_ is not None or1159 self.definition is not None or1160 self.argsstring is not None or1161 self.name is not None or1162 self.read is not None or1163 self.write is not None or1164 self.bitfield is not None or1165 self.reimplements is not None or1166 self.reimplementedby is not None or1167 self.param is not None or1168 self.enumvalue is not None or1169 self.initializer is not None or1170 self.exceptions is not None or1171 self.briefdescription is not None or1172 self.detaileddescription is not None or1173 self.inbodydescription is not None or1174 self.location is not None or1175 self.references is not None or1176 self.referencedby is not None1177 ):1178 return True1179 else:1180 return False1181 def build(self, node_):1182 attrs = node_.attributes1183 self.buildAttributes(attrs)1184 for child_ in node_.childNodes:1185 nodeName_ = child_.nodeName.split(':')[-1]1186 self.buildChildren(child_, nodeName_)1187 def buildAttributes(self, attrs):1188 if attrs.get('initonly'):1189 self.initonly = attrs.get('initonly').value1190 if attrs.get('kind'):1191 self.kind = attrs.get('kind').value1192 if attrs.get('volatile'):1193 self.volatile = attrs.get('volatile').value1194 if attrs.get('const'):1195 self.const = attrs.get('const').value1196 if attrs.get('raise'):1197 self.raisexx = attrs.get('raise').value1198 if attrs.get('virt'):1199 self.virt = attrs.get('virt').value1200 if attrs.get('readable'):1201 self.readable = attrs.get('readable').value1202 if attrs.get('prot'):1203 self.prot = attrs.get('prot').value1204 if attrs.get('explicit'):1205 self.explicit = attrs.get('explicit').value1206 if attrs.get('new'):1207 self.new = attrs.get('new').value1208 if attrs.get('final'):1209 self.final = attrs.get('final').value1210 if attrs.get('writable'):1211 self.writable = attrs.get('writable').value1212 if attrs.get('add'):1213 self.add = attrs.get('add').value1214 if attrs.get('static'):1215 self.static = attrs.get('static').value1216 if attrs.get('remove'):1217 self.remove = attrs.get('remove').value1218 if attrs.get('sealed'):1219 self.sealed = attrs.get('sealed').value1220 if attrs.get('mutable'):1221 self.mutable = attrs.get('mutable').value1222 if attrs.get('gettable'):1223 self.gettable = attrs.get('gettable').value1224 if attrs.get('inline'):1225 self.inline = attrs.get('inline').value1226 if attrs.get('settable'):1227 self.settable = attrs.get('settable').value1228 if attrs.get('id'):1229 self.id = attrs.get('id').value1230 def buildChildren(self, child_, nodeName_):1231 if child_.nodeType == Node.ELEMENT_NODE and \1232 nodeName_ == 'templateparamlist':1233 obj_ = templateparamlistType.factory()1234 obj_.build(child_)1235 self.set_templateparamlist(obj_)1236 elif child_.nodeType == Node.ELEMENT_NODE and \1237 nodeName_ == 'type':1238 obj_ = linkedTextType.factory()1239 obj_.build(child_)1240 self.set_type(obj_)1241 elif child_.nodeType == Node.ELEMENT_NODE and \1242 nodeName_ == 'definition':1243 definition_ = ''1244 for text__content_ in child_.childNodes:1245 definition_ += text__content_.nodeValue1246 self.definition = definition_1247 elif child_.nodeType == Node.ELEMENT_NODE and \1248 nodeName_ == 'argsstring':1249 argsstring_ = ''1250 for text__content_ in child_.childNodes:1251 argsstring_ += text__content_.nodeValue1252 self.argsstring = argsstring_1253 elif child_.nodeType == Node.ELEMENT_NODE and \1254 nodeName_ == 'name':1255 name_ = ''1256 for text__content_ in child_.childNodes:1257 name_ += text__content_.nodeValue1258 self.name = name_1259 elif child_.nodeType == Node.ELEMENT_NODE and \1260 nodeName_ == 'read':1261 read_ = ''1262 for text__content_ in child_.childNodes:1263 read_ += text__content_.nodeValue1264 self.read = read_1265 elif child_.nodeType == Node.ELEMENT_NODE and \1266 nodeName_ == 'write':1267 write_ = ''1268 for text__content_ in child_.childNodes:1269 write_ += text__content_.nodeValue1270 self.write = write_1271 elif child_.nodeType == Node.ELEMENT_NODE and \1272 nodeName_ == 'bitfield':1273 bitfield_ = ''1274 for text__content_ in child_.childNodes:1275 bitfield_ += text__content_.nodeValue1276 self.bitfield = bitfield_1277 elif child_.nodeType == Node.ELEMENT_NODE and \1278 nodeName_ == 'reimplements':1279 obj_ = reimplementType.factory()1280 obj_.build(child_)1281 self.reimplements.append(obj_)1282 elif child_.nodeType == Node.ELEMENT_NODE and \1283 nodeName_ == 'reimplementedby':1284 obj_ = reimplementType.factory()1285 obj_.build(child_)1286 self.reimplementedby.append(obj_)1287 elif child_.nodeType == Node.ELEMENT_NODE and \1288 nodeName_ == 'param':1289 obj_ = paramType.factory()1290 obj_.build(child_)1291 self.param.append(obj_)1292 elif child_.nodeType == Node.ELEMENT_NODE and \1293 nodeName_ == 'enumvalue':1294 obj_ = enumvalueType.factory()1295 obj_.build(child_)1296 self.enumvalue.append(obj_)1297 elif child_.nodeType == Node.ELEMENT_NODE and \1298 nodeName_ == 'initializer':1299 obj_ = linkedTextType.factory()1300 obj_.build(child_)1301 self.set_initializer(obj_)1302 elif child_.nodeType == Node.ELEMENT_NODE and \1303 nodeName_ == 'exceptions':1304 obj_ = linkedTextType.factory()1305 obj_.build(child_)1306 self.set_exceptions(obj_)1307 elif child_.nodeType == Node.ELEMENT_NODE and \1308 nodeName_ == 'briefdescription':1309 obj_ = descriptionType.factory()1310 obj_.build(child_)1311 self.set_briefdescription(obj_)1312 elif child_.nodeType == Node.ELEMENT_NODE and \1313 nodeName_ == 'detaileddescription':1314 obj_ = descriptionType.factory()1315 obj_.build(child_)1316 self.set_detaileddescription(obj_)1317 elif child_.nodeType == Node.ELEMENT_NODE and \1318 nodeName_ == 'inbodydescription':1319 obj_ = descriptionType.factory()1320 obj_.build(child_)1321 self.set_inbodydescription(obj_)1322 elif child_.nodeType == Node.ELEMENT_NODE and \1323 nodeName_ == 'location':1324 obj_ = locationType.factory()1325 obj_.build(child_)1326 self.set_location(obj_)1327 elif child_.nodeType == Node.ELEMENT_NODE and \1328 nodeName_ == 'references':1329 obj_ = referenceType.factory()1330 obj_.build(child_)1331 self.references.append(obj_)1332 elif child_.nodeType == Node.ELEMENT_NODE and \1333 nodeName_ == 'referencedby':1334 obj_ = referenceType.factory()1335 obj_.build(child_)1336 self.referencedby.append(obj_)1337# end class memberdefType1338class definition(GeneratedsSuper):1339 subclass = None1340 superclass = None1341 def __init__(self, valueOf_=''):1342 self.valueOf_ = valueOf_1343 def factory(*args_, **kwargs_):1344 if definition.subclass:1345 return definition.subclass(*args_, **kwargs_)1346 else:1347 return definition(*args_, **kwargs_)1348 factory = staticmethod(factory)1349 def getValueOf_(self): return self.valueOf_1350 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1351 def hasContent_(self):1352 if (1353 self.valueOf_ is not None1354 ):1355 return True1356 else:1357 return False1358 def build(self, node_):1359 attrs = node_.attributes1360 self.buildAttributes(attrs)1361 self.valueOf_ = ''1362 for child_ in node_.childNodes:1363 nodeName_ = child_.nodeName.split(':')[-1]1364 self.buildChildren(child_, nodeName_)1365 def buildAttributes(self, attrs):1366 pass1367 def buildChildren(self, child_, nodeName_):1368 if child_.nodeType == Node.TEXT_NODE:1369 self.valueOf_ += child_.nodeValue1370 elif child_.nodeType == Node.CDATA_SECTION_NODE:1371 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1372# end class definition1373class argsstring(GeneratedsSuper):1374 subclass = None1375 superclass = None1376 def __init__(self, valueOf_=''):1377 self.valueOf_ = valueOf_1378 def factory(*args_, **kwargs_):1379 if argsstring.subclass:1380 return argsstring.subclass(*args_, **kwargs_)1381 else:1382 return argsstring(*args_, **kwargs_)1383 factory = staticmethod(factory)1384 def getValueOf_(self): return self.valueOf_1385 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1386 def export(self, outfile, level, namespace_='', name_='argsstring', namespacedef_=''):1387 showIndent(outfile, level)1388 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))1389 self.exportAttributes(outfile, level, namespace_, name_='argsstring')1390 if self.hasContent_():1391 outfile.write('>\n')1392 self.exportChildren(outfile, level + 1, namespace_, name_)1393 showIndent(outfile, level)1394 outfile.write('</%s%s>\n' % (namespace_, name_))1395 else:1396 outfile.write(' />\n')1397 def hasContent_(self):1398 if (1399 self.valueOf_ is not None1400 ):1401 return True1402 else:1403 return False1404 def build(self, node_):1405 attrs = node_.attributes1406 self.buildAttributes(attrs)1407 self.valueOf_ = ''1408 for child_ in node_.childNodes:1409 nodeName_ = child_.nodeName.split(':')[-1]1410 self.buildChildren(child_, nodeName_)1411 def buildAttributes(self, attrs):1412 pass1413 def buildChildren(self, child_, nodeName_):1414 if child_.nodeType == Node.TEXT_NODE:1415 self.valueOf_ += child_.nodeValue1416 elif child_.nodeType == Node.CDATA_SECTION_NODE:1417 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1418# end class argsstring1419class read(GeneratedsSuper):1420 subclass = None1421 superclass = None1422 def __init__(self, valueOf_=''):1423 self.valueOf_ = valueOf_1424 def factory(*args_, **kwargs_):1425 if read.subclass:1426 return read.subclass(*args_, **kwargs_)1427 else:1428 return read(*args_, **kwargs_)1429 factory = staticmethod(factory)1430 def getValueOf_(self): return self.valueOf_1431 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1432 def hasContent_(self):1433 if (1434 self.valueOf_ is not None1435 ):1436 return True1437 else:1438 return False1439 def build(self, node_):1440 attrs = node_.attributes1441 self.buildAttributes(attrs)1442 self.valueOf_ = ''1443 for child_ in node_.childNodes:1444 nodeName_ = child_.nodeName.split(':')[-1]1445 self.buildChildren(child_, nodeName_)1446 def buildAttributes(self, attrs):1447 pass1448 def buildChildren(self, child_, nodeName_):1449 if child_.nodeType == Node.TEXT_NODE:1450 self.valueOf_ += child_.nodeValue1451 elif child_.nodeType == Node.CDATA_SECTION_NODE:1452 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1453# end class read1454class write(GeneratedsSuper):1455 subclass = None1456 superclass = None1457 def __init__(self, valueOf_=''):1458 self.valueOf_ = valueOf_1459 def factory(*args_, **kwargs_):1460 if write.subclass:1461 return write.subclass(*args_, **kwargs_)1462 else:1463 return write(*args_, **kwargs_)1464 factory = staticmethod(factory)1465 def getValueOf_(self): return self.valueOf_1466 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1467 def hasContent_(self):1468 if (1469 self.valueOf_ is not None1470 ):1471 return True1472 else:1473 return False1474 def build(self, node_):1475 attrs = node_.attributes1476 self.buildAttributes(attrs)1477 self.valueOf_ = ''1478 for child_ in node_.childNodes:1479 nodeName_ = child_.nodeName.split(':')[-1]1480 self.buildChildren(child_, nodeName_)1481 def buildAttributes(self, attrs):1482 pass1483 def buildChildren(self, child_, nodeName_):1484 if child_.nodeType == Node.TEXT_NODE:1485 self.valueOf_ += child_.nodeValue1486 elif child_.nodeType == Node.CDATA_SECTION_NODE:1487 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1488# end class write1489class bitfield(GeneratedsSuper):1490 subclass = None1491 superclass = None1492 def __init__(self, valueOf_=''):1493 self.valueOf_ = valueOf_1494 def factory(*args_, **kwargs_):1495 if bitfield.subclass:1496 return bitfield.subclass(*args_, **kwargs_)1497 else:1498 return bitfield(*args_, **kwargs_)1499 factory = staticmethod(factory)1500 def getValueOf_(self): return self.valueOf_1501 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1502 def hasContent_(self):1503 if (1504 self.valueOf_ is not None1505 ):1506 return True1507 else:1508 return False1509 def build(self, node_):1510 attrs = node_.attributes1511 self.buildAttributes(attrs)1512 self.valueOf_ = ''1513 for child_ in node_.childNodes:1514 nodeName_ = child_.nodeName.split(':')[-1]1515 self.buildChildren(child_, nodeName_)1516 def buildAttributes(self, attrs):1517 pass1518 def buildChildren(self, child_, nodeName_):1519 if child_.nodeType == Node.TEXT_NODE:1520 self.valueOf_ += child_.nodeValue1521 elif child_.nodeType == Node.CDATA_SECTION_NODE:1522 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1523# end class bitfield1524class descriptionType(GeneratedsSuper):1525 subclass = None1526 superclass = None1527 def __init__(self, title=None, para=None, sect1=None, internal=None, mixedclass_=None, content_=None):1528 if mixedclass_ is None:1529 self.mixedclass_ = MixedContainer1530 else:1531 self.mixedclass_ = mixedclass_1532 if content_ is None:1533 self.content_ = []1534 else:1535 self.content_ = content_1536 def factory(*args_, **kwargs_):1537 if descriptionType.subclass:1538 return descriptionType.subclass(*args_, **kwargs_)1539 else:1540 return descriptionType(*args_, **kwargs_)1541 factory = staticmethod(factory)1542 def get_title(self): return self.title1543 def set_title(self, title): self.title = title1544 def get_para(self): return self.para1545 def set_para(self, para): self.para = para1546 def add_para(self, value): self.para.append(value)1547 def insert_para(self, index, value): self.para[index] = value1548 def get_sect1(self): return self.sect11549 def set_sect1(self, sect1): self.sect1 = sect11550 def add_sect1(self, value): self.sect1.append(value)1551 def insert_sect1(self, index, value): self.sect1[index] = value1552 def get_internal(self): return self.internal1553 def set_internal(self, internal): self.internal = internal1554 def hasContent_(self):1555 if (1556 self.title is not None or1557 self.para is not None or1558 self.sect1 is not None or1559 self.internal is not None1560 ):1561 return True1562 else:1563 return False1564 def build(self, node_):1565 attrs = node_.attributes1566 self.buildAttributes(attrs)1567 for child_ in node_.childNodes:1568 nodeName_ = child_.nodeName.split(':')[-1]1569 self.buildChildren(child_, nodeName_)1570 def buildAttributes(self, attrs):1571 pass1572 def buildChildren(self, child_, nodeName_):1573 if child_.nodeType == Node.ELEMENT_NODE and \1574 nodeName_ == 'title':1575 childobj_ = docTitleType.factory()1576 childobj_.build(child_)1577 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1578 MixedContainer.TypeNone, 'title', childobj_)1579 self.content_.append(obj_)1580 elif child_.nodeType == Node.ELEMENT_NODE and \1581 nodeName_ == 'para':1582 childobj_ = docParaType.factory()1583 childobj_.build(child_)1584 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1585 MixedContainer.TypeNone, 'para', childobj_)1586 self.content_.append(obj_)1587 elif child_.nodeType == Node.ELEMENT_NODE and \1588 nodeName_ == 'sect1':1589 childobj_ = docSect1Type.factory()1590 childobj_.build(child_)1591 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1592 MixedContainer.TypeNone, 'sect1', childobj_)1593 self.content_.append(obj_)1594 elif child_.nodeType == Node.ELEMENT_NODE and \1595 nodeName_ == 'internal':1596 childobj_ = docInternalType.factory()1597 childobj_.build(child_)1598 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1599 MixedContainer.TypeNone, 'internal', childobj_)1600 self.content_.append(obj_)1601# end class descriptionType1602class enumvalueType(GeneratedsSuper):1603 subclass = None1604 superclass = None1605 def __init__(self, prot=None, id=None, name=None, initializer=None, briefdescription=None, detaileddescription=None, mixedclass_=None, content_=None):1606 self.prot = prot1607 self.id = id1608 if mixedclass_ is None:1609 self.mixedclass_ = MixedContainer1610 else:1611 self.mixedclass_ = mixedclass_1612 if content_ is None:1613 self.content_ = []1614 else:1615 self.content_ = content_1616 def factory(*args_, **kwargs_):1617 if enumvalueType.subclass:1618 return enumvalueType.subclass(*args_, **kwargs_)1619 else:1620 return enumvalueType(*args_, **kwargs_)1621 factory = staticmethod(factory)1622 def get_name(self): return self.name1623 def set_name(self, name): self.name = name1624 def get_initializer(self): return self.initializer1625 def set_initializer(self, initializer): self.initializer = initializer1626 def get_briefdescription(self): return self.briefdescription1627 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription1628 def get_detaileddescription(self): return self.detaileddescription1629 def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription1630 def get_prot(self): return self.prot1631 def set_prot(self, prot): self.prot = prot1632 def get_id(self): return self.id1633 def set_id(self, id): self.id = id1634 def hasContent_(self):1635 if (1636 self.name is not None or1637 self.initializer is not None or1638 self.briefdescription is not None or1639 self.detaileddescription is not None1640 ):1641 return True1642 else:1643 return False1644 def build(self, node_):1645 attrs = node_.attributes1646 self.buildAttributes(attrs)1647 for child_ in node_.childNodes:1648 nodeName_ = child_.nodeName.split(':')[-1]1649 self.buildChildren(child_, nodeName_)1650 def buildAttributes(self, attrs):1651 if attrs.get('prot'):1652 self.prot = attrs.get('prot').value1653 if attrs.get('id'):1654 self.id = attrs.get('id').value1655 def buildChildren(self, child_, nodeName_):1656 if child_.nodeType == Node.ELEMENT_NODE and \1657 nodeName_ == 'name':1658 value_ = []1659 for text_ in child_.childNodes:1660 value_.append(text_.nodeValue)1661 valuestr_ = ''.join(value_)1662 obj_ = self.mixedclass_(MixedContainer.CategorySimple,1663 MixedContainer.TypeString, 'name', valuestr_)1664 self.content_.append(obj_)1665 elif child_.nodeType == Node.ELEMENT_NODE and \1666 nodeName_ == 'initializer':1667 childobj_ = linkedTextType.factory()1668 childobj_.build(child_)1669 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1670 MixedContainer.TypeNone, 'initializer', childobj_)1671 self.content_.append(obj_)1672 elif child_.nodeType == Node.ELEMENT_NODE and \1673 nodeName_ == 'briefdescription':1674 childobj_ = descriptionType.factory()1675 childobj_.build(child_)1676 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1677 MixedContainer.TypeNone, 'briefdescription', childobj_)1678 self.content_.append(obj_)1679 elif child_.nodeType == Node.ELEMENT_NODE and \1680 nodeName_ == 'detaileddescription':1681 childobj_ = descriptionType.factory()1682 childobj_.build(child_)1683 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1684 MixedContainer.TypeNone, 'detaileddescription', childobj_)1685 self.content_.append(obj_)1686 elif child_.nodeType == Node.TEXT_NODE:1687 obj_ = self.mixedclass_(MixedContainer.CategoryText,1688 MixedContainer.TypeNone, '', child_.nodeValue)1689 self.content_.append(obj_)1690# end class enumvalueType1691class templateparamlistType(GeneratedsSuper):1692 subclass = None1693 superclass = None1694 def __init__(self, param=None):1695 if param is None:1696 self.param = []1697 else:1698 self.param = param1699 def factory(*args_, **kwargs_):1700 if templateparamlistType.subclass:1701 return templateparamlistType.subclass(*args_, **kwargs_)1702 else:1703 return templateparamlistType(*args_, **kwargs_)1704 factory = staticmethod(factory)1705 def get_param(self): return self.param1706 def set_param(self, param): self.param = param1707 def add_param(self, value): self.param.append(value)1708 def insert_param(self, index, value): self.param[index] = value1709 def hasContent_(self):1710 if (1711 self.param is not None1712 ):1713 return True1714 else:1715 return False1716 def build(self, node_):1717 attrs = node_.attributes1718 self.buildAttributes(attrs)1719 for child_ in node_.childNodes:1720 nodeName_ = child_.nodeName.split(':')[-1]1721 self.buildChildren(child_, nodeName_)1722 def buildAttributes(self, attrs):1723 pass1724 def buildChildren(self, child_, nodeName_):1725 if child_.nodeType == Node.ELEMENT_NODE and \1726 nodeName_ == 'param':1727 obj_ = paramType.factory()1728 obj_.build(child_)1729 self.param.append(obj_)1730# end class templateparamlistType1731class paramType(GeneratedsSuper):1732 subclass = None1733 superclass = None1734 def __init__(self, type_=None, declname=None, defname=None, array=None, defval=None, briefdescription=None):1735 self.type_ = type_1736 self.declname = declname1737 self.defname = defname1738 self.array = array1739 self.defval = defval1740 self.briefdescription = briefdescription1741 def factory(*args_, **kwargs_):1742 if paramType.subclass:1743 return paramType.subclass(*args_, **kwargs_)1744 else:1745 return paramType(*args_, **kwargs_)1746 factory = staticmethod(factory)1747 def get_type(self): return self.type_1748 def set_type(self, type_): self.type_ = type_1749 def get_declname(self): return self.declname1750 def set_declname(self, declname): self.declname = declname1751 def get_defname(self): return self.defname1752 def set_defname(self, defname): self.defname = defname1753 def get_array(self): return self.array1754 def set_array(self, array): self.array = array1755 def get_defval(self): return self.defval1756 def set_defval(self, defval): self.defval = defval1757 def get_briefdescription(self): return self.briefdescription1758 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription1759 def hasContent_(self):1760 if (1761 self.type_ is not None or1762 self.declname is not None or1763 self.defname is not None or1764 self.array is not None or1765 self.defval is not None or1766 self.briefdescription is not None1767 ):1768 return True1769 else:1770 return False1771 def build(self, node_):1772 attrs = node_.attributes1773 self.buildAttributes(attrs)1774 for child_ in node_.childNodes:1775 nodeName_ = child_.nodeName.split(':')[-1]1776 self.buildChildren(child_, nodeName_)1777 def buildAttributes(self, attrs):1778 pass1779 def buildChildren(self, child_, nodeName_):1780 if child_.nodeType == Node.ELEMENT_NODE and \1781 nodeName_ == 'type':1782 obj_ = linkedTextType.factory()1783 obj_.build(child_)1784 self.set_type(obj_)1785 elif child_.nodeType == Node.ELEMENT_NODE and \1786 nodeName_ == 'declname':1787 declname_ = ''1788 for text__content_ in child_.childNodes:1789 declname_ += text__content_.nodeValue1790 self.declname = declname_1791 elif child_.nodeType == Node.ELEMENT_NODE and \1792 nodeName_ == 'defname':1793 defname_ = ''1794 for text__content_ in child_.childNodes:1795 defname_ += text__content_.nodeValue1796 self.defname = defname_1797 elif child_.nodeType == Node.ELEMENT_NODE and \1798 nodeName_ == 'array':1799 array_ = ''1800 for text__content_ in child_.childNodes:1801 array_ += text__content_.nodeValue1802 self.array = array_1803 elif child_.nodeType == Node.ELEMENT_NODE and \1804 nodeName_ == 'defval':1805 obj_ = linkedTextType.factory()1806 obj_.build(child_)1807 self.set_defval(obj_)1808 elif child_.nodeType == Node.ELEMENT_NODE and \1809 nodeName_ == 'briefdescription':1810 obj_ = descriptionType.factory()1811 obj_.build(child_)1812 self.set_briefdescription(obj_)1813# end class paramType1814class declname(GeneratedsSuper):1815 subclass = None1816 superclass = None1817 def __init__(self, valueOf_=''):1818 self.valueOf_ = valueOf_1819 def factory(*args_, **kwargs_):1820 if declname.subclass:1821 return declname.subclass(*args_, **kwargs_)1822 else:1823 return declname(*args_, **kwargs_)1824 factory = staticmethod(factory)1825 def getValueOf_(self): return self.valueOf_1826 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1827 def hasContent_(self):1828 if (1829 self.valueOf_ is not None1830 ):1831 return True1832 else:1833 return False1834 def build(self, node_):1835 attrs = node_.attributes1836 self.buildAttributes(attrs)1837 self.valueOf_ = ''1838 for child_ in node_.childNodes:1839 nodeName_ = child_.nodeName.split(':')[-1]1840 self.buildChildren(child_, nodeName_)1841 def buildAttributes(self, attrs):1842 pass1843 def buildChildren(self, child_, nodeName_):1844 if child_.nodeType == Node.TEXT_NODE:1845 self.valueOf_ += child_.nodeValue1846 elif child_.nodeType == Node.CDATA_SECTION_NODE:1847 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1848# end class declname1849class defname(GeneratedsSuper):1850 subclass = None1851 superclass = None1852 def __init__(self, valueOf_=''):1853 self.valueOf_ = valueOf_1854 def factory(*args_, **kwargs_):1855 if defname.subclass:1856 return defname.subclass(*args_, **kwargs_)1857 else:1858 return defname(*args_, **kwargs_)1859 factory = staticmethod(factory)1860 def getValueOf_(self): return self.valueOf_1861 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1862 def hasContent_(self):1863 if (1864 self.valueOf_ is not None1865 ):1866 return True1867 else:1868 return False1869 def build(self, node_):1870 attrs = node_.attributes1871 self.buildAttributes(attrs)1872 self.valueOf_ = ''1873 for child_ in node_.childNodes:1874 nodeName_ = child_.nodeName.split(':')[-1]1875 self.buildChildren(child_, nodeName_)1876 def buildAttributes(self, attrs):1877 pass1878 def buildChildren(self, child_, nodeName_):1879 if child_.nodeType == Node.TEXT_NODE:1880 self.valueOf_ += child_.nodeValue1881 elif child_.nodeType == Node.CDATA_SECTION_NODE:1882 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1883# end class defname1884class array(GeneratedsSuper):1885 subclass = None1886 superclass = None1887 def __init__(self, valueOf_=''):1888 self.valueOf_ = valueOf_1889 def factory(*args_, **kwargs_):1890 if array.subclass:1891 return array.subclass(*args_, **kwargs_)1892 else:1893 return array(*args_, **kwargs_)1894 factory = staticmethod(factory)1895 def getValueOf_(self): return self.valueOf_1896 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_1897 def hasContent_(self):1898 if (1899 self.valueOf_ is not None1900 ):1901 return True1902 else:1903 return False1904 def build(self, node_):1905 attrs = node_.attributes1906 self.buildAttributes(attrs)1907 self.valueOf_ = ''1908 for child_ in node_.childNodes:1909 nodeName_ = child_.nodeName.split(':')[-1]1910 self.buildChildren(child_, nodeName_)1911 def buildAttributes(self, attrs):1912 pass1913 def buildChildren(self, child_, nodeName_):1914 if child_.nodeType == Node.TEXT_NODE:1915 self.valueOf_ += child_.nodeValue1916 elif child_.nodeType == Node.CDATA_SECTION_NODE:1917 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'1918# end class array1919class linkedTextType(GeneratedsSuper):1920 subclass = None1921 superclass = None1922 def __init__(self, ref=None, mixedclass_=None, content_=None):1923 if mixedclass_ is None:1924 self.mixedclass_ = MixedContainer1925 else:1926 self.mixedclass_ = mixedclass_1927 if content_ is None:1928 self.content_ = []1929 else:1930 self.content_ = content_1931 def factory(*args_, **kwargs_):1932 if linkedTextType.subclass:1933 return linkedTextType.subclass(*args_, **kwargs_)1934 else:1935 return linkedTextType(*args_, **kwargs_)1936 factory = staticmethod(factory)1937 def get_ref(self): return self.ref1938 def set_ref(self, ref): self.ref = ref1939 def add_ref(self, value): self.ref.append(value)1940 def insert_ref(self, index, value): self.ref[index] = value1941 def hasContent_(self):1942 if (1943 self.ref is not None1944 ):1945 return True1946 else:1947 return False1948 def build(self, node_):1949 attrs = node_.attributes1950 self.buildAttributes(attrs)1951 for child_ in node_.childNodes:1952 nodeName_ = child_.nodeName.split(':')[-1]1953 self.buildChildren(child_, nodeName_)1954 def buildAttributes(self, attrs):1955 pass1956 def buildChildren(self, child_, nodeName_):1957 if child_.nodeType == Node.ELEMENT_NODE and \1958 nodeName_ == 'ref':1959 childobj_ = docRefTextType.factory()1960 childobj_.build(child_)1961 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,1962 MixedContainer.TypeNone, 'ref', childobj_)1963 self.content_.append(obj_)1964 elif child_.nodeType == Node.TEXT_NODE:1965 obj_ = self.mixedclass_(MixedContainer.CategoryText,1966 MixedContainer.TypeNone, '', child_.nodeValue)1967 self.content_.append(obj_)1968# end class linkedTextType1969class graphType(GeneratedsSuper):1970 subclass = None1971 superclass = None1972 def __init__(self, node=None):1973 if node is None:1974 self.node = []1975 else:1976 self.node = node1977 def factory(*args_, **kwargs_):1978 if graphType.subclass:1979 return graphType.subclass(*args_, **kwargs_)1980 else:1981 return graphType(*args_, **kwargs_)1982 factory = staticmethod(factory)1983 def get_node(self): return self.node1984 def set_node(self, node): self.node = node1985 def add_node(self, value): self.node.append(value)1986 def insert_node(self, index, value): self.node[index] = value1987 def hasContent_(self):1988 if (1989 self.node is not None1990 ):1991 return True1992 else:1993 return False1994 def build(self, node_):1995 attrs = node_.attributes1996 self.buildAttributes(attrs)1997 for child_ in node_.childNodes:1998 nodeName_ = child_.nodeName.split(':')[-1]1999 self.buildChildren(child_, nodeName_)2000 def buildAttributes(self, attrs):2001 pass2002 def buildChildren(self, child_, nodeName_):2003 if child_.nodeType == Node.ELEMENT_NODE and \2004 nodeName_ == 'node':2005 obj_ = nodeType.factory()2006 obj_.build(child_)2007 self.node.append(obj_)2008# end class graphType2009class nodeType(GeneratedsSuper):2010 subclass = None2011 superclass = None2012 def __init__(self, id=None, label=None, link=None, childnode=None):2013 self.id = id2014 self.label = label2015 self.link = link2016 if childnode is None:2017 self.childnode = []2018 else:2019 self.childnode = childnode2020 def factory(*args_, **kwargs_):2021 if nodeType.subclass:2022 return nodeType.subclass(*args_, **kwargs_)2023 else:2024 return nodeType(*args_, **kwargs_)2025 factory = staticmethod(factory)2026 def get_label(self): return self.label2027 def set_label(self, label): self.label = label2028 def get_link(self): return self.link2029 def set_link(self, link): self.link = link2030 def get_childnode(self): return self.childnode2031 def set_childnode(self, childnode): self.childnode = childnode2032 def add_childnode(self, value): self.childnode.append(value)2033 def insert_childnode(self, index, value): self.childnode[index] = value2034 def get_id(self): return self.id2035 def set_id(self, id): self.id = id2036 def hasContent_(self):2037 if (2038 self.label is not None or2039 self.link is not None or2040 self.childnode is not None2041 ):2042 return True2043 else:2044 return False2045 def build(self, node_):2046 attrs = node_.attributes2047 self.buildAttributes(attrs)2048 for child_ in node_.childNodes:2049 nodeName_ = child_.nodeName.split(':')[-1]2050 self.buildChildren(child_, nodeName_)2051 def buildAttributes(self, attrs):2052 if attrs.get('id'):2053 self.id = attrs.get('id').value2054 def buildChildren(self, child_, nodeName_):2055 if child_.nodeType == Node.ELEMENT_NODE and \2056 nodeName_ == 'label':2057 label_ = ''2058 for text__content_ in child_.childNodes:2059 label_ += text__content_.nodeValue2060 self.label = label_2061 elif child_.nodeType == Node.ELEMENT_NODE and \2062 nodeName_ == 'link':2063 obj_ = linkType.factory()2064 obj_.build(child_)2065 self.set_link(obj_)2066 elif child_.nodeType == Node.ELEMENT_NODE and \2067 nodeName_ == 'childnode':2068 obj_ = childnodeType.factory()2069 obj_.build(child_)2070 self.childnode.append(obj_)2071# end class nodeType2072class label(GeneratedsSuper):2073 subclass = None2074 superclass = None2075 def __init__(self, valueOf_=''):2076 self.valueOf_ = valueOf_2077 def factory(*args_, **kwargs_):2078 if label.subclass:2079 return label.subclass(*args_, **kwargs_)2080 else:2081 return label(*args_, **kwargs_)2082 factory = staticmethod(factory)2083 def getValueOf_(self): return self.valueOf_2084 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_2085 def hasContent_(self):2086 if (2087 self.valueOf_ is not None2088 ):2089 return True2090 else:2091 return False2092 def build(self, node_):2093 attrs = node_.attributes2094 self.buildAttributes(attrs)2095 self.valueOf_ = ''2096 for child_ in node_.childNodes:2097 nodeName_ = child_.nodeName.split(':')[-1]2098 self.buildChildren(child_, nodeName_)2099 def buildAttributes(self, attrs):2100 pass2101 def buildChildren(self, child_, nodeName_):2102 if child_.nodeType == Node.TEXT_NODE:2103 self.valueOf_ += child_.nodeValue2104 elif child_.nodeType == Node.CDATA_SECTION_NODE:2105 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'2106# end class label2107class childnodeType(GeneratedsSuper):2108 subclass = None2109 superclass = None2110 def __init__(self, relation=None, refid=None, edgelabel=None):2111 self.relation = relation2112 self.refid = refid2113 if edgelabel is None:2114 self.edgelabel = []2115 else:2116 self.edgelabel = edgelabel2117 def factory(*args_, **kwargs_):2118 if childnodeType.subclass:2119 return childnodeType.subclass(*args_, **kwargs_)2120 else:2121 return childnodeType(*args_, **kwargs_)2122 factory = staticmethod(factory)2123 def get_edgelabel(self): return self.edgelabel2124 def set_edgelabel(self, edgelabel): self.edgelabel = edgelabel2125 def add_edgelabel(self, value): self.edgelabel.append(value)2126 def insert_edgelabel(self, index, value): self.edgelabel[index] = value2127 def get_relation(self): return self.relation2128 def set_relation(self, relation): self.relation = relation2129 def get_refid(self): return self.refid2130 def set_refid(self, refid): self.refid = refid2131 def export(self, outfile, level, namespace_='', name_='childnodeType', namespacedef_=''):2132 showIndent(outfile, level)2133 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2134 self.exportAttributes(outfile, level, namespace_, name_='childnodeType')2135 if self.hasContent_():2136 outfile.write('>\n')2137 self.exportChildren(outfile, level + 1, namespace_, name_)2138 showIndent(outfile, level)2139 outfile.write('</%s%s>\n' % (namespace_, name_))2140 else:2141 outfile.write(' />\n')2142 def exportAttributes(self, outfile, level, namespace_='', name_='childnodeType'):2143 if self.relation is not None:2144 outfile.write(' relation=%s' % (quote_attrib(self.relation), ))2145 if self.refid is not None:2146 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), ))2147 def exportChildren(self, outfile, level, namespace_='', name_='childnodeType'):2148 for edgelabel_ in self.edgelabel:2149 showIndent(outfile, level)2150 outfile.write('<%sedgelabel>%s</%sedgelabel>\n' % (namespace_, self.format_string(quote_xml(edgelabel_).encode(ExternalEncoding), input_name='edgelabel'), namespace_))2151 def hasContent_(self):2152 if (2153 self.edgelabel is not None2154 ):2155 return True2156 else:2157 return False2158 def build(self, node_):2159 attrs = node_.attributes2160 self.buildAttributes(attrs)2161 for child_ in node_.childNodes:2162 nodeName_ = child_.nodeName.split(':')[-1]2163 self.buildChildren(child_, nodeName_)2164 def buildAttributes(self, attrs):2165 if attrs.get('relation'):2166 self.relation = attrs.get('relation').value2167 if attrs.get('refid'):2168 self.refid = attrs.get('refid').value2169 def buildChildren(self, child_, nodeName_):2170 if child_.nodeType == Node.ELEMENT_NODE and \2171 nodeName_ == 'edgelabel':2172 edgelabel_ = ''2173 for text__content_ in child_.childNodes:2174 edgelabel_ += text__content_.nodeValue2175 self.edgelabel.append(edgelabel_)2176# end class childnodeType2177class edgelabel(GeneratedsSuper):2178 subclass = None2179 superclass = None2180 def __init__(self, valueOf_=''):2181 self.valueOf_ = valueOf_2182 def factory(*args_, **kwargs_):2183 if edgelabel.subclass:2184 return edgelabel.subclass(*args_, **kwargs_)2185 else:2186 return edgelabel(*args_, **kwargs_)2187 factory = staticmethod(factory)2188 def getValueOf_(self): return self.valueOf_2189 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_2190 def export(self, outfile, level, namespace_='', name_='edgelabel', namespacedef_=''):2191 showIndent(outfile, level)2192 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2193 self.exportAttributes(outfile, level, namespace_, name_='edgelabel')2194 if self.hasContent_():2195 outfile.write('>\n')2196 self.exportChildren(outfile, level + 1, namespace_, name_)2197 showIndent(outfile, level)2198 outfile.write('</%s%s>\n' % (namespace_, name_))2199 else:2200 outfile.write(' />\n')2201 def exportAttributes(self, outfile, level, namespace_='', name_='edgelabel'):2202 pass2203 def exportChildren(self, outfile, level, namespace_='', name_='edgelabel'):2204 if self.valueOf_.find('![CDATA')>-1:2205 value=quote_xml('%s' % self.valueOf_)2206 value=value.replace('![CDATA','<![CDATA')2207 value=value.replace(']]',']]>')2208 outfile.write(value)2209 else:2210 outfile.write(quote_xml('%s' % self.valueOf_))2211 def hasContent_(self):2212 if (2213 self.valueOf_ is not None2214 ):2215 return True2216 else:2217 return False2218 def build(self, node_):2219 attrs = node_.attributes2220 self.buildAttributes(attrs)2221 self.valueOf_ = ''2222 for child_ in node_.childNodes:2223 nodeName_ = child_.nodeName.split(':')[-1]2224 self.buildChildren(child_, nodeName_)2225 def buildAttributes(self, attrs):2226 pass2227 def buildChildren(self, child_, nodeName_):2228 if child_.nodeType == Node.TEXT_NODE:2229 self.valueOf_ += child_.nodeValue2230 elif child_.nodeType == Node.CDATA_SECTION_NODE:2231 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'2232# end class edgelabel2233class linkType(GeneratedsSuper):2234 subclass = None2235 superclass = None2236 def __init__(self, refid=None, external=None, valueOf_=''):2237 self.refid = refid2238 self.external = external2239 self.valueOf_ = valueOf_2240 def factory(*args_, **kwargs_):2241 if linkType.subclass:2242 return linkType.subclass(*args_, **kwargs_)2243 else:2244 return linkType(*args_, **kwargs_)2245 factory = staticmethod(factory)2246 def get_refid(self): return self.refid2247 def set_refid(self, refid): self.refid = refid2248 def get_external(self): return self.external2249 def set_external(self, external): self.external = external2250 def getValueOf_(self): return self.valueOf_2251 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_2252 def export(self, outfile, level, namespace_='', name_='linkType', namespacedef_=''):2253 showIndent(outfile, level)2254 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2255 self.exportAttributes(outfile, level, namespace_, name_='linkType')2256 if self.hasContent_():2257 outfile.write('>\n')2258 self.exportChildren(outfile, level + 1, namespace_, name_)2259 showIndent(outfile, level)2260 outfile.write('</%s%s>\n' % (namespace_, name_))2261 else:2262 outfile.write(' />\n')2263 def exportAttributes(self, outfile, level, namespace_='', name_='linkType'):2264 if self.refid is not None:2265 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), ))2266 if self.external is not None:2267 outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), ))2268 def exportChildren(self, outfile, level, namespace_='', name_='linkType'):2269 if self.valueOf_.find('![CDATA')>-1:2270 value=quote_xml('%s' % self.valueOf_)2271 value=value.replace('![CDATA','<![CDATA')2272 value=value.replace(']]',']]>')2273 outfile.write(value)2274 else:2275 outfile.write(quote_xml('%s' % self.valueOf_))2276 def hasContent_(self):2277 if (2278 self.valueOf_ is not None2279 ):2280 return True2281 else:2282 return False2283 def build(self, node_):2284 attrs = node_.attributes2285 self.buildAttributes(attrs)2286 self.valueOf_ = ''2287 for child_ in node_.childNodes:2288 nodeName_ = child_.nodeName.split(':')[-1]2289 self.buildChildren(child_, nodeName_)2290 def buildAttributes(self, attrs):2291 if attrs.get('refid'):2292 self.refid = attrs.get('refid').value2293 if attrs.get('external'):2294 self.external = attrs.get('external').value2295 def buildChildren(self, child_, nodeName_):2296 if child_.nodeType == Node.TEXT_NODE:2297 self.valueOf_ += child_.nodeValue2298 elif child_.nodeType == Node.CDATA_SECTION_NODE:2299 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'2300# end class linkType2301class listingType(GeneratedsSuper):2302 subclass = None2303 superclass = None2304 def __init__(self, codeline=None):2305 if codeline is None:2306 self.codeline = []2307 else:2308 self.codeline = codeline2309 def factory(*args_, **kwargs_):2310 if listingType.subclass:2311 return listingType.subclass(*args_, **kwargs_)2312 else:2313 return listingType(*args_, **kwargs_)2314 factory = staticmethod(factory)2315 def get_codeline(self): return self.codeline2316 def set_codeline(self, codeline): self.codeline = codeline2317 def add_codeline(self, value): self.codeline.append(value)2318 def insert_codeline(self, index, value): self.codeline[index] = value2319 def export(self, outfile, level, namespace_='', name_='listingType', namespacedef_=''):2320 showIndent(outfile, level)2321 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2322 self.exportAttributes(outfile, level, namespace_, name_='listingType')2323 if self.hasContent_():2324 outfile.write('>\n')2325 self.exportChildren(outfile, level + 1, namespace_, name_)2326 showIndent(outfile, level)2327 outfile.write('</%s%s>\n' % (namespace_, name_))2328 else:2329 outfile.write(' />\n')2330 def exportAttributes(self, outfile, level, namespace_='', name_='listingType'):2331 pass2332 def exportChildren(self, outfile, level, namespace_='', name_='listingType'):2333 for codeline_ in self.codeline:2334 codeline_.export(outfile, level, namespace_, name_='codeline')2335 def hasContent_(self):2336 if (2337 self.codeline is not None2338 ):2339 return True2340 else:2341 return False2342 def build(self, node_):2343 attrs = node_.attributes2344 self.buildAttributes(attrs)2345 for child_ in node_.childNodes:2346 nodeName_ = child_.nodeName.split(':')[-1]2347 self.buildChildren(child_, nodeName_)2348 def buildAttributes(self, attrs):2349 pass2350 def buildChildren(self, child_, nodeName_):2351 if child_.nodeType == Node.ELEMENT_NODE and \2352 nodeName_ == 'codeline':2353 obj_ = codelineType.factory()2354 obj_.build(child_)2355 self.codeline.append(obj_)2356# end class listingType2357class codelineType(GeneratedsSuper):2358 subclass = None2359 superclass = None2360 def __init__(self, external=None, lineno=None, refkind=None, refid=None, highlight=None):2361 self.external = external2362 self.lineno = lineno2363 self.refkind = refkind2364 self.refid = refid2365 if highlight is None:2366 self.highlight = []2367 else:2368 self.highlight = highlight2369 def factory(*args_, **kwargs_):2370 if codelineType.subclass:2371 return codelineType.subclass(*args_, **kwargs_)2372 else:2373 return codelineType(*args_, **kwargs_)2374 factory = staticmethod(factory)2375 def get_highlight(self): return self.highlight2376 def set_highlight(self, highlight): self.highlight = highlight2377 def add_highlight(self, value): self.highlight.append(value)2378 def insert_highlight(self, index, value): self.highlight[index] = value2379 def get_external(self): return self.external2380 def set_external(self, external): self.external = external2381 def get_lineno(self): return self.lineno2382 def set_lineno(self, lineno): self.lineno = lineno2383 def get_refkind(self): return self.refkind2384 def set_refkind(self, refkind): self.refkind = refkind2385 def get_refid(self): return self.refid2386 def set_refid(self, refid): self.refid = refid2387 def export(self, outfile, level, namespace_='', name_='codelineType', namespacedef_=''):2388 showIndent(outfile, level)2389 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2390 self.exportAttributes(outfile, level, namespace_, name_='codelineType')2391 if self.hasContent_():2392 outfile.write('>\n')2393 self.exportChildren(outfile, level + 1, namespace_, name_)2394 showIndent(outfile, level)2395 outfile.write('</%s%s>\n' % (namespace_, name_))2396 else:2397 outfile.write(' />\n')2398 def exportAttributes(self, outfile, level, namespace_='', name_='codelineType'):2399 if self.external is not None:2400 outfile.write(' external=%s' % (quote_attrib(self.external), ))2401 if self.lineno is not None:2402 outfile.write(' lineno="%s"' % self.format_integer(self.lineno, input_name='lineno'))2403 if self.refkind is not None:2404 outfile.write(' refkind=%s' % (quote_attrib(self.refkind), ))2405 if self.refid is not None:2406 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), ))2407 def exportChildren(self, outfile, level, namespace_='', name_='codelineType'):2408 for highlight_ in self.highlight:2409 highlight_.export(outfile, level, namespace_, name_='highlight')2410 def hasContent_(self):2411 if (2412 self.highlight is not None2413 ):2414 return True2415 else:2416 return False2417 def build(self, node_):2418 attrs = node_.attributes2419 self.buildAttributes(attrs)2420 for child_ in node_.childNodes:2421 nodeName_ = child_.nodeName.split(':')[-1]2422 self.buildChildren(child_, nodeName_)2423 def buildAttributes(self, attrs):2424 if attrs.get('external'):2425 self.external = attrs.get('external').value2426 if attrs.get('lineno'):2427 try:2428 self.lineno = int(attrs.get('lineno').value)2429 except ValueError as exp:2430 raise ValueError('Bad integer attribute (lineno): %s' % exp)2431 if attrs.get('refkind'):2432 self.refkind = attrs.get('refkind').value2433 if attrs.get('refid'):2434 self.refid = attrs.get('refid').value2435 def buildChildren(self, child_, nodeName_):2436 if child_.nodeType == Node.ELEMENT_NODE and \2437 nodeName_ == 'highlight':2438 obj_ = highlightType.factory()2439 obj_.build(child_)2440 self.highlight.append(obj_)2441# end class codelineType2442class highlightType(GeneratedsSuper):2443 subclass = None2444 superclass = None2445 def __init__(self, classxx=None, sp=None, ref=None, mixedclass_=None, content_=None):2446 self.classxx = classxx2447 if mixedclass_ is None:2448 self.mixedclass_ = MixedContainer2449 else:2450 self.mixedclass_ = mixedclass_2451 if content_ is None:2452 self.content_ = []2453 else:2454 self.content_ = content_2455 def factory(*args_, **kwargs_):2456 if highlightType.subclass:2457 return highlightType.subclass(*args_, **kwargs_)2458 else:2459 return highlightType(*args_, **kwargs_)2460 factory = staticmethod(factory)2461 def get_sp(self): return self.sp2462 def set_sp(self, sp): self.sp = sp2463 def add_sp(self, value): self.sp.append(value)2464 def insert_sp(self, index, value): self.sp[index] = value2465 def get_ref(self): return self.ref2466 def set_ref(self, ref): self.ref = ref2467 def add_ref(self, value): self.ref.append(value)2468 def insert_ref(self, index, value): self.ref[index] = value2469 def get_class(self): return self.classxx2470 def set_class(self, classxx): self.classxx = classxx2471 def export(self, outfile, level, namespace_='', name_='highlightType', namespacedef_=''):2472 showIndent(outfile, level)2473 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2474 self.exportAttributes(outfile, level, namespace_, name_='highlightType')2475 outfile.write('>')2476 self.exportChildren(outfile, level + 1, namespace_, name_)2477 outfile.write('</%s%s>\n' % (namespace_, name_))2478 def exportAttributes(self, outfile, level, namespace_='', name_='highlightType'):2479 if self.classxx is not None:2480 outfile.write(' class=%s' % (quote_attrib(self.classxx), ))2481 def exportChildren(self, outfile, level, namespace_='', name_='highlightType'):2482 for item_ in self.content_:2483 item_.export(outfile, level, item_.name, namespace_)2484 def hasContent_(self):2485 if (2486 self.sp is not None or2487 self.ref is not None2488 ):2489 return True2490 else:2491 return False2492 def build(self, node_):2493 attrs = node_.attributes2494 self.buildAttributes(attrs)2495 for child_ in node_.childNodes:2496 nodeName_ = child_.nodeName.split(':')[-1]2497 self.buildChildren(child_, nodeName_)2498 def buildAttributes(self, attrs):2499 if attrs.get('class'):2500 self.classxx = attrs.get('class').value2501 def buildChildren(self, child_, nodeName_):2502 if child_.nodeType == Node.ELEMENT_NODE and \2503 nodeName_ == 'sp':2504 value_ = []2505 for text_ in child_.childNodes:2506 value_.append(text_.nodeValue)2507 # We make this unicode so that our unicode renderer catch-all picks it up2508 # otherwise it would go through as 'str' and we'd have to pick it up too2509 valuestr_ = u' '2510 obj_ = self.mixedclass_(MixedContainer.CategorySimple,2511 MixedContainer.TypeString, 'sp', valuestr_)2512 self.content_.append(obj_)2513 elif child_.nodeType == Node.ELEMENT_NODE and \2514 nodeName_ == 'ref':2515 childobj_ = docRefTextType.factory()2516 childobj_.build(child_)2517 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2518 MixedContainer.TypeNone, 'ref', childobj_)2519 self.content_.append(obj_)2520 elif child_.nodeType == Node.TEXT_NODE:2521 obj_ = self.mixedclass_(MixedContainer.CategoryText,2522 MixedContainer.TypeNone, '', child_.nodeValue)2523 self.content_.append(obj_)2524# end class highlightType2525class sp(GeneratedsSuper):2526 subclass = None2527 superclass = None2528 def __init__(self, valueOf_=''):2529 self.valueOf_ = valueOf_2530 def factory(*args_, **kwargs_):2531 if sp.subclass:2532 return sp.subclass(*args_, **kwargs_)2533 else:2534 return sp(*args_, **kwargs_)2535 factory = staticmethod(factory)2536 def getValueOf_(self): return self.valueOf_2537 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_2538 def export(self, outfile, level, namespace_='', name_='sp', namespacedef_=''):2539 showIndent(outfile, level)2540 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2541 self.exportAttributes(outfile, level, namespace_, name_='sp')2542 if self.hasContent_():2543 outfile.write('>\n')2544 self.exportChildren(outfile, level + 1, namespace_, name_)2545 showIndent(outfile, level)2546 outfile.write('</%s%s>\n' % (namespace_, name_))2547 else:2548 outfile.write(' />\n')2549 def exportAttributes(self, outfile, level, namespace_='', name_='sp'):2550 pass2551 def exportChildren(self, outfile, level, namespace_='', name_='sp'):2552 if self.valueOf_.find('![CDATA')>-1:2553 value=quote_xml('%s' % self.valueOf_)2554 value=value.replace('![CDATA','<![CDATA')2555 value=value.replace(']]',']]>')2556 outfile.write(value)2557 else:2558 outfile.write(quote_xml('%s' % self.valueOf_))2559 def hasContent_(self):2560 if (2561 self.valueOf_ is not None2562 ):2563 return True2564 else:2565 return False2566 def build(self, node_):2567 attrs = node_.attributes2568 self.buildAttributes(attrs)2569 self.valueOf_ = ''2570 for child_ in node_.childNodes:2571 nodeName_ = child_.nodeName.split(':')[-1]2572 self.buildChildren(child_, nodeName_)2573 def buildAttributes(self, attrs):2574 pass2575 def buildChildren(self, child_, nodeName_):2576 if child_.nodeType == Node.TEXT_NODE:2577 self.valueOf_ += child_.nodeValue2578 elif child_.nodeType == Node.CDATA_SECTION_NODE:2579 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'2580# end class sp2581class referenceType(GeneratedsSuper):2582 subclass = None2583 superclass = None2584 def __init__(self, endline=None, startline=None, refid=None, compoundref=None, valueOf_='', mixedclass_=None, content_=None):2585 self.endline = endline2586 self.startline = startline2587 self.refid = refid2588 self.compoundref = compoundref2589 if mixedclass_ is None:2590 self.mixedclass_ = MixedContainer2591 else:2592 self.mixedclass_ = mixedclass_2593 if content_ is None:2594 self.content_ = []2595 else:2596 self.content_ = content_2597 def factory(*args_, **kwargs_):2598 if referenceType.subclass:2599 return referenceType.subclass(*args_, **kwargs_)2600 else:2601 return referenceType(*args_, **kwargs_)2602 factory = staticmethod(factory)2603 def get_endline(self): return self.endline2604 def set_endline(self, endline): self.endline = endline2605 def get_startline(self): return self.startline2606 def set_startline(self, startline): self.startline = startline2607 def get_refid(self): return self.refid2608 def set_refid(self, refid): self.refid = refid2609 def get_compoundref(self): return self.compoundref2610 def set_compoundref(self, compoundref): self.compoundref = compoundref2611 def getValueOf_(self): return self.valueOf_2612 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_2613 def export(self, outfile, level, namespace_='', name_='referenceType', namespacedef_=''):2614 showIndent(outfile, level)2615 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2616 self.exportAttributes(outfile, level, namespace_, name_='referenceType')2617 outfile.write('>')2618 self.exportChildren(outfile, level + 1, namespace_, name_)2619 outfile.write('</%s%s>\n' % (namespace_, name_))2620 def exportAttributes(self, outfile, level, namespace_='', name_='referenceType'):2621 if self.endline is not None:2622 outfile.write(' endline="%s"' % self.format_integer(self.endline, input_name='endline'))2623 if self.startline is not None:2624 outfile.write(' startline="%s"' % self.format_integer(self.startline, input_name='startline'))2625 if self.refid is not None:2626 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), ))2627 if self.compoundref is not None:2628 outfile.write(' compoundref=%s' % (self.format_string(quote_attrib(self.compoundref).encode(ExternalEncoding), input_name='compoundref'), ))2629 def exportChildren(self, outfile, level, namespace_='', name_='referenceType'):2630 if self.valueOf_.find('![CDATA')>-1:2631 value=quote_xml('%s' % self.valueOf_)2632 value=value.replace('![CDATA','<![CDATA')2633 value=value.replace(']]',']]>')2634 outfile.write(value)2635 else:2636 outfile.write(quote_xml('%s' % self.valueOf_))2637 def hasContent_(self):2638 if (2639 self.valueOf_ is not None2640 ):2641 return True2642 else:2643 return False2644 def build(self, node_):2645 attrs = node_.attributes2646 self.buildAttributes(attrs)2647 self.valueOf_ = ''2648 for child_ in node_.childNodes:2649 nodeName_ = child_.nodeName.split(':')[-1]2650 self.buildChildren(child_, nodeName_)2651 def buildAttributes(self, attrs):2652 if attrs.get('endline'):2653 try:2654 self.endline = int(attrs.get('endline').value)2655 except ValueError as exp:2656 raise ValueError('Bad integer attribute (endline): %s' % exp)2657 if attrs.get('startline'):2658 try:2659 self.startline = int(attrs.get('startline').value)2660 except ValueError as exp:2661 raise ValueError('Bad integer attribute (startline): %s' % exp)2662 if attrs.get('refid'):2663 self.refid = attrs.get('refid').value2664 if attrs.get('compoundref'):2665 self.compoundref = attrs.get('compoundref').value2666 def buildChildren(self, child_, nodeName_):2667 if child_.nodeType == Node.TEXT_NODE:2668 obj_ = self.mixedclass_(MixedContainer.CategoryText,2669 MixedContainer.TypeNone, '', child_.nodeValue)2670 self.content_.append(obj_)2671 if child_.nodeType == Node.TEXT_NODE:2672 self.valueOf_ += child_.nodeValue2673 elif child_.nodeType == Node.CDATA_SECTION_NODE:2674 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'2675# end class referenceType2676class locationType(GeneratedsSuper):2677 subclass = None2678 superclass = None2679 def __init__(self, bodystart=None, line=None, bodyend=None, bodyfile=None, file=None, valueOf_=''):2680 self.bodystart = bodystart2681 self.line = line2682 self.bodyend = bodyend2683 self.bodyfile = bodyfile2684 self.file = file2685 self.valueOf_ = valueOf_2686 def factory(*args_, **kwargs_):2687 if locationType.subclass:2688 return locationType.subclass(*args_, **kwargs_)2689 else:2690 return locationType(*args_, **kwargs_)2691 factory = staticmethod(factory)2692 def get_bodystart(self): return self.bodystart2693 def set_bodystart(self, bodystart): self.bodystart = bodystart2694 def get_line(self): return self.line2695 def set_line(self, line): self.line = line2696 def get_bodyend(self): return self.bodyend2697 def set_bodyend(self, bodyend): self.bodyend = bodyend2698 def get_bodyfile(self): return self.bodyfile2699 def set_bodyfile(self, bodyfile): self.bodyfile = bodyfile2700 def get_file(self): return self.file2701 def set_file(self, file): self.file = file2702 def getValueOf_(self): return self.valueOf_2703 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_2704 def export(self, outfile, level, namespace_='', name_='locationType', namespacedef_=''):2705 showIndent(outfile, level)2706 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2707 self.exportAttributes(outfile, level, namespace_, name_='locationType')2708 if self.hasContent_():2709 outfile.write('>\n')2710 self.exportChildren(outfile, level + 1, namespace_, name_)2711 showIndent(outfile, level)2712 outfile.write('</%s%s>\n' % (namespace_, name_))2713 else:2714 outfile.write(' />\n')2715 def exportAttributes(self, outfile, level, namespace_='', name_='locationType'):2716 if self.bodystart is not None:2717 outfile.write(' bodystart="%s"' % self.format_integer(self.bodystart, input_name='bodystart'))2718 if self.line is not None:2719 outfile.write(' line="%s"' % self.format_integer(self.line, input_name='line'))2720 if self.bodyend is not None:2721 outfile.write(' bodyend="%s"' % self.format_integer(self.bodyend, input_name='bodyend'))2722 if self.bodyfile is not None:2723 outfile.write(' bodyfile=%s' % (self.format_string(quote_attrib(self.bodyfile).encode(ExternalEncoding), input_name='bodyfile'), ))2724 if self.file is not None:2725 outfile.write(' file=%s' % (self.format_string(quote_attrib(self.file).encode(ExternalEncoding), input_name='file'), ))2726 def exportChildren(self, outfile, level, namespace_='', name_='locationType'):2727 if self.valueOf_.find('![CDATA')>-1:2728 value=quote_xml('%s' % self.valueOf_)2729 value=value.replace('![CDATA','<![CDATA')2730 value=value.replace(']]',']]>')2731 outfile.write(value)2732 else:2733 outfile.write(quote_xml('%s' % self.valueOf_))2734 def hasContent_(self):2735 if (2736 self.valueOf_ is not None2737 ):2738 return True2739 else:2740 return False2741 def build(self, node_):2742 attrs = node_.attributes2743 self.buildAttributes(attrs)2744 self.valueOf_ = ''2745 for child_ in node_.childNodes:2746 nodeName_ = child_.nodeName.split(':')[-1]2747 self.buildChildren(child_, nodeName_)2748 def buildAttributes(self, attrs):2749 if attrs.get('bodystart'):2750 try:2751 self.bodystart = int(attrs.get('bodystart').value)2752 except ValueError as exp:2753 raise ValueError('Bad integer attribute (bodystart): %s' % exp)2754 if attrs.get('line'):2755 try:2756 self.line = int(attrs.get('line').value)2757 except ValueError as exp:2758 raise ValueError('Bad integer attribute (line): %s' % exp)2759 if attrs.get('bodyend'):2760 try:2761 self.bodyend = int(attrs.get('bodyend').value)2762 except ValueError as exp:2763 raise ValueError('Bad integer attribute (bodyend): %s' % exp)2764 if attrs.get('bodyfile'):2765 self.bodyfile = attrs.get('bodyfile').value2766 if attrs.get('file'):2767 self.file = attrs.get('file').value2768 def buildChildren(self, child_, nodeName_):2769 if child_.nodeType == Node.TEXT_NODE:2770 self.valueOf_ += child_.nodeValue2771 elif child_.nodeType == Node.CDATA_SECTION_NODE:2772 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'2773# end class locationType2774class docSect1Type(GeneratedsSuper):2775 subclass = None2776 superclass = None2777 def __init__(self, id=None, title=None, para=None, sect2=None, internal=None, mixedclass_=None, content_=None):2778 self.id = id2779 if mixedclass_ is None:2780 self.mixedclass_ = MixedContainer2781 else:2782 self.mixedclass_ = mixedclass_2783 if content_ is None:2784 self.content_ = []2785 else:2786 self.content_ = content_2787 def factory(*args_, **kwargs_):2788 if docSect1Type.subclass:2789 return docSect1Type.subclass(*args_, **kwargs_)2790 else:2791 return docSect1Type(*args_, **kwargs_)2792 factory = staticmethod(factory)2793 def get_title(self): return self.title2794 def set_title(self, title): self.title = title2795 def get_para(self): return self.para2796 def set_para(self, para): self.para = para2797 def add_para(self, value): self.para.append(value)2798 def insert_para(self, index, value): self.para[index] = value2799 def get_sect2(self): return self.sect22800 def set_sect2(self, sect2): self.sect2 = sect22801 def add_sect2(self, value): self.sect2.append(value)2802 def insert_sect2(self, index, value): self.sect2[index] = value2803 def get_internal(self): return self.internal2804 def set_internal(self, internal): self.internal = internal2805 def get_id(self): return self.id2806 def set_id(self, id): self.id = id2807 def export(self, outfile, level, namespace_='', name_='docSect1Type', namespacedef_=''):2808 showIndent(outfile, level)2809 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2810 self.exportAttributes(outfile, level, namespace_, name_='docSect1Type')2811 outfile.write('>')2812 self.exportChildren(outfile, level + 1, namespace_, name_)2813 outfile.write('</%s%s>\n' % (namespace_, name_))2814 def exportAttributes(self, outfile, level, namespace_='', name_='docSect1Type'):2815 if self.id is not None:2816 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))2817 def exportChildren(self, outfile, level, namespace_='', name_='docSect1Type'):2818 for item_ in self.content_:2819 item_.export(outfile, level, item_.name, namespace_)2820 def hasContent_(self):2821 if (2822 self.title is not None or2823 self.para is not None or2824 self.sect2 is not None or2825 self.internal is not None2826 ):2827 return True2828 else:2829 return False2830 def build(self, node_):2831 attrs = node_.attributes2832 self.buildAttributes(attrs)2833 for child_ in node_.childNodes:2834 nodeName_ = child_.nodeName.split(':')[-1]2835 self.buildChildren(child_, nodeName_)2836 def buildAttributes(self, attrs):2837 if attrs.get('id'):2838 self.id = attrs.get('id').value2839 def buildChildren(self, child_, nodeName_):2840 if child_.nodeType == Node.ELEMENT_NODE and \2841 nodeName_ == 'title':2842 childobj_ = docTitleType.factory()2843 childobj_.build(child_)2844 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2845 MixedContainer.TypeNone, 'title', childobj_)2846 self.content_.append(obj_)2847 elif child_.nodeType == Node.ELEMENT_NODE and \2848 nodeName_ == 'para':2849 childobj_ = docParaType.factory()2850 childobj_.build(child_)2851 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2852 MixedContainer.TypeNone, 'para', childobj_)2853 self.content_.append(obj_)2854 elif child_.nodeType == Node.ELEMENT_NODE and \2855 nodeName_ == 'sect2':2856 childobj_ = docSect2Type.factory()2857 childobj_.build(child_)2858 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2859 MixedContainer.TypeNone, 'sect2', childobj_)2860 self.content_.append(obj_)2861 elif child_.nodeType == Node.ELEMENT_NODE and \2862 nodeName_ == 'internal':2863 childobj_ = docInternalS1Type.factory()2864 childobj_.build(child_)2865 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2866 MixedContainer.TypeNone, 'internal', childobj_)2867 self.content_.append(obj_)2868 elif child_.nodeType == Node.TEXT_NODE:2869 obj_ = self.mixedclass_(MixedContainer.CategoryText,2870 MixedContainer.TypeNone, '', child_.nodeValue)2871 self.content_.append(obj_)2872# end class docSect1Type2873class docSect2Type(GeneratedsSuper):2874 subclass = None2875 superclass = None2876 def __init__(self, id=None, title=None, para=None, sect3=None, internal=None, mixedclass_=None, content_=None):2877 self.id = id2878 if mixedclass_ is None:2879 self.mixedclass_ = MixedContainer2880 else:2881 self.mixedclass_ = mixedclass_2882 if content_ is None:2883 self.content_ = []2884 else:2885 self.content_ = content_2886 def factory(*args_, **kwargs_):2887 if docSect2Type.subclass:2888 return docSect2Type.subclass(*args_, **kwargs_)2889 else:2890 return docSect2Type(*args_, **kwargs_)2891 factory = staticmethod(factory)2892 def get_title(self): return self.title2893 def set_title(self, title): self.title = title2894 def get_para(self): return self.para2895 def set_para(self, para): self.para = para2896 def add_para(self, value): self.para.append(value)2897 def insert_para(self, index, value): self.para[index] = value2898 def get_sect3(self): return self.sect32899 def set_sect3(self, sect3): self.sect3 = sect32900 def add_sect3(self, value): self.sect3.append(value)2901 def insert_sect3(self, index, value): self.sect3[index] = value2902 def get_internal(self): return self.internal2903 def set_internal(self, internal): self.internal = internal2904 def get_id(self): return self.id2905 def set_id(self, id): self.id = id2906 def export(self, outfile, level, namespace_='', name_='docSect2Type', namespacedef_=''):2907 showIndent(outfile, level)2908 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))2909 self.exportAttributes(outfile, level, namespace_, name_='docSect2Type')2910 outfile.write('>')2911 self.exportChildren(outfile, level + 1, namespace_, name_)2912 outfile.write('</%s%s>\n' % (namespace_, name_))2913 def exportAttributes(self, outfile, level, namespace_='', name_='docSect2Type'):2914 if self.id is not None:2915 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))2916 def exportChildren(self, outfile, level, namespace_='', name_='docSect2Type'):2917 for item_ in self.content_:2918 item_.export(outfile, level, item_.name, namespace_)2919 def hasContent_(self):2920 if (2921 self.title is not None or2922 self.para is not None or2923 self.sect3 is not None or2924 self.internal is not None2925 ):2926 return True2927 else:2928 return False2929 def build(self, node_):2930 attrs = node_.attributes2931 self.buildAttributes(attrs)2932 for child_ in node_.childNodes:2933 nodeName_ = child_.nodeName.split(':')[-1]2934 self.buildChildren(child_, nodeName_)2935 def buildAttributes(self, attrs):2936 if attrs.get('id'):2937 self.id = attrs.get('id').value2938 def buildChildren(self, child_, nodeName_):2939 if child_.nodeType == Node.ELEMENT_NODE and \2940 nodeName_ == 'title':2941 childobj_ = docTitleType.factory()2942 childobj_.build(child_)2943 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2944 MixedContainer.TypeNone, 'title', childobj_)2945 self.content_.append(obj_)2946 elif child_.nodeType == Node.ELEMENT_NODE and \2947 nodeName_ == 'para':2948 childobj_ = docParaType.factory()2949 childobj_.build(child_)2950 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2951 MixedContainer.TypeNone, 'para', childobj_)2952 self.content_.append(obj_)2953 elif child_.nodeType == Node.ELEMENT_NODE and \2954 nodeName_ == 'sect3':2955 childobj_ = docSect3Type.factory()2956 childobj_.build(child_)2957 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2958 MixedContainer.TypeNone, 'sect3', childobj_)2959 self.content_.append(obj_)2960 elif child_.nodeType == Node.ELEMENT_NODE and \2961 nodeName_ == 'internal':2962 childobj_ = docInternalS2Type.factory()2963 childobj_.build(child_)2964 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,2965 MixedContainer.TypeNone, 'internal', childobj_)2966 self.content_.append(obj_)2967 elif child_.nodeType == Node.TEXT_NODE:2968 obj_ = self.mixedclass_(MixedContainer.CategoryText,2969 MixedContainer.TypeNone, '', child_.nodeValue)2970 self.content_.append(obj_)2971# end class docSect2Type2972class docSect3Type(GeneratedsSuper):2973 subclass = None2974 superclass = None2975 def __init__(self, id=None, title=None, para=None, sect4=None, internal=None, mixedclass_=None, content_=None):2976 self.id = id2977 if mixedclass_ is None:2978 self.mixedclass_ = MixedContainer2979 else:2980 self.mixedclass_ = mixedclass_2981 if content_ is None:2982 self.content_ = []2983 else:2984 self.content_ = content_2985 def factory(*args_, **kwargs_):2986 if docSect3Type.subclass:2987 return docSect3Type.subclass(*args_, **kwargs_)2988 else:2989 return docSect3Type(*args_, **kwargs_)2990 factory = staticmethod(factory)2991 def get_title(self): return self.title2992 def set_title(self, title): self.title = title2993 def get_para(self): return self.para2994 def set_para(self, para): self.para = para2995 def add_para(self, value): self.para.append(value)2996 def insert_para(self, index, value): self.para[index] = value2997 def get_sect4(self): return self.sect42998 def set_sect4(self, sect4): self.sect4 = sect42999 def add_sect4(self, value): self.sect4.append(value)3000 def insert_sect4(self, index, value): self.sect4[index] = value3001 def get_internal(self): return self.internal3002 def set_internal(self, internal): self.internal = internal3003 def get_id(self): return self.id3004 def set_id(self, id): self.id = id3005 def export(self, outfile, level, namespace_='', name_='docSect3Type', namespacedef_=''):3006 showIndent(outfile, level)3007 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3008 self.exportAttributes(outfile, level, namespace_, name_='docSect3Type')3009 outfile.write('>')3010 self.exportChildren(outfile, level + 1, namespace_, name_)3011 outfile.write('</%s%s>\n' % (namespace_, name_))3012 def exportAttributes(self, outfile, level, namespace_='', name_='docSect3Type'):3013 if self.id is not None:3014 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))3015 def exportChildren(self, outfile, level, namespace_='', name_='docSect3Type'):3016 for item_ in self.content_:3017 item_.export(outfile, level, item_.name, namespace_)3018 def hasContent_(self):3019 if (3020 self.title is not None or3021 self.para is not None or3022 self.sect4 is not None or3023 self.internal is not None3024 ):3025 return True3026 else:3027 return False3028 def build(self, node_):3029 attrs = node_.attributes3030 self.buildAttributes(attrs)3031 for child_ in node_.childNodes:3032 nodeName_ = child_.nodeName.split(':')[-1]3033 self.buildChildren(child_, nodeName_)3034 def buildAttributes(self, attrs):3035 if attrs.get('id'):3036 self.id = attrs.get('id').value3037 def buildChildren(self, child_, nodeName_):3038 if child_.nodeType == Node.ELEMENT_NODE and \3039 nodeName_ == 'title':3040 childobj_ = docTitleType.factory()3041 childobj_.build(child_)3042 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3043 MixedContainer.TypeNone, 'title', childobj_)3044 self.content_.append(obj_)3045 elif child_.nodeType == Node.ELEMENT_NODE and \3046 nodeName_ == 'para':3047 childobj_ = docParaType.factory()3048 childobj_.build(child_)3049 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3050 MixedContainer.TypeNone, 'para', childobj_)3051 self.content_.append(obj_)3052 elif child_.nodeType == Node.ELEMENT_NODE and \3053 nodeName_ == 'sect4':3054 childobj_ = docSect4Type.factory()3055 childobj_.build(child_)3056 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3057 MixedContainer.TypeNone, 'sect4', childobj_)3058 self.content_.append(obj_)3059 elif child_.nodeType == Node.ELEMENT_NODE and \3060 nodeName_ == 'internal':3061 childobj_ = docInternalS3Type.factory()3062 childobj_.build(child_)3063 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3064 MixedContainer.TypeNone, 'internal', childobj_)3065 self.content_.append(obj_)3066 elif child_.nodeType == Node.TEXT_NODE:3067 obj_ = self.mixedclass_(MixedContainer.CategoryText,3068 MixedContainer.TypeNone, '', child_.nodeValue)3069 self.content_.append(obj_)3070# end class docSect3Type3071class docSect4Type(GeneratedsSuper):3072 subclass = None3073 superclass = None3074 def __init__(self, id=None, title=None, para=None, internal=None, mixedclass_=None, content_=None):3075 self.id = id3076 if mixedclass_ is None:3077 self.mixedclass_ = MixedContainer3078 else:3079 self.mixedclass_ = mixedclass_3080 if content_ is None:3081 self.content_ = []3082 else:3083 self.content_ = content_3084 def factory(*args_, **kwargs_):3085 if docSect4Type.subclass:3086 return docSect4Type.subclass(*args_, **kwargs_)3087 else:3088 return docSect4Type(*args_, **kwargs_)3089 factory = staticmethod(factory)3090 def get_title(self): return self.title3091 def set_title(self, title): self.title = title3092 def get_para(self): return self.para3093 def set_para(self, para): self.para = para3094 def add_para(self, value): self.para.append(value)3095 def insert_para(self, index, value): self.para[index] = value3096 def get_internal(self): return self.internal3097 def set_internal(self, internal): self.internal = internal3098 def get_id(self): return self.id3099 def set_id(self, id): self.id = id3100 def export(self, outfile, level, namespace_='', name_='docSect4Type', namespacedef_=''):3101 showIndent(outfile, level)3102 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3103 self.exportAttributes(outfile, level, namespace_, name_='docSect4Type')3104 outfile.write('>')3105 self.exportChildren(outfile, level + 1, namespace_, name_)3106 outfile.write('</%s%s>\n' % (namespace_, name_))3107 def exportAttributes(self, outfile, level, namespace_='', name_='docSect4Type'):3108 if self.id is not None:3109 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))3110 def exportChildren(self, outfile, level, namespace_='', name_='docSect4Type'):3111 for item_ in self.content_:3112 item_.export(outfile, level, item_.name, namespace_)3113 def hasContent_(self):3114 if (3115 self.title is not None or3116 self.para is not None or3117 self.internal is not None3118 ):3119 return True3120 else:3121 return False3122 def build(self, node_):3123 attrs = node_.attributes3124 self.buildAttributes(attrs)3125 for child_ in node_.childNodes:3126 nodeName_ = child_.nodeName.split(':')[-1]3127 self.buildChildren(child_, nodeName_)3128 def buildAttributes(self, attrs):3129 if attrs.get('id'):3130 self.id = attrs.get('id').value3131 def buildChildren(self, child_, nodeName_):3132 if child_.nodeType == Node.ELEMENT_NODE and \3133 nodeName_ == 'title':3134 childobj_ = docTitleType.factory()3135 childobj_.build(child_)3136 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3137 MixedContainer.TypeNone, 'title', childobj_)3138 self.content_.append(obj_)3139 elif child_.nodeType == Node.ELEMENT_NODE and \3140 nodeName_ == 'para':3141 childobj_ = docParaType.factory()3142 childobj_.build(child_)3143 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3144 MixedContainer.TypeNone, 'para', childobj_)3145 self.content_.append(obj_)3146 elif child_.nodeType == Node.ELEMENT_NODE and \3147 nodeName_ == 'internal':3148 childobj_ = docInternalS4Type.factory()3149 childobj_.build(child_)3150 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3151 MixedContainer.TypeNone, 'internal', childobj_)3152 self.content_.append(obj_)3153 elif child_.nodeType == Node.TEXT_NODE:3154 obj_ = self.mixedclass_(MixedContainer.CategoryText,3155 MixedContainer.TypeNone, '', child_.nodeValue)3156 self.content_.append(obj_)3157# end class docSect4Type3158class docInternalType(GeneratedsSuper):3159 subclass = None3160 superclass = None3161 def __init__(self, para=None, sect1=None, mixedclass_=None, content_=None):3162 if mixedclass_ is None:3163 self.mixedclass_ = MixedContainer3164 else:3165 self.mixedclass_ = mixedclass_3166 if content_ is None:3167 self.content_ = []3168 else:3169 self.content_ = content_3170 def factory(*args_, **kwargs_):3171 if docInternalType.subclass:3172 return docInternalType.subclass(*args_, **kwargs_)3173 else:3174 return docInternalType(*args_, **kwargs_)3175 factory = staticmethod(factory)3176 def get_para(self): return self.para3177 def set_para(self, para): self.para = para3178 def add_para(self, value): self.para.append(value)3179 def insert_para(self, index, value): self.para[index] = value3180 def get_sect1(self): return self.sect13181 def set_sect1(self, sect1): self.sect1 = sect13182 def add_sect1(self, value): self.sect1.append(value)3183 def insert_sect1(self, index, value): self.sect1[index] = value3184 def export(self, outfile, level, namespace_='', name_='docInternalType', namespacedef_=''):3185 showIndent(outfile, level)3186 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3187 self.exportAttributes(outfile, level, namespace_, name_='docInternalType')3188 outfile.write('>')3189 self.exportChildren(outfile, level + 1, namespace_, name_)3190 outfile.write('</%s%s>\n' % (namespace_, name_))3191 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalType'):3192 pass3193 def exportChildren(self, outfile, level, namespace_='', name_='docInternalType'):3194 for item_ in self.content_:3195 item_.export(outfile, level, item_.name, namespace_)3196 def hasContent_(self):3197 if (3198 self.para is not None or3199 self.sect1 is not None3200 ):3201 return True3202 else:3203 return False3204 def build(self, node_):3205 attrs = node_.attributes3206 self.buildAttributes(attrs)3207 for child_ in node_.childNodes:3208 nodeName_ = child_.nodeName.split(':')[-1]3209 self.buildChildren(child_, nodeName_)3210 def buildAttributes(self, attrs):3211 pass3212 def buildChildren(self, child_, nodeName_):3213 if child_.nodeType == Node.ELEMENT_NODE and \3214 nodeName_ == 'para':3215 childobj_ = docParaType.factory()3216 childobj_.build(child_)3217 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3218 MixedContainer.TypeNone, 'para', childobj_)3219 self.content_.append(obj_)3220 elif child_.nodeType == Node.ELEMENT_NODE and \3221 nodeName_ == 'sect1':3222 childobj_ = docSect1Type.factory()3223 childobj_.build(child_)3224 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3225 MixedContainer.TypeNone, 'sect1', childobj_)3226 self.content_.append(obj_)3227 elif child_.nodeType == Node.TEXT_NODE:3228 obj_ = self.mixedclass_(MixedContainer.CategoryText,3229 MixedContainer.TypeNone, '', child_.nodeValue)3230 self.content_.append(obj_)3231# end class docInternalType3232class docInternalS1Type(GeneratedsSuper):3233 subclass = None3234 superclass = None3235 def __init__(self, para=None, sect2=None, mixedclass_=None, content_=None):3236 if mixedclass_ is None:3237 self.mixedclass_ = MixedContainer3238 else:3239 self.mixedclass_ = mixedclass_3240 if content_ is None:3241 self.content_ = []3242 else:3243 self.content_ = content_3244 def factory(*args_, **kwargs_):3245 if docInternalS1Type.subclass:3246 return docInternalS1Type.subclass(*args_, **kwargs_)3247 else:3248 return docInternalS1Type(*args_, **kwargs_)3249 factory = staticmethod(factory)3250 def get_para(self): return self.para3251 def set_para(self, para): self.para = para3252 def add_para(self, value): self.para.append(value)3253 def insert_para(self, index, value): self.para[index] = value3254 def get_sect2(self): return self.sect23255 def set_sect2(self, sect2): self.sect2 = sect23256 def add_sect2(self, value): self.sect2.append(value)3257 def insert_sect2(self, index, value): self.sect2[index] = value3258 def export(self, outfile, level, namespace_='', name_='docInternalS1Type', namespacedef_=''):3259 showIndent(outfile, level)3260 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3261 self.exportAttributes(outfile, level, namespace_, name_='docInternalS1Type')3262 outfile.write('>')3263 self.exportChildren(outfile, level + 1, namespace_, name_)3264 outfile.write('</%s%s>\n' % (namespace_, name_))3265 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS1Type'):3266 pass3267 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS1Type'):3268 for item_ in self.content_:3269 item_.export(outfile, level, item_.name, namespace_)3270 def hasContent_(self):3271 if (3272 self.para is not None or3273 self.sect2 is not None3274 ):3275 return True3276 else:3277 return False3278 def build(self, node_):3279 attrs = node_.attributes3280 self.buildAttributes(attrs)3281 for child_ in node_.childNodes:3282 nodeName_ = child_.nodeName.split(':')[-1]3283 self.buildChildren(child_, nodeName_)3284 def buildAttributes(self, attrs):3285 pass3286 def buildChildren(self, child_, nodeName_):3287 if child_.nodeType == Node.ELEMENT_NODE and \3288 nodeName_ == 'para':3289 childobj_ = docParaType.factory()3290 childobj_.build(child_)3291 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3292 MixedContainer.TypeNone, 'para', childobj_)3293 self.content_.append(obj_)3294 elif child_.nodeType == Node.ELEMENT_NODE and \3295 nodeName_ == 'sect2':3296 childobj_ = docSect2Type.factory()3297 childobj_.build(child_)3298 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3299 MixedContainer.TypeNone, 'sect2', childobj_)3300 self.content_.append(obj_)3301 elif child_.nodeType == Node.TEXT_NODE:3302 obj_ = self.mixedclass_(MixedContainer.CategoryText,3303 MixedContainer.TypeNone, '', child_.nodeValue)3304 self.content_.append(obj_)3305# end class docInternalS1Type3306class docInternalS2Type(GeneratedsSuper):3307 subclass = None3308 superclass = None3309 def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None):3310 if mixedclass_ is None:3311 self.mixedclass_ = MixedContainer3312 else:3313 self.mixedclass_ = mixedclass_3314 if content_ is None:3315 self.content_ = []3316 else:3317 self.content_ = content_3318 def factory(*args_, **kwargs_):3319 if docInternalS2Type.subclass:3320 return docInternalS2Type.subclass(*args_, **kwargs_)3321 else:3322 return docInternalS2Type(*args_, **kwargs_)3323 factory = staticmethod(factory)3324 def get_para(self): return self.para3325 def set_para(self, para): self.para = para3326 def add_para(self, value): self.para.append(value)3327 def insert_para(self, index, value): self.para[index] = value3328 def get_sect3(self): return self.sect33329 def set_sect3(self, sect3): self.sect3 = sect33330 def add_sect3(self, value): self.sect3.append(value)3331 def insert_sect3(self, index, value): self.sect3[index] = value3332 def export(self, outfile, level, namespace_='', name_='docInternalS2Type', namespacedef_=''):3333 showIndent(outfile, level)3334 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3335 self.exportAttributes(outfile, level, namespace_, name_='docInternalS2Type')3336 outfile.write('>')3337 self.exportChildren(outfile, level + 1, namespace_, name_)3338 outfile.write('</%s%s>\n' % (namespace_, name_))3339 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS2Type'):3340 pass3341 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS2Type'):3342 for item_ in self.content_:3343 item_.export(outfile, level, item_.name, namespace_)3344 def hasContent_(self):3345 if (3346 self.para is not None or3347 self.sect3 is not None3348 ):3349 return True3350 else:3351 return False3352 def build(self, node_):3353 attrs = node_.attributes3354 self.buildAttributes(attrs)3355 for child_ in node_.childNodes:3356 nodeName_ = child_.nodeName.split(':')[-1]3357 self.buildChildren(child_, nodeName_)3358 def buildAttributes(self, attrs):3359 pass3360 def buildChildren(self, child_, nodeName_):3361 if child_.nodeType == Node.ELEMENT_NODE and \3362 nodeName_ == 'para':3363 childobj_ = docParaType.factory()3364 childobj_.build(child_)3365 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3366 MixedContainer.TypeNone, 'para', childobj_)3367 self.content_.append(obj_)3368 elif child_.nodeType == Node.ELEMENT_NODE and \3369 nodeName_ == 'sect3':3370 childobj_ = docSect3Type.factory()3371 childobj_.build(child_)3372 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3373 MixedContainer.TypeNone, 'sect3', childobj_)3374 self.content_.append(obj_)3375 elif child_.nodeType == Node.TEXT_NODE:3376 obj_ = self.mixedclass_(MixedContainer.CategoryText,3377 MixedContainer.TypeNone, '', child_.nodeValue)3378 self.content_.append(obj_)3379# end class docInternalS2Type3380class docInternalS3Type(GeneratedsSuper):3381 subclass = None3382 superclass = None3383 def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None):3384 if mixedclass_ is None:3385 self.mixedclass_ = MixedContainer3386 else:3387 self.mixedclass_ = mixedclass_3388 if content_ is None:3389 self.content_ = []3390 else:3391 self.content_ = content_3392 def factory(*args_, **kwargs_):3393 if docInternalS3Type.subclass:3394 return docInternalS3Type.subclass(*args_, **kwargs_)3395 else:3396 return docInternalS3Type(*args_, **kwargs_)3397 factory = staticmethod(factory)3398 def get_para(self): return self.para3399 def set_para(self, para): self.para = para3400 def add_para(self, value): self.para.append(value)3401 def insert_para(self, index, value): self.para[index] = value3402 def get_sect3(self): return self.sect33403 def set_sect3(self, sect3): self.sect3 = sect33404 def add_sect3(self, value): self.sect3.append(value)3405 def insert_sect3(self, index, value): self.sect3[index] = value3406 def export(self, outfile, level, namespace_='', name_='docInternalS3Type', namespacedef_=''):3407 showIndent(outfile, level)3408 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3409 self.exportAttributes(outfile, level, namespace_, name_='docInternalS3Type')3410 outfile.write('>')3411 self.exportChildren(outfile, level + 1, namespace_, name_)3412 outfile.write('</%s%s>\n' % (namespace_, name_))3413 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS3Type'):3414 pass3415 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS3Type'):3416 for item_ in self.content_:3417 item_.export(outfile, level, item_.name, namespace_)3418 def hasContent_(self):3419 if (3420 self.para is not None or3421 self.sect3 is not None3422 ):3423 return True3424 else:3425 return False3426 def build(self, node_):3427 attrs = node_.attributes3428 self.buildAttributes(attrs)3429 for child_ in node_.childNodes:3430 nodeName_ = child_.nodeName.split(':')[-1]3431 self.buildChildren(child_, nodeName_)3432 def buildAttributes(self, attrs):3433 pass3434 def buildChildren(self, child_, nodeName_):3435 if child_.nodeType == Node.ELEMENT_NODE and \3436 nodeName_ == 'para':3437 childobj_ = docParaType.factory()3438 childobj_.build(child_)3439 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3440 MixedContainer.TypeNone, 'para', childobj_)3441 self.content_.append(obj_)3442 elif child_.nodeType == Node.ELEMENT_NODE and \3443 nodeName_ == 'sect3':3444 childobj_ = docSect4Type.factory()3445 childobj_.build(child_)3446 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3447 MixedContainer.TypeNone, 'sect3', childobj_)3448 self.content_.append(obj_)3449 elif child_.nodeType == Node.TEXT_NODE:3450 obj_ = self.mixedclass_(MixedContainer.CategoryText,3451 MixedContainer.TypeNone, '', child_.nodeValue)3452 self.content_.append(obj_)3453# end class docInternalS3Type3454class docInternalS4Type(GeneratedsSuper):3455 subclass = None3456 superclass = None3457 def __init__(self, para=None, mixedclass_=None, content_=None):3458 if mixedclass_ is None:3459 self.mixedclass_ = MixedContainer3460 else:3461 self.mixedclass_ = mixedclass_3462 if content_ is None:3463 self.content_ = []3464 else:3465 self.content_ = content_3466 def factory(*args_, **kwargs_):3467 if docInternalS4Type.subclass:3468 return docInternalS4Type.subclass(*args_, **kwargs_)3469 else:3470 return docInternalS4Type(*args_, **kwargs_)3471 factory = staticmethod(factory)3472 def get_para(self): return self.para3473 def set_para(self, para): self.para = para3474 def add_para(self, value): self.para.append(value)3475 def insert_para(self, index, value): self.para[index] = value3476 def export(self, outfile, level, namespace_='', name_='docInternalS4Type', namespacedef_=''):3477 showIndent(outfile, level)3478 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3479 self.exportAttributes(outfile, level, namespace_, name_='docInternalS4Type')3480 outfile.write('>')3481 self.exportChildren(outfile, level + 1, namespace_, name_)3482 outfile.write('</%s%s>\n' % (namespace_, name_))3483 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS4Type'):3484 pass3485 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS4Type'):3486 for item_ in self.content_:3487 item_.export(outfile, level, item_.name, namespace_)3488 def hasContent_(self):3489 if (3490 self.para is not None3491 ):3492 return True3493 else:3494 return False3495 def build(self, node_):3496 attrs = node_.attributes3497 self.buildAttributes(attrs)3498 for child_ in node_.childNodes:3499 nodeName_ = child_.nodeName.split(':')[-1]3500 self.buildChildren(child_, nodeName_)3501 def buildAttributes(self, attrs):3502 pass3503 def buildChildren(self, child_, nodeName_):3504 if child_.nodeType == Node.ELEMENT_NODE and \3505 nodeName_ == 'para':3506 childobj_ = docParaType.factory()3507 childobj_.build(child_)3508 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,3509 MixedContainer.TypeNone, 'para', childobj_)3510 self.content_.append(obj_)3511 elif child_.nodeType == Node.TEXT_NODE:3512 obj_ = self.mixedclass_(MixedContainer.CategoryText,3513 MixedContainer.TypeNone, '', child_.nodeValue)3514 self.content_.append(obj_)3515# end class docInternalS4Type3516class docTitleType(GeneratedsSuper):3517 subclass = None3518 superclass = None3519 def __init__(self, valueOf_='', mixedclass_=None, content_=None):3520 if mixedclass_ is None:3521 self.mixedclass_ = MixedContainer3522 else:3523 self.mixedclass_ = mixedclass_3524 if content_ is None:3525 self.content_ = []3526 else:3527 self.content_ = content_3528 def factory(*args_, **kwargs_):3529 if docTitleType.subclass:3530 return docTitleType.subclass(*args_, **kwargs_)3531 else:3532 return docTitleType(*args_, **kwargs_)3533 factory = staticmethod(factory)3534 def getValueOf_(self): return self.valueOf_3535 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_3536 def export(self, outfile, level, namespace_='', name_='docTitleType', namespacedef_=''):3537 showIndent(outfile, level)3538 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3539 self.exportAttributes(outfile, level, namespace_, name_='docTitleType')3540 outfile.write('>')3541 self.exportChildren(outfile, level + 1, namespace_, name_)3542 outfile.write('</%s%s>\n' % (namespace_, name_))3543 def exportAttributes(self, outfile, level, namespace_='', name_='docTitleType'):3544 pass3545 def exportChildren(self, outfile, level, namespace_='', name_='docTitleType'):3546 if self.valueOf_.find('![CDATA')>-1:3547 value=quote_xml('%s' % self.valueOf_)3548 value=value.replace('![CDATA','<![CDATA')3549 value=value.replace(']]',']]>')3550 outfile.write(value)3551 else:3552 outfile.write(quote_xml('%s' % self.valueOf_))3553 def hasContent_(self):3554 if (3555 self.valueOf_ is not None3556 ):3557 return True3558 else:3559 return False3560 def build(self, node_):3561 attrs = node_.attributes3562 self.buildAttributes(attrs)3563 self.valueOf_ = ''3564 for child_ in node_.childNodes:3565 nodeName_ = child_.nodeName.split(':')[-1]3566 self.buildChildren(child_, nodeName_)3567 def buildAttributes(self, attrs):3568 pass3569 def buildChildren(self, child_, nodeName_):3570 if child_.nodeType == Node.TEXT_NODE:3571 obj_ = self.mixedclass_(MixedContainer.CategoryText,3572 MixedContainer.TypeNone, '', child_.nodeValue)3573 self.content_.append(obj_)3574 if child_.nodeType == Node.TEXT_NODE:3575 self.valueOf_ += child_.nodeValue3576 elif child_.nodeType == Node.CDATA_SECTION_NODE:3577 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'3578# end class docTitleType3579class docParaType(GeneratedsSuper):3580 subclass = None3581 superclass = None3582 def __init__(self, valueOf_='', mixedclass_=None, content_=None):3583 if mixedclass_ is None:3584 self.mixedclass_ = MixedContainer3585 else:3586 self.mixedclass_ = mixedclass_3587 if content_ is None:3588 self.content_ = []3589 else:3590 self.content_ = content_3591 def factory(*args_, **kwargs_):3592 if docParaType.subclass:3593 return docParaType.subclass(*args_, **kwargs_)3594 else:3595 return docParaType(*args_, **kwargs_)3596 factory = staticmethod(factory)3597 def getValueOf_(self): return self.valueOf_3598 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_3599 def export(self, outfile, level, namespace_='', name_='docParaType', namespacedef_=''):3600 showIndent(outfile, level)3601 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3602 self.exportAttributes(outfile, level, namespace_, name_='docParaType')3603 outfile.write('>')3604 self.exportChildren(outfile, level + 1, namespace_, name_)3605 outfile.write('</%s%s>\n' % (namespace_, name_))3606 def exportAttributes(self, outfile, level, namespace_='', name_='docParaType'):3607 pass3608 def exportChildren(self, outfile, level, namespace_='', name_='docParaType'):3609 if self.valueOf_.find('![CDATA')>-1:3610 value=quote_xml('%s' % self.valueOf_)3611 value=value.replace('![CDATA','<![CDATA')3612 value=value.replace(']]',']]>')3613 outfile.write(value)3614 else:3615 outfile.write(quote_xml('%s' % self.valueOf_))3616 def hasContent_(self):3617 if (3618 self.valueOf_ is not None3619 ):3620 return True3621 else:3622 return False3623 def build(self, node_):3624 attrs = node_.attributes3625 self.buildAttributes(attrs)3626 self.valueOf_ = ''3627 for child_ in node_.childNodes:3628 nodeName_ = child_.nodeName.split(':')[-1]3629 self.buildChildren(child_, nodeName_)3630 def buildAttributes(self, attrs):3631 pass3632 def buildChildren(self, child_, nodeName_):3633 if child_.nodeType == Node.TEXT_NODE:3634 obj_ = self.mixedclass_(MixedContainer.CategoryText,3635 MixedContainer.TypeNone, '', child_.nodeValue)3636 self.content_.append(obj_)3637 if child_.nodeType == Node.TEXT_NODE:3638 self.valueOf_ += child_.nodeValue3639 elif child_.nodeType == Node.CDATA_SECTION_NODE:3640 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'3641# end class docParaType3642class docMarkupType(GeneratedsSuper):3643 subclass = None3644 superclass = None3645 def __init__(self, valueOf_='', mixedclass_=None, content_=None):3646 if mixedclass_ is None:3647 self.mixedclass_ = MixedContainer3648 else:3649 self.mixedclass_ = mixedclass_3650 if content_ is None:3651 self.content_ = []3652 else:3653 self.content_ = content_3654 def factory(*args_, **kwargs_):3655 if docMarkupType.subclass:3656 return docMarkupType.subclass(*args_, **kwargs_)3657 else:3658 return docMarkupType(*args_, **kwargs_)3659 factory = staticmethod(factory)3660 def getValueOf_(self): return self.valueOf_3661 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_3662 def export(self, outfile, level, namespace_='', name_='docMarkupType', namespacedef_=''):3663 showIndent(outfile, level)3664 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3665 self.exportAttributes(outfile, level, namespace_, name_='docMarkupType')3666 outfile.write('>')3667 self.exportChildren(outfile, level + 1, namespace_, name_)3668 outfile.write('</%s%s>\n' % (namespace_, name_))3669 def exportAttributes(self, outfile, level, namespace_='', name_='docMarkupType'):3670 pass3671 def exportChildren(self, outfile, level, namespace_='', name_='docMarkupType'):3672 if self.valueOf_.find('![CDATA')>-1:3673 value=quote_xml('%s' % self.valueOf_)3674 value=value.replace('![CDATA','<![CDATA')3675 value=value.replace(']]',']]>')3676 outfile.write(value)3677 else:3678 outfile.write(quote_xml('%s' % self.valueOf_))3679 def hasContent_(self):3680 if (3681 self.valueOf_ is not None3682 ):3683 return True3684 else:3685 return False3686 def build(self, node_):3687 attrs = node_.attributes3688 self.buildAttributes(attrs)3689 self.valueOf_ = ''3690 for child_ in node_.childNodes:3691 nodeName_ = child_.nodeName.split(':')[-1]3692 self.buildChildren(child_, nodeName_)3693 def buildAttributes(self, attrs):3694 pass3695 def buildChildren(self, child_, nodeName_):3696 if child_.nodeType == Node.TEXT_NODE:3697 obj_ = self.mixedclass_(MixedContainer.CategoryText,3698 MixedContainer.TypeNone, '', child_.nodeValue)3699 self.content_.append(obj_)3700 if child_.nodeType == Node.TEXT_NODE:3701 self.valueOf_ += child_.nodeValue3702 elif child_.nodeType == Node.CDATA_SECTION_NODE:3703 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'3704# end class docMarkupType3705class docURLLink(GeneratedsSuper):3706 subclass = None3707 superclass = None3708 def __init__(self, url=None, valueOf_='', mixedclass_=None, content_=None):3709 self.url = url3710 if mixedclass_ is None:3711 self.mixedclass_ = MixedContainer3712 else:3713 self.mixedclass_ = mixedclass_3714 if content_ is None:3715 self.content_ = []3716 else:3717 self.content_ = content_3718 def factory(*args_, **kwargs_):3719 if docURLLink.subclass:3720 return docURLLink.subclass(*args_, **kwargs_)3721 else:3722 return docURLLink(*args_, **kwargs_)3723 factory = staticmethod(factory)3724 def get_url(self): return self.url3725 def set_url(self, url): self.url = url3726 def getValueOf_(self): return self.valueOf_3727 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_3728 def export(self, outfile, level, namespace_='', name_='docURLLink', namespacedef_=''):3729 showIndent(outfile, level)3730 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3731 self.exportAttributes(outfile, level, namespace_, name_='docURLLink')3732 outfile.write('>')3733 self.exportChildren(outfile, level + 1, namespace_, name_)3734 outfile.write('</%s%s>\n' % (namespace_, name_))3735 def exportAttributes(self, outfile, level, namespace_='', name_='docURLLink'):3736 if self.url is not None:3737 outfile.write(' url=%s' % (self.format_string(quote_attrib(self.url).encode(ExternalEncoding), input_name='url'), ))3738 def exportChildren(self, outfile, level, namespace_='', name_='docURLLink'):3739 if self.valueOf_.find('![CDATA')>-1:3740 value=quote_xml('%s' % self.valueOf_)3741 value=value.replace('![CDATA','<![CDATA')3742 value=value.replace(']]',']]>')3743 outfile.write(value)3744 else:3745 outfile.write(quote_xml('%s' % self.valueOf_))3746 def hasContent_(self):3747 if (3748 self.valueOf_ is not None3749 ):3750 return True3751 else:3752 return False3753 def build(self, node_):3754 attrs = node_.attributes3755 self.buildAttributes(attrs)3756 self.valueOf_ = ''3757 for child_ in node_.childNodes:3758 nodeName_ = child_.nodeName.split(':')[-1]3759 self.buildChildren(child_, nodeName_)3760 def buildAttributes(self, attrs):3761 if attrs.get('url'):3762 self.url = attrs.get('url').value3763 def buildChildren(self, child_, nodeName_):3764 if child_.nodeType == Node.TEXT_NODE:3765 obj_ = self.mixedclass_(MixedContainer.CategoryText,3766 MixedContainer.TypeNone, '', child_.nodeValue)3767 self.content_.append(obj_)3768 if child_.nodeType == Node.TEXT_NODE:3769 self.valueOf_ += child_.nodeValue3770 elif child_.nodeType == Node.CDATA_SECTION_NODE:3771 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'3772# end class docURLLink3773class docAnchorType(GeneratedsSuper):3774 subclass = None3775 superclass = None3776 def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None):3777 self.id = id3778 if mixedclass_ is None:3779 self.mixedclass_ = MixedContainer3780 else:3781 self.mixedclass_ = mixedclass_3782 if content_ is None:3783 self.content_ = []3784 else:3785 self.content_ = content_3786 def factory(*args_, **kwargs_):3787 if docAnchorType.subclass:3788 return docAnchorType.subclass(*args_, **kwargs_)3789 else:3790 return docAnchorType(*args_, **kwargs_)3791 factory = staticmethod(factory)3792 def get_id(self): return self.id3793 def set_id(self, id): self.id = id3794 def getValueOf_(self): return self.valueOf_3795 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_3796 def export(self, outfile, level, namespace_='', name_='docAnchorType', namespacedef_=''):3797 showIndent(outfile, level)3798 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3799 self.exportAttributes(outfile, level, namespace_, name_='docAnchorType')3800 outfile.write('>')3801 self.exportChildren(outfile, level + 1, namespace_, name_)3802 outfile.write('</%s%s>\n' % (namespace_, name_))3803 def exportAttributes(self, outfile, level, namespace_='', name_='docAnchorType'):3804 if self.id is not None:3805 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))3806 def exportChildren(self, outfile, level, namespace_='', name_='docAnchorType'):3807 if self.valueOf_.find('![CDATA')>-1:3808 value=quote_xml('%s' % self.valueOf_)3809 value=value.replace('![CDATA','<![CDATA')3810 value=value.replace(']]',']]>')3811 outfile.write(value)3812 else:3813 outfile.write(quote_xml('%s' % self.valueOf_))3814 def hasContent_(self):3815 if (3816 self.valueOf_ is not None3817 ):3818 return True3819 else:3820 return False3821 def build(self, node_):3822 attrs = node_.attributes3823 self.buildAttributes(attrs)3824 self.valueOf_ = ''3825 for child_ in node_.childNodes:3826 nodeName_ = child_.nodeName.split(':')[-1]3827 self.buildChildren(child_, nodeName_)3828 def buildAttributes(self, attrs):3829 if attrs.get('id'):3830 self.id = attrs.get('id').value3831 def buildChildren(self, child_, nodeName_):3832 if child_.nodeType == Node.TEXT_NODE:3833 obj_ = self.mixedclass_(MixedContainer.CategoryText,3834 MixedContainer.TypeNone, '', child_.nodeValue)3835 self.content_.append(obj_)3836 if child_.nodeType == Node.TEXT_NODE:3837 self.valueOf_ += child_.nodeValue3838 elif child_.nodeType == Node.CDATA_SECTION_NODE:3839 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'3840# end class docAnchorType3841class docFormulaType(GeneratedsSuper):3842 subclass = None3843 superclass = None3844 def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None):3845 self.id = id3846 if mixedclass_ is None:3847 self.mixedclass_ = MixedContainer3848 else:3849 self.mixedclass_ = mixedclass_3850 if content_ is None:3851 self.content_ = []3852 else:3853 self.content_ = content_3854 def factory(*args_, **kwargs_):3855 if docFormulaType.subclass:3856 return docFormulaType.subclass(*args_, **kwargs_)3857 else:3858 return docFormulaType(*args_, **kwargs_)3859 factory = staticmethod(factory)3860 def get_id(self): return self.id3861 def set_id(self, id): self.id = id3862 def getValueOf_(self): return self.valueOf_3863 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_3864 def export(self, outfile, level, namespace_='', name_='docFormulaType', namespacedef_=''):3865 showIndent(outfile, level)3866 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3867 self.exportAttributes(outfile, level, namespace_, name_='docFormulaType')3868 outfile.write('>')3869 self.exportChildren(outfile, level + 1, namespace_, name_)3870 outfile.write('</%s%s>\n' % (namespace_, name_))3871 def exportAttributes(self, outfile, level, namespace_='', name_='docFormulaType'):3872 if self.id is not None:3873 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))3874 def exportChildren(self, outfile, level, namespace_='', name_='docFormulaType'):3875 if self.valueOf_.find('![CDATA')>-1:3876 value=quote_xml('%s' % self.valueOf_)3877 value=value.replace('![CDATA','<![CDATA')3878 value=value.replace(']]',']]>')3879 outfile.write(value)3880 else:3881 outfile.write(quote_xml('%s' % self.valueOf_))3882 def hasContent_(self):3883 if (3884 self.valueOf_ is not None3885 ):3886 return True3887 else:3888 return False3889 def build(self, node_):3890 attrs = node_.attributes3891 self.buildAttributes(attrs)3892 self.valueOf_ = ''3893 for child_ in node_.childNodes:3894 nodeName_ = child_.nodeName.split(':')[-1]3895 self.buildChildren(child_, nodeName_)3896 def buildAttributes(self, attrs):3897 if attrs.get('id'):3898 self.id = attrs.get('id').value3899 def buildChildren(self, child_, nodeName_):3900 if child_.nodeType == Node.TEXT_NODE:3901 obj_ = self.mixedclass_(MixedContainer.CategoryText,3902 MixedContainer.TypeNone, '', child_.nodeValue)3903 self.content_.append(obj_)3904 if child_.nodeType == Node.TEXT_NODE:3905 self.valueOf_ += child_.nodeValue3906 elif child_.nodeType == Node.CDATA_SECTION_NODE:3907 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'3908# end class docFormulaType3909class docIndexEntryType(GeneratedsSuper):3910 subclass = None3911 superclass = None3912 def __init__(self, primaryie=None, secondaryie=None):3913 self.primaryie = primaryie3914 self.secondaryie = secondaryie3915 def factory(*args_, **kwargs_):3916 if docIndexEntryType.subclass:3917 return docIndexEntryType.subclass(*args_, **kwargs_)3918 else:3919 return docIndexEntryType(*args_, **kwargs_)3920 factory = staticmethod(factory)3921 def get_primaryie(self): return self.primaryie3922 def set_primaryie(self, primaryie): self.primaryie = primaryie3923 def get_secondaryie(self): return self.secondaryie3924 def set_secondaryie(self, secondaryie): self.secondaryie = secondaryie3925 def export(self, outfile, level, namespace_='', name_='docIndexEntryType', namespacedef_=''):3926 showIndent(outfile, level)3927 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3928 self.exportAttributes(outfile, level, namespace_, name_='docIndexEntryType')3929 if self.hasContent_():3930 outfile.write('>\n')3931 self.exportChildren(outfile, level + 1, namespace_, name_)3932 showIndent(outfile, level)3933 outfile.write('</%s%s>\n' % (namespace_, name_))3934 else:3935 outfile.write(' />\n')3936 def exportAttributes(self, outfile, level, namespace_='', name_='docIndexEntryType'):3937 pass3938 def exportChildren(self, outfile, level, namespace_='', name_='docIndexEntryType'):3939 if self.primaryie is not None:3940 showIndent(outfile, level)3941 outfile.write('<%sprimaryie>%s</%sprimaryie>\n' % (namespace_, self.format_string(quote_xml(self.primaryie).encode(ExternalEncoding), input_name='primaryie'), namespace_))3942 if self.secondaryie is not None:3943 showIndent(outfile, level)3944 outfile.write('<%ssecondaryie>%s</%ssecondaryie>\n' % (namespace_, self.format_string(quote_xml(self.secondaryie).encode(ExternalEncoding), input_name='secondaryie'), namespace_))3945 def hasContent_(self):3946 if (3947 self.primaryie is not None or3948 self.secondaryie is not None3949 ):3950 return True3951 else:3952 return False3953 def build(self, node_):3954 attrs = node_.attributes3955 self.buildAttributes(attrs)3956 for child_ in node_.childNodes:3957 nodeName_ = child_.nodeName.split(':')[-1]3958 self.buildChildren(child_, nodeName_)3959 def buildAttributes(self, attrs):3960 pass3961 def buildChildren(self, child_, nodeName_):3962 if child_.nodeType == Node.ELEMENT_NODE and \3963 nodeName_ == 'primaryie':3964 primaryie_ = ''3965 for text__content_ in child_.childNodes:3966 primaryie_ += text__content_.nodeValue3967 self.primaryie = primaryie_3968 elif child_.nodeType == Node.ELEMENT_NODE and \3969 nodeName_ == 'secondaryie':3970 secondaryie_ = ''3971 for text__content_ in child_.childNodes:3972 secondaryie_ += text__content_.nodeValue3973 self.secondaryie = secondaryie_3974# end class docIndexEntryType3975class docListType(GeneratedsSuper):3976 subclass = None3977 superclass = None3978 def __init__(self, listitem=None):3979 if listitem is None:3980 self.listitem = []3981 else:3982 self.listitem = listitem3983 def factory(*args_, **kwargs_):3984 if docListType.subclass:3985 return docListType.subclass(*args_, **kwargs_)3986 else:3987 return docListType(*args_, **kwargs_)3988 factory = staticmethod(factory)3989 def get_listitem(self): return self.listitem3990 def set_listitem(self, listitem): self.listitem = listitem3991 def add_listitem(self, value): self.listitem.append(value)3992 def insert_listitem(self, index, value): self.listitem[index] = value3993 def export(self, outfile, level, namespace_='', name_='docListType', namespacedef_=''):3994 showIndent(outfile, level)3995 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))3996 self.exportAttributes(outfile, level, namespace_, name_='docListType')3997 if self.hasContent_():3998 outfile.write('>\n')3999 self.exportChildren(outfile, level + 1, namespace_, name_)4000 showIndent(outfile, level)4001 outfile.write('</%s%s>\n' % (namespace_, name_))4002 else:4003 outfile.write(' />\n')4004 def exportAttributes(self, outfile, level, namespace_='', name_='docListType'):4005 pass4006 def exportChildren(self, outfile, level, namespace_='', name_='docListType'):4007 for listitem_ in self.listitem:4008 listitem_.export(outfile, level, namespace_, name_='listitem')4009 def hasContent_(self):4010 if (4011 self.listitem is not None4012 ):4013 return True4014 else:4015 return False4016 def build(self, node_):4017 attrs = node_.attributes4018 self.buildAttributes(attrs)4019 for child_ in node_.childNodes:4020 nodeName_ = child_.nodeName.split(':')[-1]4021 self.buildChildren(child_, nodeName_)4022 def buildAttributes(self, attrs):4023 pass4024 def buildChildren(self, child_, nodeName_):4025 if child_.nodeType == Node.ELEMENT_NODE and \4026 nodeName_ == 'listitem':4027 obj_ = docListItemType.factory()4028 obj_.build(child_)4029 self.listitem.append(obj_)4030# end class docListType4031class docListItemType(GeneratedsSuper):4032 subclass = None4033 superclass = None4034 def __init__(self, para=None):4035 if para is None:4036 self.para = []4037 else:4038 self.para = para4039 def factory(*args_, **kwargs_):4040 if docListItemType.subclass:4041 return docListItemType.subclass(*args_, **kwargs_)4042 else:4043 return docListItemType(*args_, **kwargs_)4044 factory = staticmethod(factory)4045 def get_para(self): return self.para4046 def set_para(self, para): self.para = para4047 def add_para(self, value): self.para.append(value)4048 def insert_para(self, index, value): self.para[index] = value4049 def export(self, outfile, level, namespace_='', name_='docListItemType', namespacedef_=''):4050 showIndent(outfile, level)4051 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4052 self.exportAttributes(outfile, level, namespace_, name_='docListItemType')4053 if self.hasContent_():4054 outfile.write('>\n')4055 self.exportChildren(outfile, level + 1, namespace_, name_)4056 showIndent(outfile, level)4057 outfile.write('</%s%s>\n' % (namespace_, name_))4058 else:4059 outfile.write(' />\n')4060 def exportAttributes(self, outfile, level, namespace_='', name_='docListItemType'):4061 pass4062 def exportChildren(self, outfile, level, namespace_='', name_='docListItemType'):4063 for para_ in self.para:4064 para_.export(outfile, level, namespace_, name_='para')4065 def hasContent_(self):4066 if (4067 self.para is not None4068 ):4069 return True4070 else:4071 return False4072 def build(self, node_):4073 attrs = node_.attributes4074 self.buildAttributes(attrs)4075 for child_ in node_.childNodes:4076 nodeName_ = child_.nodeName.split(':')[-1]4077 self.buildChildren(child_, nodeName_)4078 def buildAttributes(self, attrs):4079 pass4080 def buildChildren(self, child_, nodeName_):4081 if child_.nodeType == Node.ELEMENT_NODE and \4082 nodeName_ == 'para':4083 obj_ = docParaType.factory()4084 obj_.build(child_)4085 self.para.append(obj_)4086# end class docListItemType4087class docSimpleSectType(GeneratedsSuper):4088 subclass = None4089 superclass = None4090 def __init__(self, kind=None, title=None, para=None):4091 self.kind = kind4092 self.title = title4093 if para is None:4094 self.para = []4095 else:4096 self.para = para4097 def factory(*args_, **kwargs_):4098 if docSimpleSectType.subclass:4099 return docSimpleSectType.subclass(*args_, **kwargs_)4100 else:4101 return docSimpleSectType(*args_, **kwargs_)4102 factory = staticmethod(factory)4103 def get_title(self): return self.title4104 def set_title(self, title): self.title = title4105 def get_para(self): return self.para4106 def set_para(self, para): self.para = para4107 def add_para(self, value): self.para.append(value)4108 def insert_para(self, index, value): self.para[index] = value4109 def get_kind(self): return self.kind4110 def set_kind(self, kind): self.kind = kind4111 def export(self, outfile, level, namespace_='', name_='docSimpleSectType', namespacedef_=''):4112 showIndent(outfile, level)4113 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4114 self.exportAttributes(outfile, level, namespace_, name_='docSimpleSectType')4115 if self.hasContent_():4116 outfile.write('>\n')4117 self.exportChildren(outfile, level + 1, namespace_, name_)4118 showIndent(outfile, level)4119 outfile.write('</%s%s>\n' % (namespace_, name_))4120 else:4121 outfile.write(' />\n')4122 def exportAttributes(self, outfile, level, namespace_='', name_='docSimpleSectType'):4123 if self.kind is not None:4124 outfile.write(' kind=%s' % (quote_attrib(self.kind), ))4125 def exportChildren(self, outfile, level, namespace_='', name_='docSimpleSectType'):4126 if self.title:4127 self.title.export(outfile, level, namespace_, name_='title')4128 for para_ in self.para:4129 para_.export(outfile, level, namespace_, name_='para')4130 def hasContent_(self):4131 if (4132 self.title is not None or4133 self.para is not None4134 ):4135 return True4136 else:4137 return False4138 def build(self, node_):4139 attrs = node_.attributes4140 self.buildAttributes(attrs)4141 for child_ in node_.childNodes:4142 nodeName_ = child_.nodeName.split(':')[-1]4143 self.buildChildren(child_, nodeName_)4144 def buildAttributes(self, attrs):4145 if attrs.get('kind'):4146 self.kind = attrs.get('kind').value4147 def buildChildren(self, child_, nodeName_):4148 if child_.nodeType == Node.ELEMENT_NODE and \4149 nodeName_ == 'title':4150 obj_ = docTitleType.factory()4151 obj_.build(child_)4152 self.set_title(obj_)4153 elif child_.nodeType == Node.ELEMENT_NODE and \4154 nodeName_ == 'para':4155 obj_ = docParaType.factory()4156 obj_.build(child_)4157 self.para.append(obj_)4158# end class docSimpleSectType4159class docVarListEntryType(GeneratedsSuper):4160 subclass = None4161 superclass = None4162 def __init__(self, term=None):4163 self.term = term4164 def factory(*args_, **kwargs_):4165 if docVarListEntryType.subclass:4166 return docVarListEntryType.subclass(*args_, **kwargs_)4167 else:4168 return docVarListEntryType(*args_, **kwargs_)4169 factory = staticmethod(factory)4170 def get_term(self): return self.term4171 def set_term(self, term): self.term = term4172 def export(self, outfile, level, namespace_='', name_='docVarListEntryType', namespacedef_=''):4173 showIndent(outfile, level)4174 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4175 self.exportAttributes(outfile, level, namespace_, name_='docVarListEntryType')4176 if self.hasContent_():4177 outfile.write('>\n')4178 self.exportChildren(outfile, level + 1, namespace_, name_)4179 showIndent(outfile, level)4180 outfile.write('</%s%s>\n' % (namespace_, name_))4181 else:4182 outfile.write(' />\n')4183 def exportAttributes(self, outfile, level, namespace_='', name_='docVarListEntryType'):4184 pass4185 def exportChildren(self, outfile, level, namespace_='', name_='docVarListEntryType'):4186 if self.term:4187 self.term.export(outfile, level, namespace_, name_='term', )4188 def hasContent_(self):4189 if (4190 self.term is not None4191 ):4192 return True4193 else:4194 return False4195 def build(self, node_):4196 attrs = node_.attributes4197 self.buildAttributes(attrs)4198 for child_ in node_.childNodes:4199 nodeName_ = child_.nodeName.split(':')[-1]4200 self.buildChildren(child_, nodeName_)4201 def buildAttributes(self, attrs):4202 pass4203 def buildChildren(self, child_, nodeName_):4204 if child_.nodeType == Node.ELEMENT_NODE and \4205 nodeName_ == 'term':4206 obj_ = docTitleType.factory()4207 obj_.build(child_)4208 self.set_term(obj_)4209# end class docVarListEntryType4210class docVariableListType(GeneratedsSuper):4211 subclass = None4212 superclass = None4213 def __init__(self, valueOf_=''):4214 self.valueOf_ = valueOf_4215 def factory(*args_, **kwargs_):4216 if docVariableListType.subclass:4217 return docVariableListType.subclass(*args_, **kwargs_)4218 else:4219 return docVariableListType(*args_, **kwargs_)4220 factory = staticmethod(factory)4221 def getValueOf_(self): return self.valueOf_4222 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4223 def export(self, outfile, level, namespace_='', name_='docVariableListType', namespacedef_=''):4224 showIndent(outfile, level)4225 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4226 self.exportAttributes(outfile, level, namespace_, name_='docVariableListType')4227 if self.hasContent_():4228 outfile.write('>\n')4229 self.exportChildren(outfile, level + 1, namespace_, name_)4230 showIndent(outfile, level)4231 outfile.write('</%s%s>\n' % (namespace_, name_))4232 else:4233 outfile.write(' />\n')4234 def exportAttributes(self, outfile, level, namespace_='', name_='docVariableListType'):4235 pass4236 def exportChildren(self, outfile, level, namespace_='', name_='docVariableListType'):4237 if self.valueOf_.find('![CDATA')>-1:4238 value=quote_xml('%s' % self.valueOf_)4239 value=value.replace('![CDATA','<![CDATA')4240 value=value.replace(']]',']]>')4241 outfile.write(value)4242 else:4243 outfile.write(quote_xml('%s' % self.valueOf_))4244 def hasContent_(self):4245 if (4246 self.valueOf_ is not None4247 ):4248 return True4249 else:4250 return False4251 def build(self, node_):4252 attrs = node_.attributes4253 self.buildAttributes(attrs)4254 self.valueOf_ = ''4255 for child_ in node_.childNodes:4256 nodeName_ = child_.nodeName.split(':')[-1]4257 self.buildChildren(child_, nodeName_)4258 def buildAttributes(self, attrs):4259 pass4260 def buildChildren(self, child_, nodeName_):4261 if child_.nodeType == Node.TEXT_NODE:4262 self.valueOf_ += child_.nodeValue4263 elif child_.nodeType == Node.CDATA_SECTION_NODE:4264 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4265# end class docVariableListType4266class docRefTextType(GeneratedsSuper):4267 subclass = None4268 superclass = None4269 def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None):4270 self.refid = refid4271 self.kindref = kindref4272 self.external = external4273 if mixedclass_ is None:4274 self.mixedclass_ = MixedContainer4275 else:4276 self.mixedclass_ = mixedclass_4277 if content_ is None:4278 self.content_ = []4279 else:4280 self.content_ = content_4281 def factory(*args_, **kwargs_):4282 if docRefTextType.subclass:4283 return docRefTextType.subclass(*args_, **kwargs_)4284 else:4285 return docRefTextType(*args_, **kwargs_)4286 factory = staticmethod(factory)4287 def get_refid(self): return self.refid4288 def set_refid(self, refid): self.refid = refid4289 def get_kindref(self): return self.kindref4290 def set_kindref(self, kindref): self.kindref = kindref4291 def get_external(self): return self.external4292 def set_external(self, external): self.external = external4293 def getValueOf_(self): return self.valueOf_4294 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4295 def export(self, outfile, level, namespace_='', name_='docRefTextType', namespacedef_=''):4296 showIndent(outfile, level)4297 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4298 self.exportAttributes(outfile, level, namespace_, name_='docRefTextType')4299 outfile.write('>')4300 self.exportChildren(outfile, level + 1, namespace_, name_)4301 outfile.write('</%s%s>\n' % (namespace_, name_))4302 def exportAttributes(self, outfile, level, namespace_='', name_='docRefTextType'):4303 if self.refid is not None:4304 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), ))4305 if self.kindref is not None:4306 outfile.write(' kindref=%s' % (quote_attrib(self.kindref), ))4307 if self.external is not None:4308 outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), ))4309 def exportChildren(self, outfile, level, namespace_='', name_='docRefTextType'):4310 if self.valueOf_.find('![CDATA')>-1:4311 value=quote_xml('%s' % self.valueOf_)4312 value=value.replace('![CDATA','<![CDATA')4313 value=value.replace(']]',']]>')4314 outfile.write(value)4315 else:4316 outfile.write(quote_xml('%s' % self.valueOf_))4317 def hasContent_(self):4318 if (4319 self.valueOf_ is not None4320 ):4321 return True4322 else:4323 return False4324 def build(self, node_):4325 attrs = node_.attributes4326 self.buildAttributes(attrs)4327 self.valueOf_ = ''4328 for child_ in node_.childNodes:4329 nodeName_ = child_.nodeName.split(':')[-1]4330 self.buildChildren(child_, nodeName_)4331 def buildAttributes(self, attrs):4332 if attrs.get('refid'):4333 self.refid = attrs.get('refid').value4334 if attrs.get('kindref'):4335 self.kindref = attrs.get('kindref').value4336 if attrs.get('external'):4337 self.external = attrs.get('external').value4338 def buildChildren(self, child_, nodeName_):4339 if child_.nodeType == Node.TEXT_NODE:4340 obj_ = self.mixedclass_(MixedContainer.CategoryText,4341 MixedContainer.TypeNone, '', child_.nodeValue)4342 self.content_.append(obj_)4343 if child_.nodeType == Node.TEXT_NODE:4344 self.valueOf_ += child_.nodeValue4345 elif child_.nodeType == Node.CDATA_SECTION_NODE:4346 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4347# end class docRefTextType4348class docTableType(GeneratedsSuper):4349 subclass = None4350 superclass = None4351 def __init__(self, rows=None, cols=None, row=None, caption=None):4352 self.rows = rows4353 self.cols = cols4354 if row is None:4355 self.row = []4356 else:4357 self.row = row4358 self.caption = caption4359 def factory(*args_, **kwargs_):4360 if docTableType.subclass:4361 return docTableType.subclass(*args_, **kwargs_)4362 else:4363 return docTableType(*args_, **kwargs_)4364 factory = staticmethod(factory)4365 def get_row(self): return self.row4366 def set_row(self, row): self.row = row4367 def add_row(self, value): self.row.append(value)4368 def insert_row(self, index, value): self.row[index] = value4369 def get_caption(self): return self.caption4370 def set_caption(self, caption): self.caption = caption4371 def get_rows(self): return self.rows4372 def set_rows(self, rows): self.rows = rows4373 def get_cols(self): return self.cols4374 def set_cols(self, cols): self.cols = cols4375 def export(self, outfile, level, namespace_='', name_='docTableType', namespacedef_=''):4376 showIndent(outfile, level)4377 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4378 self.exportAttributes(outfile, level, namespace_, name_='docTableType')4379 if self.hasContent_():4380 outfile.write('>\n')4381 self.exportChildren(outfile, level + 1, namespace_, name_)4382 showIndent(outfile, level)4383 outfile.write('</%s%s>\n' % (namespace_, name_))4384 else:4385 outfile.write(' />\n')4386 def exportAttributes(self, outfile, level, namespace_='', name_='docTableType'):4387 if self.rows is not None:4388 outfile.write(' rows="%s"' % self.format_integer(self.rows, input_name='rows'))4389 if self.cols is not None:4390 outfile.write(' cols="%s"' % self.format_integer(self.cols, input_name='cols'))4391 def exportChildren(self, outfile, level, namespace_='', name_='docTableType'):4392 for row_ in self.row:4393 row_.export(outfile, level, namespace_, name_='row')4394 if self.caption:4395 self.caption.export(outfile, level, namespace_, name_='caption')4396 def hasContent_(self):4397 if (4398 self.row is not None or4399 self.caption is not None4400 ):4401 return True4402 else:4403 return False4404 def build(self, node_):4405 attrs = node_.attributes4406 self.buildAttributes(attrs)4407 for child_ in node_.childNodes:4408 nodeName_ = child_.nodeName.split(':')[-1]4409 self.buildChildren(child_, nodeName_)4410 def buildAttributes(self, attrs):4411 if attrs.get('rows'):4412 try:4413 self.rows = int(attrs.get('rows').value)4414 except ValueError as exp:4415 raise ValueError('Bad integer attribute (rows): %s' % exp)4416 if attrs.get('cols'):4417 try:4418 self.cols = int(attrs.get('cols').value)4419 except ValueError as exp:4420 raise ValueError('Bad integer attribute (cols): %s' % exp)4421 def buildChildren(self, child_, nodeName_):4422 if child_.nodeType == Node.ELEMENT_NODE and \4423 nodeName_ == 'row':4424 obj_ = docRowType.factory()4425 obj_.build(child_)4426 self.row.append(obj_)4427 elif child_.nodeType == Node.ELEMENT_NODE and \4428 nodeName_ == 'caption':4429 obj_ = docCaptionType.factory()4430 obj_.build(child_)4431 self.set_caption(obj_)4432# end class docTableType4433class docRowType(GeneratedsSuper):4434 subclass = None4435 superclass = None4436 def __init__(self, entry=None):4437 if entry is None:4438 self.entry = []4439 else:4440 self.entry = entry4441 def factory(*args_, **kwargs_):4442 if docRowType.subclass:4443 return docRowType.subclass(*args_, **kwargs_)4444 else:4445 return docRowType(*args_, **kwargs_)4446 factory = staticmethod(factory)4447 def get_entry(self): return self.entry4448 def set_entry(self, entry): self.entry = entry4449 def add_entry(self, value): self.entry.append(value)4450 def insert_entry(self, index, value): self.entry[index] = value4451 def export(self, outfile, level, namespace_='', name_='docRowType', namespacedef_=''):4452 showIndent(outfile, level)4453 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4454 self.exportAttributes(outfile, level, namespace_, name_='docRowType')4455 if self.hasContent_():4456 outfile.write('>\n')4457 self.exportChildren(outfile, level + 1, namespace_, name_)4458 showIndent(outfile, level)4459 outfile.write('</%s%s>\n' % (namespace_, name_))4460 else:4461 outfile.write(' />\n')4462 def exportAttributes(self, outfile, level, namespace_='', name_='docRowType'):4463 pass4464 def exportChildren(self, outfile, level, namespace_='', name_='docRowType'):4465 for entry_ in self.entry:4466 entry_.export(outfile, level, namespace_, name_='entry')4467 def hasContent_(self):4468 if (4469 self.entry is not None4470 ):4471 return True4472 else:4473 return False4474 def build(self, node_):4475 attrs = node_.attributes4476 self.buildAttributes(attrs)4477 for child_ in node_.childNodes:4478 nodeName_ = child_.nodeName.split(':')[-1]4479 self.buildChildren(child_, nodeName_)4480 def buildAttributes(self, attrs):4481 pass4482 def buildChildren(self, child_, nodeName_):4483 if child_.nodeType == Node.ELEMENT_NODE and \4484 nodeName_ == 'entry':4485 obj_ = docEntryType.factory()4486 obj_.build(child_)4487 self.entry.append(obj_)4488# end class docRowType4489class docEntryType(GeneratedsSuper):4490 subclass = None4491 superclass = None4492 def __init__(self, thead=None, para=None):4493 self.thead = thead4494 if para is None:4495 self.para = []4496 else:4497 self.para = para4498 def factory(*args_, **kwargs_):4499 if docEntryType.subclass:4500 return docEntryType.subclass(*args_, **kwargs_)4501 else:4502 return docEntryType(*args_, **kwargs_)4503 factory = staticmethod(factory)4504 def get_para(self): return self.para4505 def set_para(self, para): self.para = para4506 def add_para(self, value): self.para.append(value)4507 def insert_para(self, index, value): self.para[index] = value4508 def get_thead(self): return self.thead4509 def set_thead(self, thead): self.thead = thead4510 def export(self, outfile, level, namespace_='', name_='docEntryType', namespacedef_=''):4511 showIndent(outfile, level)4512 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4513 self.exportAttributes(outfile, level, namespace_, name_='docEntryType')4514 if self.hasContent_():4515 outfile.write('>\n')4516 self.exportChildren(outfile, level + 1, namespace_, name_)4517 showIndent(outfile, level)4518 outfile.write('</%s%s>\n' % (namespace_, name_))4519 else:4520 outfile.write(' />\n')4521 def exportAttributes(self, outfile, level, namespace_='', name_='docEntryType'):4522 if self.thead is not None:4523 outfile.write(' thead=%s' % (quote_attrib(self.thead), ))4524 def exportChildren(self, outfile, level, namespace_='', name_='docEntryType'):4525 for para_ in self.para:4526 para_.export(outfile, level, namespace_, name_='para')4527 def hasContent_(self):4528 if (4529 self.para is not None4530 ):4531 return True4532 else:4533 return False4534 def build(self, node_):4535 attrs = node_.attributes4536 self.buildAttributes(attrs)4537 for child_ in node_.childNodes:4538 nodeName_ = child_.nodeName.split(':')[-1]4539 self.buildChildren(child_, nodeName_)4540 def buildAttributes(self, attrs):4541 if attrs.get('thead'):4542 self.thead = attrs.get('thead').value4543 def buildChildren(self, child_, nodeName_):4544 if child_.nodeType == Node.ELEMENT_NODE and \4545 nodeName_ == 'para':4546 obj_ = docParaType.factory()4547 obj_.build(child_)4548 self.para.append(obj_)4549# end class docEntryType4550class docCaptionType(GeneratedsSuper):4551 subclass = None4552 superclass = None4553 def __init__(self, valueOf_='', mixedclass_=None, content_=None):4554 if mixedclass_ is None:4555 self.mixedclass_ = MixedContainer4556 else:4557 self.mixedclass_ = mixedclass_4558 if content_ is None:4559 self.content_ = []4560 else:4561 self.content_ = content_4562 def factory(*args_, **kwargs_):4563 if docCaptionType.subclass:4564 return docCaptionType.subclass(*args_, **kwargs_)4565 else:4566 return docCaptionType(*args_, **kwargs_)4567 factory = staticmethod(factory)4568 def getValueOf_(self): return self.valueOf_4569 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4570 def export(self, outfile, level, namespace_='', name_='docCaptionType', namespacedef_=''):4571 showIndent(outfile, level)4572 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4573 self.exportAttributes(outfile, level, namespace_, name_='docCaptionType')4574 outfile.write('>')4575 self.exportChildren(outfile, level + 1, namespace_, name_)4576 outfile.write('</%s%s>\n' % (namespace_, name_))4577 def exportAttributes(self, outfile, level, namespace_='', name_='docCaptionType'):4578 pass4579 def exportChildren(self, outfile, level, namespace_='', name_='docCaptionType'):4580 if self.valueOf_.find('![CDATA')>-1:4581 value=quote_xml('%s' % self.valueOf_)4582 value=value.replace('![CDATA','<![CDATA')4583 value=value.replace(']]',']]>')4584 outfile.write(value)4585 else:4586 outfile.write(quote_xml('%s' % self.valueOf_))4587 def hasContent_(self):4588 if (4589 self.valueOf_ is not None4590 ):4591 return True4592 else:4593 return False4594 def build(self, node_):4595 attrs = node_.attributes4596 self.buildAttributes(attrs)4597 self.valueOf_ = ''4598 for child_ in node_.childNodes:4599 nodeName_ = child_.nodeName.split(':')[-1]4600 self.buildChildren(child_, nodeName_)4601 def buildAttributes(self, attrs):4602 pass4603 def buildChildren(self, child_, nodeName_):4604 if child_.nodeType == Node.TEXT_NODE:4605 obj_ = self.mixedclass_(MixedContainer.CategoryText,4606 MixedContainer.TypeNone, '', child_.nodeValue)4607 self.content_.append(obj_)4608 if child_.nodeType == Node.TEXT_NODE:4609 self.valueOf_ += child_.nodeValue4610 elif child_.nodeType == Node.CDATA_SECTION_NODE:4611 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4612# end class docCaptionType4613class docHeadingType(GeneratedsSuper):4614 subclass = None4615 superclass = None4616 def __init__(self, level=None, valueOf_='', mixedclass_=None, content_=None):4617 self.level = level4618 if mixedclass_ is None:4619 self.mixedclass_ = MixedContainer4620 else:4621 self.mixedclass_ = mixedclass_4622 if content_ is None:4623 self.content_ = []4624 else:4625 self.content_ = content_4626 def factory(*args_, **kwargs_):4627 if docHeadingType.subclass:4628 return docHeadingType.subclass(*args_, **kwargs_)4629 else:4630 return docHeadingType(*args_, **kwargs_)4631 factory = staticmethod(factory)4632 def get_level(self): return self.level4633 def set_level(self, level): self.level = level4634 def getValueOf_(self): return self.valueOf_4635 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4636 def export(self, outfile, level, namespace_='', name_='docHeadingType', namespacedef_=''):4637 showIndent(outfile, level)4638 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4639 self.exportAttributes(outfile, level, namespace_, name_='docHeadingType')4640 outfile.write('>')4641 self.exportChildren(outfile, level + 1, namespace_, name_)4642 outfile.write('</%s%s>\n' % (namespace_, name_))4643 def exportAttributes(self, outfile, level, namespace_='', name_='docHeadingType'):4644 if self.level is not None:4645 outfile.write(' level="%s"' % self.format_integer(self.level, input_name='level'))4646 def exportChildren(self, outfile, level, namespace_='', name_='docHeadingType'):4647 if self.valueOf_.find('![CDATA')>-1:4648 value=quote_xml('%s' % self.valueOf_)4649 value=value.replace('![CDATA','<![CDATA')4650 value=value.replace(']]',']]>')4651 outfile.write(value)4652 else:4653 outfile.write(quote_xml('%s' % self.valueOf_))4654 def hasContent_(self):4655 if (4656 self.valueOf_ is not None4657 ):4658 return True4659 else:4660 return False4661 def build(self, node_):4662 attrs = node_.attributes4663 self.buildAttributes(attrs)4664 self.valueOf_ = ''4665 for child_ in node_.childNodes:4666 nodeName_ = child_.nodeName.split(':')[-1]4667 self.buildChildren(child_, nodeName_)4668 def buildAttributes(self, attrs):4669 if attrs.get('level'):4670 try:4671 self.level = int(attrs.get('level').value)4672 except ValueError as exp:4673 raise ValueError('Bad integer attribute (level): %s' % exp)4674 def buildChildren(self, child_, nodeName_):4675 if child_.nodeType == Node.TEXT_NODE:4676 obj_ = self.mixedclass_(MixedContainer.CategoryText,4677 MixedContainer.TypeNone, '', child_.nodeValue)4678 self.content_.append(obj_)4679 if child_.nodeType == Node.TEXT_NODE:4680 self.valueOf_ += child_.nodeValue4681 elif child_.nodeType == Node.CDATA_SECTION_NODE:4682 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4683# end class docHeadingType4684class docImageType(GeneratedsSuper):4685 subclass = None4686 superclass = None4687 def __init__(self, width=None, type_=None, name=None, height=None, valueOf_='', mixedclass_=None, content_=None):4688 self.width = width4689 self.type_ = type_4690 self.name = name4691 self.height = height4692 if mixedclass_ is None:4693 self.mixedclass_ = MixedContainer4694 else:4695 self.mixedclass_ = mixedclass_4696 if content_ is None:4697 self.content_ = []4698 else:4699 self.content_ = content_4700 def factory(*args_, **kwargs_):4701 if docImageType.subclass:4702 return docImageType.subclass(*args_, **kwargs_)4703 else:4704 return docImageType(*args_, **kwargs_)4705 factory = staticmethod(factory)4706 def get_width(self): return self.width4707 def set_width(self, width): self.width = width4708 def get_type(self): return self.type_4709 def set_type(self, type_): self.type_ = type_4710 def get_name(self): return self.name4711 def set_name(self, name): self.name = name4712 def get_height(self): return self.height4713 def set_height(self, height): self.height = height4714 def getValueOf_(self): return self.valueOf_4715 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4716 def export(self, outfile, level, namespace_='', name_='docImageType', namespacedef_=''):4717 showIndent(outfile, level)4718 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4719 self.exportAttributes(outfile, level, namespace_, name_='docImageType')4720 outfile.write('>')4721 self.exportChildren(outfile, level + 1, namespace_, name_)4722 outfile.write('</%s%s>\n' % (namespace_, name_))4723 def exportAttributes(self, outfile, level, namespace_='', name_='docImageType'):4724 if self.width is not None:4725 outfile.write(' width=%s' % (self.format_string(quote_attrib(self.width).encode(ExternalEncoding), input_name='width'), ))4726 if self.type_ is not None:4727 outfile.write(' type=%s' % (quote_attrib(self.type_), ))4728 if self.name is not None:4729 outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))4730 if self.height is not None:4731 outfile.write(' height=%s' % (self.format_string(quote_attrib(self.height).encode(ExternalEncoding), input_name='height'), ))4732 def exportChildren(self, outfile, level, namespace_='', name_='docImageType'):4733 if self.valueOf_.find('![CDATA')>-1:4734 value=quote_xml('%s' % self.valueOf_)4735 value=value.replace('![CDATA','<![CDATA')4736 value=value.replace(']]',']]>')4737 outfile.write(value)4738 else:4739 outfile.write(quote_xml('%s' % self.valueOf_))4740 def hasContent_(self):4741 if (4742 self.valueOf_ is not None4743 ):4744 return True4745 else:4746 return False4747 def build(self, node_):4748 attrs = node_.attributes4749 self.buildAttributes(attrs)4750 self.valueOf_ = ''4751 for child_ in node_.childNodes:4752 nodeName_ = child_.nodeName.split(':')[-1]4753 self.buildChildren(child_, nodeName_)4754 def buildAttributes(self, attrs):4755 if attrs.get('width'):4756 self.width = attrs.get('width').value4757 if attrs.get('type'):4758 self.type_ = attrs.get('type').value4759 if attrs.get('name'):4760 self.name = attrs.get('name').value4761 if attrs.get('height'):4762 self.height = attrs.get('height').value4763 def buildChildren(self, child_, nodeName_):4764 if child_.nodeType == Node.TEXT_NODE:4765 obj_ = self.mixedclass_(MixedContainer.CategoryText,4766 MixedContainer.TypeNone, '', child_.nodeValue)4767 self.content_.append(obj_)4768 if child_.nodeType == Node.TEXT_NODE:4769 self.valueOf_ += child_.nodeValue4770 elif child_.nodeType == Node.CDATA_SECTION_NODE:4771 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4772# end class docImageType4773class docDotFileType(GeneratedsSuper):4774 subclass = None4775 superclass = None4776 def __init__(self, name=None, valueOf_='', mixedclass_=None, content_=None):4777 self.name = name4778 if mixedclass_ is None:4779 self.mixedclass_ = MixedContainer4780 else:4781 self.mixedclass_ = mixedclass_4782 if content_ is None:4783 self.content_ = []4784 else:4785 self.content_ = content_4786 def factory(*args_, **kwargs_):4787 if docDotFileType.subclass:4788 return docDotFileType.subclass(*args_, **kwargs_)4789 else:4790 return docDotFileType(*args_, **kwargs_)4791 factory = staticmethod(factory)4792 def get_name(self): return self.name4793 def set_name(self, name): self.name = name4794 def getValueOf_(self): return self.valueOf_4795 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4796 def export(self, outfile, level, namespace_='', name_='docDotFileType', namespacedef_=''):4797 showIndent(outfile, level)4798 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4799 self.exportAttributes(outfile, level, namespace_, name_='docDotFileType')4800 outfile.write('>')4801 self.exportChildren(outfile, level + 1, namespace_, name_)4802 outfile.write('</%s%s>\n' % (namespace_, name_))4803 def exportAttributes(self, outfile, level, namespace_='', name_='docDotFileType'):4804 if self.name is not None:4805 outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))4806 def exportChildren(self, outfile, level, namespace_='', name_='docDotFileType'):4807 if self.valueOf_.find('![CDATA')>-1:4808 value=quote_xml('%s' % self.valueOf_)4809 value=value.replace('![CDATA','<![CDATA')4810 value=value.replace(']]',']]>')4811 outfile.write(value)4812 else:4813 outfile.write(quote_xml('%s' % self.valueOf_))4814 def hasContent_(self):4815 if (4816 self.valueOf_ is not None4817 ):4818 return True4819 else:4820 return False4821 def build(self, node_):4822 attrs = node_.attributes4823 self.buildAttributes(attrs)4824 self.valueOf_ = ''4825 for child_ in node_.childNodes:4826 nodeName_ = child_.nodeName.split(':')[-1]4827 self.buildChildren(child_, nodeName_)4828 def buildAttributes(self, attrs):4829 if attrs.get('name'):4830 self.name = attrs.get('name').value4831 def buildChildren(self, child_, nodeName_):4832 if child_.nodeType == Node.TEXT_NODE:4833 obj_ = self.mixedclass_(MixedContainer.CategoryText,4834 MixedContainer.TypeNone, '', child_.nodeValue)4835 self.content_.append(obj_)4836 if child_.nodeType == Node.TEXT_NODE:4837 self.valueOf_ += child_.nodeValue4838 elif child_.nodeType == Node.CDATA_SECTION_NODE:4839 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4840# end class docDotFileType4841class docTocItemType(GeneratedsSuper):4842 subclass = None4843 superclass = None4844 def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None):4845 self.id = id4846 if mixedclass_ is None:4847 self.mixedclass_ = MixedContainer4848 else:4849 self.mixedclass_ = mixedclass_4850 if content_ is None:4851 self.content_ = []4852 else:4853 self.content_ = content_4854 def factory(*args_, **kwargs_):4855 if docTocItemType.subclass:4856 return docTocItemType.subclass(*args_, **kwargs_)4857 else:4858 return docTocItemType(*args_, **kwargs_)4859 factory = staticmethod(factory)4860 def get_id(self): return self.id4861 def set_id(self, id): self.id = id4862 def getValueOf_(self): return self.valueOf_4863 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_4864 def export(self, outfile, level, namespace_='', name_='docTocItemType', namespacedef_=''):4865 showIndent(outfile, level)4866 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4867 self.exportAttributes(outfile, level, namespace_, name_='docTocItemType')4868 outfile.write('>')4869 self.exportChildren(outfile, level + 1, namespace_, name_)4870 outfile.write('</%s%s>\n' % (namespace_, name_))4871 def exportAttributes(self, outfile, level, namespace_='', name_='docTocItemType'):4872 if self.id is not None:4873 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))4874 def exportChildren(self, outfile, level, namespace_='', name_='docTocItemType'):4875 if self.valueOf_.find('![CDATA')>-1:4876 value=quote_xml('%s' % self.valueOf_)4877 value=value.replace('![CDATA','<![CDATA')4878 value=value.replace(']]',']]>')4879 outfile.write(value)4880 else:4881 outfile.write(quote_xml('%s' % self.valueOf_))4882 def hasContent_(self):4883 if (4884 self.valueOf_ is not None4885 ):4886 return True4887 else:4888 return False4889 def build(self, node_):4890 attrs = node_.attributes4891 self.buildAttributes(attrs)4892 self.valueOf_ = ''4893 for child_ in node_.childNodes:4894 nodeName_ = child_.nodeName.split(':')[-1]4895 self.buildChildren(child_, nodeName_)4896 def buildAttributes(self, attrs):4897 if attrs.get('id'):4898 self.id = attrs.get('id').value4899 def buildChildren(self, child_, nodeName_):4900 if child_.nodeType == Node.TEXT_NODE:4901 obj_ = self.mixedclass_(MixedContainer.CategoryText,4902 MixedContainer.TypeNone, '', child_.nodeValue)4903 self.content_.append(obj_)4904 if child_.nodeType == Node.TEXT_NODE:4905 self.valueOf_ += child_.nodeValue4906 elif child_.nodeType == Node.CDATA_SECTION_NODE:4907 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'4908# end class docTocItemType4909class docTocListType(GeneratedsSuper):4910 subclass = None4911 superclass = None4912 def __init__(self, tocitem=None):4913 if tocitem is None:4914 self.tocitem = []4915 else:4916 self.tocitem = tocitem4917 def factory(*args_, **kwargs_):4918 if docTocListType.subclass:4919 return docTocListType.subclass(*args_, **kwargs_)4920 else:4921 return docTocListType(*args_, **kwargs_)4922 factory = staticmethod(factory)4923 def get_tocitem(self): return self.tocitem4924 def set_tocitem(self, tocitem): self.tocitem = tocitem4925 def add_tocitem(self, value): self.tocitem.append(value)4926 def insert_tocitem(self, index, value): self.tocitem[index] = value4927 def export(self, outfile, level, namespace_='', name_='docTocListType', namespacedef_=''):4928 showIndent(outfile, level)4929 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4930 self.exportAttributes(outfile, level, namespace_, name_='docTocListType')4931 if self.hasContent_():4932 outfile.write('>\n')4933 self.exportChildren(outfile, level + 1, namespace_, name_)4934 showIndent(outfile, level)4935 outfile.write('</%s%s>\n' % (namespace_, name_))4936 else:4937 outfile.write(' />\n')4938 def exportAttributes(self, outfile, level, namespace_='', name_='docTocListType'):4939 pass4940 def exportChildren(self, outfile, level, namespace_='', name_='docTocListType'):4941 for tocitem_ in self.tocitem:4942 tocitem_.export(outfile, level, namespace_, name_='tocitem')4943 def hasContent_(self):4944 if (4945 self.tocitem is not None4946 ):4947 return True4948 else:4949 return False4950 def build(self, node_):4951 attrs = node_.attributes4952 self.buildAttributes(attrs)4953 for child_ in node_.childNodes:4954 nodeName_ = child_.nodeName.split(':')[-1]4955 self.buildChildren(child_, nodeName_)4956 def buildAttributes(self, attrs):4957 pass4958 def buildChildren(self, child_, nodeName_):4959 if child_.nodeType == Node.ELEMENT_NODE and \4960 nodeName_ == 'tocitem':4961 obj_ = docTocItemType.factory()4962 obj_.build(child_)4963 self.tocitem.append(obj_)4964# end class docTocListType4965class docLanguageType(GeneratedsSuper):4966 subclass = None4967 superclass = None4968 def __init__(self, langid=None, para=None):4969 self.langid = langid4970 if para is None:4971 self.para = []4972 else:4973 self.para = para4974 def factory(*args_, **kwargs_):4975 if docLanguageType.subclass:4976 return docLanguageType.subclass(*args_, **kwargs_)4977 else:4978 return docLanguageType(*args_, **kwargs_)4979 factory = staticmethod(factory)4980 def get_para(self): return self.para4981 def set_para(self, para): self.para = para4982 def add_para(self, value): self.para.append(value)4983 def insert_para(self, index, value): self.para[index] = value4984 def get_langid(self): return self.langid4985 def set_langid(self, langid): self.langid = langid4986 def export(self, outfile, level, namespace_='', name_='docLanguageType', namespacedef_=''):4987 showIndent(outfile, level)4988 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))4989 self.exportAttributes(outfile, level, namespace_, name_='docLanguageType')4990 if self.hasContent_():4991 outfile.write('>\n')4992 self.exportChildren(outfile, level + 1, namespace_, name_)4993 showIndent(outfile, level)4994 outfile.write('</%s%s>\n' % (namespace_, name_))4995 else:4996 outfile.write(' />\n')4997 def exportAttributes(self, outfile, level, namespace_='', name_='docLanguageType'):4998 if self.langid is not None:4999 outfile.write(' langid=%s' % (self.format_string(quote_attrib(self.langid).encode(ExternalEncoding), input_name='langid'), ))5000 def exportChildren(self, outfile, level, namespace_='', name_='docLanguageType'):5001 for para_ in self.para:5002 para_.export(outfile, level, namespace_, name_='para')5003 def hasContent_(self):5004 if (5005 self.para is not None5006 ):5007 return True5008 else:5009 return False5010 def build(self, node_):5011 attrs = node_.attributes5012 self.buildAttributes(attrs)5013 for child_ in node_.childNodes:5014 nodeName_ = child_.nodeName.split(':')[-1]5015 self.buildChildren(child_, nodeName_)5016 def buildAttributes(self, attrs):5017 if attrs.get('langid'):5018 self.langid = attrs.get('langid').value5019 def buildChildren(self, child_, nodeName_):5020 if child_.nodeType == Node.ELEMENT_NODE and \5021 nodeName_ == 'para':5022 obj_ = docParaType.factory()5023 obj_.build(child_)5024 self.para.append(obj_)5025# end class docLanguageType5026class docParamListType(GeneratedsSuper):5027 subclass = None5028 superclass = None5029 def __init__(self, kind=None, parameteritem=None):5030 self.kind = kind5031 if parameteritem is None:5032 self.parameteritem = []5033 else:5034 self.parameteritem = parameteritem5035 def factory(*args_, **kwargs_):5036 if docParamListType.subclass:5037 return docParamListType.subclass(*args_, **kwargs_)5038 else:5039 return docParamListType(*args_, **kwargs_)5040 factory = staticmethod(factory)5041 def get_parameteritem(self): return self.parameteritem5042 def set_parameteritem(self, parameteritem): self.parameteritem = parameteritem5043 def add_parameteritem(self, value): self.parameteritem.append(value)5044 def insert_parameteritem(self, index, value): self.parameteritem[index] = value5045 def get_kind(self): return self.kind5046 def set_kind(self, kind): self.kind = kind5047 def export(self, outfile, level, namespace_='', name_='docParamListType', namespacedef_=''):5048 showIndent(outfile, level)5049 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5050 self.exportAttributes(outfile, level, namespace_, name_='docParamListType')5051 if self.hasContent_():5052 outfile.write('>\n')5053 self.exportChildren(outfile, level + 1, namespace_, name_)5054 showIndent(outfile, level)5055 outfile.write('</%s%s>\n' % (namespace_, name_))5056 else:5057 outfile.write(' />\n')5058 def exportAttributes(self, outfile, level, namespace_='', name_='docParamListType'):5059 if self.kind is not None:5060 outfile.write(' kind=%s' % (quote_attrib(self.kind), ))5061 def exportChildren(self, outfile, level, namespace_='', name_='docParamListType'):5062 for parameteritem_ in self.parameteritem:5063 parameteritem_.export(outfile, level, namespace_, name_='parameteritem')5064 def hasContent_(self):5065 if (5066 self.parameteritem is not None5067 ):5068 return True5069 else:5070 return False5071 def build(self, node_):5072 attrs = node_.attributes5073 self.buildAttributes(attrs)5074 for child_ in node_.childNodes:5075 nodeName_ = child_.nodeName.split(':')[-1]5076 self.buildChildren(child_, nodeName_)5077 def buildAttributes(self, attrs):5078 if attrs.get('kind'):5079 self.kind = attrs.get('kind').value5080 def buildChildren(self, child_, nodeName_):5081 if child_.nodeType == Node.ELEMENT_NODE and \5082 nodeName_ == 'parameteritem':5083 obj_ = docParamListItem.factory()5084 obj_.build(child_)5085 self.parameteritem.append(obj_)5086# end class docParamListType5087class docParamListItem(GeneratedsSuper):5088 subclass = None5089 superclass = None5090 def __init__(self, parameternamelist=None, parameterdescription=None):5091 if parameternamelist is None:5092 self.parameternamelist = []5093 else:5094 self.parameternamelist = parameternamelist5095 self.parameterdescription = parameterdescription5096 def factory(*args_, **kwargs_):5097 if docParamListItem.subclass:5098 return docParamListItem.subclass(*args_, **kwargs_)5099 else:5100 return docParamListItem(*args_, **kwargs_)5101 factory = staticmethod(factory)5102 def get_parameternamelist(self): return self.parameternamelist5103 def set_parameternamelist(self, parameternamelist): self.parameternamelist = parameternamelist5104 def add_parameternamelist(self, value): self.parameternamelist.append(value)5105 def insert_parameternamelist(self, index, value): self.parameternamelist[index] = value5106 def get_parameterdescription(self): return self.parameterdescription5107 def set_parameterdescription(self, parameterdescription): self.parameterdescription = parameterdescription5108 def export(self, outfile, level, namespace_='', name_='docParamListItem', namespacedef_=''):5109 showIndent(outfile, level)5110 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5111 self.exportAttributes(outfile, level, namespace_, name_='docParamListItem')5112 if self.hasContent_():5113 outfile.write('>\n')5114 self.exportChildren(outfile, level + 1, namespace_, name_)5115 showIndent(outfile, level)5116 outfile.write('</%s%s>\n' % (namespace_, name_))5117 else:5118 outfile.write(' />\n')5119 def exportAttributes(self, outfile, level, namespace_='', name_='docParamListItem'):5120 pass5121 def exportChildren(self, outfile, level, namespace_='', name_='docParamListItem'):5122 for parameternamelist_ in self.parameternamelist:5123 parameternamelist_.export(outfile, level, namespace_, name_='parameternamelist')5124 if self.parameterdescription:5125 self.parameterdescription.export(outfile, level, namespace_, name_='parameterdescription', )5126 def hasContent_(self):5127 if (5128 self.parameternamelist is not None or5129 self.parameterdescription is not None5130 ):5131 return True5132 else:5133 return False5134 def build(self, node_):5135 attrs = node_.attributes5136 self.buildAttributes(attrs)5137 for child_ in node_.childNodes:5138 nodeName_ = child_.nodeName.split(':')[-1]5139 self.buildChildren(child_, nodeName_)5140 def buildAttributes(self, attrs):5141 pass5142 def buildChildren(self, child_, nodeName_):5143 if child_.nodeType == Node.ELEMENT_NODE and \5144 nodeName_ == 'parameternamelist':5145 obj_ = docParamNameList.factory()5146 obj_.build(child_)5147 self.parameternamelist.append(obj_)5148 elif child_.nodeType == Node.ELEMENT_NODE and \5149 nodeName_ == 'parameterdescription':5150 obj_ = descriptionType.factory()5151 obj_.build(child_)5152 self.set_parameterdescription(obj_)5153# end class docParamListItem5154class docParamNameList(GeneratedsSuper):5155 subclass = None5156 superclass = None5157 def __init__(self, parametername=None):5158 if parametername is None:5159 self.parametername = []5160 else:5161 self.parametername = parametername5162 def factory(*args_, **kwargs_):5163 if docParamNameList.subclass:5164 return docParamNameList.subclass(*args_, **kwargs_)5165 else:5166 return docParamNameList(*args_, **kwargs_)5167 factory = staticmethod(factory)5168 def get_parametername(self): return self.parametername5169 def set_parametername(self, parametername): self.parametername = parametername5170 def add_parametername(self, value): self.parametername.append(value)5171 def insert_parametername(self, index, value): self.parametername[index] = value5172 def export(self, outfile, level, namespace_='', name_='docParamNameList', namespacedef_=''):5173 showIndent(outfile, level)5174 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5175 self.exportAttributes(outfile, level, namespace_, name_='docParamNameList')5176 if self.hasContent_():5177 outfile.write('>\n')5178 self.exportChildren(outfile, level + 1, namespace_, name_)5179 showIndent(outfile, level)5180 outfile.write('</%s%s>\n' % (namespace_, name_))5181 else:5182 outfile.write(' />\n')5183 def exportAttributes(self, outfile, level, namespace_='', name_='docParamNameList'):5184 pass5185 def exportChildren(self, outfile, level, namespace_='', name_='docParamNameList'):5186 for parametername_ in self.parametername:5187 parametername_.export(outfile, level, namespace_, name_='parametername')5188 def hasContent_(self):5189 if (5190 self.parametername is not None5191 ):5192 return True5193 else:5194 return False5195 def build(self, node_):5196 attrs = node_.attributes5197 self.buildAttributes(attrs)5198 for child_ in node_.childNodes:5199 nodeName_ = child_.nodeName.split(':')[-1]5200 self.buildChildren(child_, nodeName_)5201 def buildAttributes(self, attrs):5202 pass5203 def buildChildren(self, child_, nodeName_):5204 if child_.nodeType == Node.ELEMENT_NODE and \5205 nodeName_ == 'parametername':5206 obj_ = docParamName.factory()5207 obj_.build(child_)5208 self.parametername.append(obj_)5209# end class docParamNameList5210class docParamName(GeneratedsSuper):5211 subclass = None5212 superclass = None5213 def __init__(self, direction=None, ref=None, mixedclass_=None, content_=None):5214 self.direction = direction5215 if mixedclass_ is None:5216 self.mixedclass_ = MixedContainer5217 else:5218 self.mixedclass_ = mixedclass_5219 if content_ is None:5220 self.content_ = []5221 else:5222 self.content_ = content_5223 def factory(*args_, **kwargs_):5224 if docParamName.subclass:5225 return docParamName.subclass(*args_, **kwargs_)5226 else:5227 return docParamName(*args_, **kwargs_)5228 factory = staticmethod(factory)5229 def get_ref(self): return self.ref5230 def set_ref(self, ref): self.ref = ref5231 def get_direction(self): return self.direction5232 def set_direction(self, direction): self.direction = direction5233 def export(self, outfile, level, namespace_='', name_='docParamName', namespacedef_=''):5234 showIndent(outfile, level)5235 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5236 self.exportAttributes(outfile, level, namespace_, name_='docParamName')5237 outfile.write('>')5238 self.exportChildren(outfile, level + 1, namespace_, name_)5239 outfile.write('</%s%s>\n' % (namespace_, name_))5240 def exportAttributes(self, outfile, level, namespace_='', name_='docParamName'):5241 if self.direction is not None:5242 outfile.write(' direction=%s' % (quote_attrib(self.direction), ))5243 def exportChildren(self, outfile, level, namespace_='', name_='docParamName'):5244 for item_ in self.content_:5245 item_.export(outfile, level, item_.name, namespace_)5246 def hasContent_(self):5247 if (5248 self.ref is not None5249 ):5250 return True5251 else:5252 return False5253 def build(self, node_):5254 attrs = node_.attributes5255 self.buildAttributes(attrs)5256 for child_ in node_.childNodes:5257 nodeName_ = child_.nodeName.split(':')[-1]5258 self.buildChildren(child_, nodeName_)5259 def buildAttributes(self, attrs):5260 if attrs.get('direction'):5261 self.direction = attrs.get('direction').value5262 def buildChildren(self, child_, nodeName_):5263 if child_.nodeType == Node.ELEMENT_NODE and \5264 nodeName_ == 'ref':5265 childobj_ = docRefTextType.factory()5266 childobj_.build(child_)5267 obj_ = self.mixedclass_(MixedContainer.CategoryComplex,5268 MixedContainer.TypeNone, 'ref', childobj_)5269 self.content_.append(obj_)5270 elif child_.nodeType == Node.TEXT_NODE:5271 obj_ = self.mixedclass_(MixedContainer.CategoryText,5272 MixedContainer.TypeNone, '', child_.nodeValue)5273 self.content_.append(obj_)5274# end class docParamName5275class docXRefSectType(GeneratedsSuper):5276 subclass = None5277 superclass = None5278 def __init__(self, id=None, xreftitle=None, xrefdescription=None):5279 self.id = id5280 if xreftitle is None:5281 self.xreftitle = []5282 else:5283 self.xreftitle = xreftitle5284 self.xrefdescription = xrefdescription5285 def factory(*args_, **kwargs_):5286 if docXRefSectType.subclass:5287 return docXRefSectType.subclass(*args_, **kwargs_)5288 else:5289 return docXRefSectType(*args_, **kwargs_)5290 factory = staticmethod(factory)5291 def get_xreftitle(self): return self.xreftitle5292 def set_xreftitle(self, xreftitle): self.xreftitle = xreftitle5293 def add_xreftitle(self, value): self.xreftitle.append(value)5294 def insert_xreftitle(self, index, value): self.xreftitle[index] = value5295 def get_xrefdescription(self): return self.xrefdescription5296 def set_xrefdescription(self, xrefdescription): self.xrefdescription = xrefdescription5297 def get_id(self): return self.id5298 def set_id(self, id): self.id = id5299 def export(self, outfile, level, namespace_='', name_='docXRefSectType', namespacedef_=''):5300 showIndent(outfile, level)5301 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5302 self.exportAttributes(outfile, level, namespace_, name_='docXRefSectType')5303 if self.hasContent_():5304 outfile.write('>\n')5305 self.exportChildren(outfile, level + 1, namespace_, name_)5306 showIndent(outfile, level)5307 outfile.write('</%s%s>\n' % (namespace_, name_))5308 else:5309 outfile.write(' />\n')5310 def exportAttributes(self, outfile, level, namespace_='', name_='docXRefSectType'):5311 if self.id is not None:5312 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))5313 def exportChildren(self, outfile, level, namespace_='', name_='docXRefSectType'):5314 for xreftitle_ in self.xreftitle:5315 showIndent(outfile, level)5316 outfile.write('<%sxreftitle>%s</%sxreftitle>\n' % (namespace_, self.format_string(quote_xml(xreftitle_).encode(ExternalEncoding), input_name='xreftitle'), namespace_))5317 if self.xrefdescription:5318 self.xrefdescription.export(outfile, level, namespace_, name_='xrefdescription', )5319 def hasContent_(self):5320 if (5321 self.xreftitle is not None or5322 self.xrefdescription is not None5323 ):5324 return True5325 else:5326 return False5327 def build(self, node_):5328 attrs = node_.attributes5329 self.buildAttributes(attrs)5330 for child_ in node_.childNodes:5331 nodeName_ = child_.nodeName.split(':')[-1]5332 self.buildChildren(child_, nodeName_)5333 def buildAttributes(self, attrs):5334 if attrs.get('id'):5335 self.id = attrs.get('id').value5336 def buildChildren(self, child_, nodeName_):5337 if child_.nodeType == Node.ELEMENT_NODE and \5338 nodeName_ == 'xreftitle':5339 xreftitle_ = ''5340 for text__content_ in child_.childNodes:5341 xreftitle_ += text__content_.nodeValue5342 self.xreftitle.append(xreftitle_)5343 elif child_.nodeType == Node.ELEMENT_NODE and \5344 nodeName_ == 'xrefdescription':5345 obj_ = descriptionType.factory()5346 obj_.build(child_)5347 self.set_xrefdescription(obj_)5348# end class docXRefSectType5349class docCopyType(GeneratedsSuper):5350 subclass = None5351 superclass = None5352 def __init__(self, link=None, para=None, sect1=None, internal=None):5353 self.link = link5354 if para is None:5355 self.para = []5356 else:5357 self.para = para5358 if sect1 is None:5359 self.sect1 = []5360 else:5361 self.sect1 = sect15362 self.internal = internal5363 def factory(*args_, **kwargs_):5364 if docCopyType.subclass:5365 return docCopyType.subclass(*args_, **kwargs_)5366 else:5367 return docCopyType(*args_, **kwargs_)5368 factory = staticmethod(factory)5369 def get_para(self): return self.para5370 def set_para(self, para): self.para = para5371 def add_para(self, value): self.para.append(value)5372 def insert_para(self, index, value): self.para[index] = value5373 def get_sect1(self): return self.sect15374 def set_sect1(self, sect1): self.sect1 = sect15375 def add_sect1(self, value): self.sect1.append(value)5376 def insert_sect1(self, index, value): self.sect1[index] = value5377 def get_internal(self): return self.internal5378 def set_internal(self, internal): self.internal = internal5379 def get_link(self): return self.link5380 def set_link(self, link): self.link = link5381 def export(self, outfile, level, namespace_='', name_='docCopyType', namespacedef_=''):5382 showIndent(outfile, level)5383 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5384 self.exportAttributes(outfile, level, namespace_, name_='docCopyType')5385 if self.hasContent_():5386 outfile.write('>\n')5387 self.exportChildren(outfile, level + 1, namespace_, name_)5388 showIndent(outfile, level)5389 outfile.write('</%s%s>\n' % (namespace_, name_))5390 else:5391 outfile.write(' />\n')5392 def exportAttributes(self, outfile, level, namespace_='', name_='docCopyType'):5393 if self.link is not None:5394 outfile.write(' link=%s' % (self.format_string(quote_attrib(self.link).encode(ExternalEncoding), input_name='link'), ))5395 def exportChildren(self, outfile, level, namespace_='', name_='docCopyType'):5396 for para_ in self.para:5397 para_.export(outfile, level, namespace_, name_='para')5398 for sect1_ in self.sect1:5399 sect1_.export(outfile, level, namespace_, name_='sect1')5400 if self.internal:5401 self.internal.export(outfile, level, namespace_, name_='internal')5402 def hasContent_(self):5403 if (5404 self.para is not None or5405 self.sect1 is not None or5406 self.internal is not None5407 ):5408 return True5409 else:5410 return False5411 def build(self, node_):5412 attrs = node_.attributes5413 self.buildAttributes(attrs)5414 for child_ in node_.childNodes:5415 nodeName_ = child_.nodeName.split(':')[-1]5416 self.buildChildren(child_, nodeName_)5417 def buildAttributes(self, attrs):5418 if attrs.get('link'):5419 self.link = attrs.get('link').value5420 def buildChildren(self, child_, nodeName_):5421 if child_.nodeType == Node.ELEMENT_NODE and \5422 nodeName_ == 'para':5423 obj_ = docParaType.factory()5424 obj_.build(child_)5425 self.para.append(obj_)5426 elif child_.nodeType == Node.ELEMENT_NODE and \5427 nodeName_ == 'sect1':5428 obj_ = docSect1Type.factory()5429 obj_.build(child_)5430 self.sect1.append(obj_)5431 elif child_.nodeType == Node.ELEMENT_NODE and \5432 nodeName_ == 'internal':5433 obj_ = docInternalType.factory()5434 obj_.build(child_)5435 self.set_internal(obj_)5436# end class docCopyType5437class docCharType(GeneratedsSuper):5438 subclass = None5439 superclass = None5440 def __init__(self, char=None, valueOf_=''):5441 self.char = char5442 self.valueOf_ = valueOf_5443 def factory(*args_, **kwargs_):5444 if docCharType.subclass:5445 return docCharType.subclass(*args_, **kwargs_)5446 else:5447 return docCharType(*args_, **kwargs_)5448 factory = staticmethod(factory)5449 def get_char(self): return self.char5450 def set_char(self, char): self.char = char5451 def getValueOf_(self): return self.valueOf_5452 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_5453 def export(self, outfile, level, namespace_='', name_='docCharType', namespacedef_=''):5454 showIndent(outfile, level)5455 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5456 self.exportAttributes(outfile, level, namespace_, name_='docCharType')5457 if self.hasContent_():5458 outfile.write('>\n')5459 self.exportChildren(outfile, level + 1, namespace_, name_)5460 showIndent(outfile, level)5461 outfile.write('</%s%s>\n' % (namespace_, name_))5462 else:5463 outfile.write(' />\n')5464 def exportAttributes(self, outfile, level, namespace_='', name_='docCharType'):5465 if self.char is not None:5466 outfile.write(' char=%s' % (quote_attrib(self.char), ))5467 def exportChildren(self, outfile, level, namespace_='', name_='docCharType'):5468 if self.valueOf_.find('![CDATA')>-1:5469 value=quote_xml('%s' % self.valueOf_)5470 value=value.replace('![CDATA','<![CDATA')5471 value=value.replace(']]',']]>')5472 outfile.write(value)5473 else:5474 outfile.write(quote_xml('%s' % self.valueOf_))5475 def hasContent_(self):5476 if (5477 self.valueOf_ is not None5478 ):5479 return True5480 else:5481 return False5482 def build(self, node_):5483 attrs = node_.attributes5484 self.buildAttributes(attrs)5485 self.valueOf_ = ''5486 for child_ in node_.childNodes:5487 nodeName_ = child_.nodeName.split(':')[-1]5488 self.buildChildren(child_, nodeName_)5489 def buildAttributes(self, attrs):5490 if attrs.get('char'):5491 self.char = attrs.get('char').value5492 def buildChildren(self, child_, nodeName_):5493 if child_.nodeType == Node.TEXT_NODE:5494 self.valueOf_ += child_.nodeValue5495 elif child_.nodeType == Node.CDATA_SECTION_NODE:5496 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'5497# end class docCharType5498class docEmptyType(GeneratedsSuper):5499 subclass = None5500 superclass = None5501 def __init__(self, valueOf_=''):5502 self.valueOf_ = valueOf_5503 def factory(*args_, **kwargs_):5504 if docEmptyType.subclass:5505 return docEmptyType.subclass(*args_, **kwargs_)5506 else:5507 return docEmptyType(*args_, **kwargs_)5508 factory = staticmethod(factory)5509 def getValueOf_(self): return self.valueOf_5510 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_5511 def export(self, outfile, level, namespace_='', name_='docEmptyType', namespacedef_=''):5512 showIndent(outfile, level)5513 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))5514 self.exportAttributes(outfile, level, namespace_, name_='docEmptyType')5515 if self.hasContent_():5516 outfile.write('>\n')5517 self.exportChildren(outfile, level + 1, namespace_, name_)5518 showIndent(outfile, level)5519 outfile.write('</%s%s>\n' % (namespace_, name_))5520 else:5521 outfile.write(' />\n')5522 def exportAttributes(self, outfile, level, namespace_='', name_='docEmptyType'):5523 pass5524 def exportChildren(self, outfile, level, namespace_='', name_='docEmptyType'):5525 if self.valueOf_.find('![CDATA')>-1:5526 value=quote_xml('%s' % self.valueOf_)5527 value=value.replace('![CDATA','<![CDATA')5528 value=value.replace(']]',']]>')5529 outfile.write(value)5530 else:5531 outfile.write(quote_xml('%s' % self.valueOf_))5532 def hasContent_(self):5533 if (5534 self.valueOf_ is not None5535 ):5536 return True5537 else:5538 return False5539 def build(self, node_):5540 attrs = node_.attributes5541 self.buildAttributes(attrs)5542 self.valueOf_ = ''5543 for child_ in node_.childNodes:5544 nodeName_ = child_.nodeName.split(':')[-1]5545 self.buildChildren(child_, nodeName_)5546 def buildAttributes(self, attrs):5547 pass5548 def buildChildren(self, child_, nodeName_):5549 if child_.nodeType == Node.TEXT_NODE:5550 self.valueOf_ += child_.nodeValue5551 elif child_.nodeType == Node.CDATA_SECTION_NODE:5552 self.valueOf_ += '![CDATA['+child_.nodeValue+']]'5553# end class docEmptyType5554USAGE_TEXT = """5555Usage: python <Parser>.py [ -s ] <in_xml_file>5556Options:5557 -s Use the SAX parser, not the minidom parser.5558"""5559def usage():5560 print(USAGE_TEXT)...

Full Screen

Full Screen

attrib_textview_typing.py

Source:attrib_textview_typing.py Github

copy

Full Screen

...8NSFontAttributeName=ns('NSFont')9NSForegroundColorAttributeName=ns('NSColor')10UIFont=ObjCClass('UIFont')11import ui12def buildAttributes():13 # d=NSMutableDictionary.new()14 d={15 NSForegroundColorAttributeName:UIColor.colorWithRed_green_blue_alpha_(tv.R,tv.G,tv.B,1.),16 NSFontAttributeName:UIFont.systemFontOfSize_(tv.fontsize)17}18 tvobj.setTypingAttributes_(d)19 desclbl.text='Font size={} R={:0.2f}, G={:0.2f}, B={:0.2f}'.format(tv.fontsize, tv.R, tv.G, tv.B)20 return d21 22def SizeSliderAction(sender):23 tv.fontsize=round(6+sender.value*72.0)24 buildAttributes()25 26def RGBSliderAction(color):27 def action(sender):28 setattr(tv,color,sender.value)29 buildAttributes()30 return action31count=032def textview_should_change(sender,text):33 global count34 buildAttributes()35 count+=136 return True37v=ui.View(frame=(0,0,576,576),bg_color=(0.7,)*3)38txtsize=ui.Slider(bg_color=(1,1,1),frame=(0,50,300,30))39redslider=ui.Slider(bg_color=(1,0,0),frame=(0,80,300,30))40greenslider=ui.Slider(bg_color=(0,1,0),frame=(0,110,300,30))41blueslider=ui.Slider(bg_color=(0,0,1),frame=(0,140,300,30))42txtsize.action=SizeSliderAction43redslider.action=RGBSliderAction('R')44greenslider.action=RGBSliderAction('G')45blueslider.action=RGBSliderAction('B')46desclbl=ui.Label(frame=(0,0,300,20))47v.add_subview(txtsize)48v.add_subview(redslider)49v.add_subview(greenslider)50v.add_subview(blueslider)51v.add_subview(desclbl)52tv=ui.TextView(bg_color='white',frame=(0,150,300,300))53tv.textview_should_change=textview_should_change54tv.delegate=tv55tv.fontsize=1256tv.R=057tv.G=058tv.B=059tv.text='type here'60txtsize.value=(tv.font[1]-6)/72.061v.add_subview(tv)62v.present('sheet')63tvobj=ObjCInstance(tv)...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful