1#!/usr/bin/env python 2 3# 4# Generated Thu Jun 11 18:44:25 2009 by generateDS.py. 5# 6 7from __future__ import print_function 8from __future__ import unicode_literals 9 10import sys 11 12from xml.dom import minidom 13from xml.dom import Node 14 15import six 16 17 18# 19# User methods 20# 21# Calls to the methods in these classes are generated by generateDS.py. 22# You can replace these methods by re-implementing the following class 23# in a module named generatedssuper.py. 24 25try: 26 from generatedssuper import GeneratedsSuper 27except ImportError as exp: 28 29 class GeneratedsSuper(object): 30 def format_string(self, input_data, input_name=''): 31 return input_data 32 def format_integer(self, input_data, input_name=''): 33 return '%d' % input_data 34 def format_float(self, input_data, input_name=''): 35 return '%f' % input_data 36 def format_double(self, input_data, input_name=''): 37 return '%e' % input_data 38 def format_boolean(self, input_data, input_name=''): 39 return '%s' % input_data 40 41 42# 43# If you have installed IPython you can uncomment and use the following. 44# IPython is available from http://ipython.scipy.org/. 45# 46 47## from IPython.Shell import IPShellEmbed 48## args = '' 49## ipshell = IPShellEmbed(args, 50## banner = 'Dropping into IPython', 51## exit_msg = 'Leaving Interpreter, back to program.') 52 53# Then use the following line where and when you want to drop into the 54# IPython shell: 55# ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit') 56 57# 58# Globals 59# 60 61ExternalEncoding = 'ascii' 62 63# 64# Support/utility functions. 65# 66 67def showIndent(outfile, level): 68 for idx in range(level): 69 outfile.write(' ') 70 71def quote_xml(inStr): 72 s1 = (isinstance(inStr, six.string_types) and inStr or 73 '%s' % inStr) 74 s1 = s1.replace('&', '&') 75 s1 = s1.replace('<', '<') 76 s1 = s1.replace('>', '>') 77 return s1 78 79def quote_attrib(inStr): 80 s1 = (isinstance(inStr, six.string_types) and inStr or 81 '%s' % inStr) 82 s1 = s1.replace('&', '&') 83 s1 = s1.replace('<', '<') 84 s1 = s1.replace('>', '>') 85 if '"' in s1: 86 if "'" in s1: 87 s1 = '"%s"' % s1.replace('"', """) 88 else: 89 s1 = "'%s'" % s1 90 else: 91 s1 = '"%s"' % s1 92 return s1 93 94def quote_python(inStr): 95 s1 = inStr 96 if s1.find("'") == -1: 97 if s1.find('\n') == -1: 98 return "'%s'" % s1 99 else: 100 return "'''%s'''" % s1 101 else: 102 if s1.find('"') != -1: 103 s1 = s1.replace('"', '\\"') 104 if s1.find('\n') == -1: 105 return '"%s"' % s1 106 else: 107 return '"""%s"""' % s1 108 109 110class MixedContainer(object): 111 # Constants for category: 112 CategoryNone = 0 113 CategoryText = 1 114 CategorySimple = 2 115 CategoryComplex = 3 116 # Constants for content_type: 117 TypeNone = 0 118 TypeText = 1 119 TypeString = 2 120 TypeInteger = 3 121 TypeFloat = 4 122 TypeDecimal = 5 123 TypeDouble = 6 124 TypeBoolean = 7 125 def __init__(self, category, content_type, name, value): 126 self.category = category 127 self.content_type = content_type 128 self.name = name 129 self.value = value 130 def getCategory(self): 131 return self.category 132 def getContenttype(self, content_type): 133 return self.content_type 134 def getValue(self): 135 return self.value 136 def getName(self): 137 return self.name 138 def export(self, outfile, level, name, namespace): 139 if self.category == MixedContainer.CategoryText: 140 outfile.write(self.value) 141 elif self.category == MixedContainer.CategorySimple: 142 self.exportSimple(outfile, level, name) 143 else: # category == MixedContainer.CategoryComplex 144 self.value.export(outfile, level, namespace,name) 145 def exportSimple(self, outfile, level, name): 146 if self.content_type == MixedContainer.TypeString: 147 outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name)) 148 elif self.content_type == MixedContainer.TypeInteger or \ 149 self.content_type == MixedContainer.TypeBoolean: 150 outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name)) 151 elif self.content_type == MixedContainer.TypeFloat or \ 152 self.content_type == MixedContainer.TypeDecimal: 153 outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name)) 154 elif self.content_type == MixedContainer.TypeDouble: 155 outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name)) 156 def exportLiteral(self, outfile, level, name): 157 if self.category == MixedContainer.CategoryText: 158 showIndent(outfile, level) 159 outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \ 160 (self.category, self.content_type, self.name, self.value)) 161 elif self.category == MixedContainer.CategorySimple: 162 showIndent(outfile, level) 163 outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \ 164 (self.category, self.content_type, self.name, self.value)) 165 else: # category == MixedContainer.CategoryComplex 166 showIndent(outfile, level) 167 outfile.write('MixedContainer(%d, %d, "%s",\n' % \ 168 (self.category, self.content_type, self.name,)) 169 self.value.exportLiteral(outfile, level + 1) 170 showIndent(outfile, level) 171 outfile.write(')\n') 172 173 174class _MemberSpec(object): 175 def __init__(self, name='', data_type='', container=0): 176 self.name = name 177 self.data_type = data_type 178 self.container = container 179 def set_name(self, name): self.name = name 180 def get_name(self): return self.name 181 def set_data_type(self, data_type): self.data_type = data_type 182 def get_data_type(self): return self.data_type 183 def set_container(self, container): self.container = container 184 def get_container(self): return self.container 185 186 187# 188# Data representation classes. 189# 190 191class DoxygenType(GeneratedsSuper): 192 subclass = None 193 superclass = None 194 def __init__(self, version=None, compounddef=None): 195 self.version = version 196 self.compounddef = compounddef 197 def factory(*args_, **kwargs_): 198 if DoxygenType.subclass: 199 return DoxygenType.subclass(*args_, **kwargs_) 200 else: 201 return DoxygenType(*args_, **kwargs_) 202 factory = staticmethod(factory) 203 def get_compounddef(self): return self.compounddef 204 def set_compounddef(self, compounddef): self.compounddef = compounddef 205 def get_version(self): return self.version 206 def set_version(self, version): self.version = version 207 def export(self, outfile, level, namespace_='', name_='DoxygenType', namespacedef_=''): 208 showIndent(outfile, level) 209 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 210 self.exportAttributes(outfile, level, namespace_, name_='DoxygenType') 211 if self.hasContent_(): 212 outfile.write('>\n') 213 self.exportChildren(outfile, level + 1, namespace_, name_) 214 showIndent(outfile, level) 215 outfile.write('</%s%s>\n' % (namespace_, name_)) 216 else: 217 outfile.write(' />\n') 218 def exportAttributes(self, outfile, level, namespace_='', name_='DoxygenType'): 219 outfile.write(' version=%s' % (quote_attrib(self.version), )) 220 def exportChildren(self, outfile, level, namespace_='', name_='DoxygenType'): 221 if self.compounddef: 222 self.compounddef.export(outfile, level, namespace_, name_='compounddef') 223 def hasContent_(self): 224 if ( 225 self.compounddef is not None 226 ): 227 return True 228 else: 229 return False 230 def exportLiteral(self, outfile, level, name_='DoxygenType'): 231 level += 1 232 self.exportLiteralAttributes(outfile, level, name_) 233 if self.hasContent_(): 234 self.exportLiteralChildren(outfile, level, name_) 235 def exportLiteralAttributes(self, outfile, level, name_): 236 if self.version is not None: 237 showIndent(outfile, level) 238 outfile.write('version = "%s",\n' % (self.version,)) 239 def exportLiteralChildren(self, outfile, level, name_): 240 if self.compounddef: 241 showIndent(outfile, level) 242 outfile.write('compounddef=model_.compounddefType(\n') 243 self.compounddef.exportLiteral(outfile, level, name_='compounddef') 244 showIndent(outfile, level) 245 outfile.write('),\n') 246 def build(self, node_): 247 attrs = node_.attributes 248 self.buildAttributes(attrs) 249 for child_ in node_.childNodes: 250 nodeName_ = child_.nodeName.split(':')[-1] 251 self.buildChildren(child_, nodeName_) 252 def buildAttributes(self, attrs): 253 if attrs.get('version'): 254 self.version = attrs.get('version').value 255 def buildChildren(self, child_, nodeName_): 256 if child_.nodeType == Node.ELEMENT_NODE and \ 257 nodeName_ == 'compounddef': 258 obj_ = compounddefType.factory() 259 obj_.build(child_) 260 self.set_compounddef(obj_) 261# end class DoxygenType 262 263 264class compounddefType(GeneratedsSuper): 265 subclass = None 266 superclass = None 267 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): 268 self.kind = kind 269 self.prot = prot 270 self.id = id 271 self.compoundname = compoundname 272 self.title = title 273 if basecompoundref is None: 274 self.basecompoundref = [] 275 else: 276 self.basecompoundref = basecompoundref 277 if derivedcompoundref is None: 278 self.derivedcompoundref = [] 279 else: 280 self.derivedcompoundref = derivedcompoundref 281 if includes is None: 282 self.includes = [] 283 else: 284 self.includes = includes 285 if includedby is None: 286 self.includedby = [] 287 else: 288 self.includedby = includedby 289 self.incdepgraph = incdepgraph 290 self.invincdepgraph = invincdepgraph 291 if innerdir is None: 292 self.innerdir = [] 293 else: 294 self.innerdir = innerdir 295 if innerfile is None: 296 self.innerfile = [] 297 else: 298 self.innerfile = innerfile 299 if innerclass is None: 300 self.innerclass = [] 301 else: 302 self.innerclass = innerclass 303 if innernamespace is None: 304 self.innernamespace = [] 305 else: 306 self.innernamespace = innernamespace 307 if innerpage is None: 308 self.innerpage = [] 309 else: 310 self.innerpage = innerpage 311 if innergroup is None: 312 self.innergroup = [] 313 else: 314 self.innergroup = innergroup 315 self.templateparamlist = templateparamlist 316 if sectiondef is None: 317 self.sectiondef = [] 318 else: 319 self.sectiondef = sectiondef 320 self.briefdescription = briefdescription 321 self.detaileddescription = detaileddescription 322 self.inheritancegraph = inheritancegraph 323 self.collaborationgraph = collaborationgraph 324 self.programlisting = programlisting 325 self.location = location 326 self.listofallmembers = listofallmembers 327 def factory(*args_, **kwargs_): 328 if compounddefType.subclass: 329 return compounddefType.subclass(*args_, **kwargs_) 330 else: 331 return compounddefType(*args_, **kwargs_) 332 factory = staticmethod(factory) 333 def get_compoundname(self): return self.compoundname 334 def set_compoundname(self, compoundname): self.compoundname = compoundname 335 def get_title(self): return self.title 336 def set_title(self, title): self.title = title 337 def get_basecompoundref(self): return self.basecompoundref 338 def set_basecompoundref(self, basecompoundref): self.basecompoundref = basecompoundref 339 def add_basecompoundref(self, value): self.basecompoundref.append(value) 340 def insert_basecompoundref(self, index, value): self.basecompoundref[index] = value 341 def get_derivedcompoundref(self): return self.derivedcompoundref 342 def set_derivedcompoundref(self, derivedcompoundref): self.derivedcompoundref = derivedcompoundref 343 def add_derivedcompoundref(self, value): self.derivedcompoundref.append(value) 344 def insert_derivedcompoundref(self, index, value): self.derivedcompoundref[index] = value 345 def get_includes(self): return self.includes 346 def set_includes(self, includes): self.includes = includes 347 def add_includes(self, value): self.includes.append(value) 348 def insert_includes(self, index, value): self.includes[index] = value 349 def get_includedby(self): return self.includedby 350 def set_includedby(self, includedby): self.includedby = includedby 351 def add_includedby(self, value): self.includedby.append(value) 352 def insert_includedby(self, index, value): self.includedby[index] = value 353 def get_incdepgraph(self): return self.incdepgraph 354 def set_incdepgraph(self, incdepgraph): self.incdepgraph = incdepgraph 355 def get_invincdepgraph(self): return self.invincdepgraph 356 def set_invincdepgraph(self, invincdepgraph): self.invincdepgraph = invincdepgraph 357 def get_innerdir(self): return self.innerdir 358 def set_innerdir(self, innerdir): self.innerdir = innerdir 359 def add_innerdir(self, value): self.innerdir.append(value) 360 def insert_innerdir(self, index, value): self.innerdir[index] = value 361 def get_innerfile(self): return self.innerfile 362 def set_innerfile(self, innerfile): self.innerfile = innerfile 363 def add_innerfile(self, value): self.innerfile.append(value) 364 def insert_innerfile(self, index, value): self.innerfile[index] = value 365 def get_innerclass(self): return self.innerclass 366 def set_innerclass(self, innerclass): self.innerclass = innerclass 367 def add_innerclass(self, value): self.innerclass.append(value) 368 def insert_innerclass(self, index, value): self.innerclass[index] = value 369 def get_innernamespace(self): return self.innernamespace 370 def set_innernamespace(self, innernamespace): self.innernamespace = innernamespace 371 def add_innernamespace(self, value): self.innernamespace.append(value) 372 def insert_innernamespace(self, index, value): self.innernamespace[index] = value 373 def get_innerpage(self): return self.innerpage 374 def set_innerpage(self, innerpage): self.innerpage = innerpage 375 def add_innerpage(self, value): self.innerpage.append(value) 376 def insert_innerpage(self, index, value): self.innerpage[index] = value 377 def get_innergroup(self): return self.innergroup 378 def set_innergroup(self, innergroup): self.innergroup = innergroup 379 def add_innergroup(self, value): self.innergroup.append(value) 380 def insert_innergroup(self, index, value): self.innergroup[index] = value 381 def get_templateparamlist(self): return self.templateparamlist 382 def set_templateparamlist(self, templateparamlist): self.templateparamlist = templateparamlist 383 def get_sectiondef(self): return self.sectiondef 384 def set_sectiondef(self, sectiondef): self.sectiondef = sectiondef 385 def add_sectiondef(self, value): self.sectiondef.append(value) 386 def insert_sectiondef(self, index, value): self.sectiondef[index] = value 387 def get_briefdescription(self): return self.briefdescription 388 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription 389 def get_detaileddescription(self): return self.detaileddescription 390 def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription 391 def get_inheritancegraph(self): return self.inheritancegraph 392 def set_inheritancegraph(self, inheritancegraph): self.inheritancegraph = inheritancegraph 393 def get_collaborationgraph(self): return self.collaborationgraph 394 def set_collaborationgraph(self, collaborationgraph): self.collaborationgraph = collaborationgraph 395 def get_programlisting(self): return self.programlisting 396 def set_programlisting(self, programlisting): self.programlisting = programlisting 397 def get_location(self): return self.location 398 def set_location(self, location): self.location = location 399 def get_listofallmembers(self): return self.listofallmembers 400 def set_listofallmembers(self, listofallmembers): self.listofallmembers = listofallmembers 401 def get_kind(self): return self.kind 402 def set_kind(self, kind): self.kind = kind 403 def get_prot(self): return self.prot 404 def set_prot(self, prot): self.prot = prot 405 def get_id(self): return self.id 406 def set_id(self, id): self.id = id 407 def export(self, outfile, level, namespace_='', name_='compounddefType', namespacedef_=''): 408 showIndent(outfile, level) 409 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 410 self.exportAttributes(outfile, level, namespace_, name_='compounddefType') 411 if self.hasContent_(): 412 outfile.write('>\n') 413 self.exportChildren(outfile, level + 1, namespace_, name_) 414 showIndent(outfile, level) 415 outfile.write('</%s%s>\n' % (namespace_, name_)) 416 else: 417 outfile.write(' />\n') 418 def exportAttributes(self, outfile, level, namespace_='', name_='compounddefType'): 419 if self.kind is not None: 420 outfile.write(' kind=%s' % (quote_attrib(self.kind), )) 421 if self.prot is not None: 422 outfile.write(' prot=%s' % (quote_attrib(self.prot), )) 423 if self.id is not None: 424 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 425 def exportChildren(self, outfile, level, namespace_='', name_='compounddefType'): 426 if self.compoundname is not None: 427 showIndent(outfile, level) 428 outfile.write('<%scompoundname>%s</%scompoundname>\n' % (namespace_, self.format_string(quote_xml(self.compoundname).encode(ExternalEncoding), input_name='compoundname'), namespace_)) 429 if self.title is not None: 430 showIndent(outfile, level) 431 outfile.write('<%stitle>%s</%stitle>\n' % (namespace_, self.format_string(quote_xml(self.title).encode(ExternalEncoding), input_name='title'), namespace_)) 432 for basecompoundref_ in self.basecompoundref: 433 basecompoundref_.export(outfile, level, namespace_, name_='basecompoundref') 434 for derivedcompoundref_ in self.derivedcompoundref: 435 derivedcompoundref_.export(outfile, level, namespace_, name_='derivedcompoundref') 436 for includes_ in self.includes: 437 includes_.export(outfile, level, namespace_, name_='includes') 438 for includedby_ in self.includedby: 439 includedby_.export(outfile, level, namespace_, name_='includedby') 440 if self.incdepgraph: 441 self.incdepgraph.export(outfile, level, namespace_, name_='incdepgraph') 442 if self.invincdepgraph: 443 self.invincdepgraph.export(outfile, level, namespace_, name_='invincdepgraph') 444 for innerdir_ in self.innerdir: 445 innerdir_.export(outfile, level, namespace_, name_='innerdir') 446 for innerfile_ in self.innerfile: 447 innerfile_.export(outfile, level, namespace_, name_='innerfile') 448 for innerclass_ in self.innerclass: 449 innerclass_.export(outfile, level, namespace_, name_='innerclass') 450 for innernamespace_ in self.innernamespace: 451 innernamespace_.export(outfile, level, namespace_, name_='innernamespace') 452 for innerpage_ in self.innerpage: 453 innerpage_.export(outfile, level, namespace_, name_='innerpage') 454 for innergroup_ in self.innergroup: 455 innergroup_.export(outfile, level, namespace_, name_='innergroup') 456 if self.templateparamlist: 457 self.templateparamlist.export(outfile, level, namespace_, name_='templateparamlist') 458 for sectiondef_ in self.sectiondef: 459 sectiondef_.export(outfile, level, namespace_, name_='sectiondef') 460 if self.briefdescription: 461 self.briefdescription.export(outfile, level, namespace_, name_='briefdescription') 462 if self.detaileddescription: 463 self.detaileddescription.export(outfile, level, namespace_, name_='detaileddescription') 464 if self.inheritancegraph: 465 self.inheritancegraph.export(outfile, level, namespace_, name_='inheritancegraph') 466 if self.collaborationgraph: 467 self.collaborationgraph.export(outfile, level, namespace_, name_='collaborationgraph') 468 if self.programlisting: 469 self.programlisting.export(outfile, level, namespace_, name_='programlisting') 470 if self.location: 471 self.location.export(outfile, level, namespace_, name_='location') 472 if self.listofallmembers: 473 self.listofallmembers.export(outfile, level, namespace_, name_='listofallmembers') 474 def hasContent_(self): 475 if ( 476 self.compoundname is not None or 477 self.title is not None or 478 self.basecompoundref is not None or 479 self.derivedcompoundref is not None or 480 self.includes is not None or 481 self.includedby is not None or 482 self.incdepgraph is not None or 483 self.invincdepgraph is not None or 484 self.innerdir is not None or 485 self.innerfile is not None or 486 self.innerclass is not None or 487 self.innernamespace is not None or 488 self.innerpage is not None or 489 self.innergroup is not None or 490 self.templateparamlist is not None or 491 self.sectiondef is not None or 492 self.briefdescription is not None or 493 self.detaileddescription is not None or 494 self.inheritancegraph is not None or 495 self.collaborationgraph is not None or 496 self.programlisting is not None or 497 self.location is not None or 498 self.listofallmembers is not None 499 ): 500 return True 501 else: 502 return False 503 def exportLiteral(self, outfile, level, name_='compounddefType'): 504 level += 1 505 self.exportLiteralAttributes(outfile, level, name_) 506 if self.hasContent_(): 507 self.exportLiteralChildren(outfile, level, name_) 508 def exportLiteralAttributes(self, outfile, level, name_): 509 if self.kind is not None: 510 showIndent(outfile, level) 511 outfile.write('kind = "%s",\n' % (self.kind,)) 512 if self.prot is not None: 513 showIndent(outfile, level) 514 outfile.write('prot = "%s",\n' % (self.prot,)) 515 if self.id is not None: 516 showIndent(outfile, level) 517 outfile.write('id = %s,\n' % (self.id,)) 518 def exportLiteralChildren(self, outfile, level, name_): 519 showIndent(outfile, level) 520 outfile.write('compoundname=%s,\n' % quote_python(self.compoundname).encode(ExternalEncoding)) 521 if self.title: 522 showIndent(outfile, level) 523 outfile.write('title=model_.xsd_string(\n') 524 self.title.exportLiteral(outfile, level, name_='title') 525 showIndent(outfile, level) 526 outfile.write('),\n') 527 showIndent(outfile, level) 528 outfile.write('basecompoundref=[\n') 529 level += 1 530 for basecompoundref in self.basecompoundref: 531 showIndent(outfile, level) 532 outfile.write('model_.basecompoundref(\n') 533 basecompoundref.exportLiteral(outfile, level, name_='basecompoundref') 534 showIndent(outfile, level) 535 outfile.write('),\n') 536 level -= 1 537 showIndent(outfile, level) 538 outfile.write('],\n') 539 showIndent(outfile, level) 540 outfile.write('derivedcompoundref=[\n') 541 level += 1 542 for derivedcompoundref in self.derivedcompoundref: 543 showIndent(outfile, level) 544 outfile.write('model_.derivedcompoundref(\n') 545 derivedcompoundref.exportLiteral(outfile, level, name_='derivedcompoundref') 546 showIndent(outfile, level) 547 outfile.write('),\n') 548 level -= 1 549 showIndent(outfile, level) 550 outfile.write('],\n') 551 showIndent(outfile, level) 552 outfile.write('includes=[\n') 553 level += 1 554 for includes in self.includes: 555 showIndent(outfile, level) 556 outfile.write('model_.includes(\n') 557 includes.exportLiteral(outfile, level, name_='includes') 558 showIndent(outfile, level) 559 outfile.write('),\n') 560 level -= 1 561 showIndent(outfile, level) 562 outfile.write('],\n') 563 showIndent(outfile, level) 564 outfile.write('includedby=[\n') 565 level += 1 566 for includedby in self.includedby: 567 showIndent(outfile, level) 568 outfile.write('model_.includedby(\n') 569 includedby.exportLiteral(outfile, level, name_='includedby') 570 showIndent(outfile, level) 571 outfile.write('),\n') 572 level -= 1 573 showIndent(outfile, level) 574 outfile.write('],\n') 575 if self.incdepgraph: 576 showIndent(outfile, level) 577 outfile.write('incdepgraph=model_.graphType(\n') 578 self.incdepgraph.exportLiteral(outfile, level, name_='incdepgraph') 579 showIndent(outfile, level) 580 outfile.write('),\n') 581 if self.invincdepgraph: 582 showIndent(outfile, level) 583 outfile.write('invincdepgraph=model_.graphType(\n') 584 self.invincdepgraph.exportLiteral(outfile, level, name_='invincdepgraph') 585 showIndent(outfile, level) 586 outfile.write('),\n') 587 showIndent(outfile, level) 588 outfile.write('innerdir=[\n') 589 level += 1 590 for innerdir in self.innerdir: 591 showIndent(outfile, level) 592 outfile.write('model_.innerdir(\n') 593 innerdir.exportLiteral(outfile, level, name_='innerdir') 594 showIndent(outfile, level) 595 outfile.write('),\n') 596 level -= 1 597 showIndent(outfile, level) 598 outfile.write('],\n') 599 showIndent(outfile, level) 600 outfile.write('innerfile=[\n') 601 level += 1 602 for innerfile in self.innerfile: 603 showIndent(outfile, level) 604 outfile.write('model_.innerfile(\n') 605 innerfile.exportLiteral(outfile, level, name_='innerfile') 606 showIndent(outfile, level) 607 outfile.write('),\n') 608 level -= 1 609 showIndent(outfile, level) 610 outfile.write('],\n') 611 showIndent(outfile, level) 612 outfile.write('innerclass=[\n') 613 level += 1 614 for innerclass in self.innerclass: 615 showIndent(outfile, level) 616 outfile.write('model_.innerclass(\n') 617 innerclass.exportLiteral(outfile, level, name_='innerclass') 618 showIndent(outfile, level) 619 outfile.write('),\n') 620 level -= 1 621 showIndent(outfile, level) 622 outfile.write('],\n') 623 showIndent(outfile, level) 624 outfile.write('innernamespace=[\n') 625 level += 1 626 for innernamespace in self.innernamespace: 627 showIndent(outfile, level) 628 outfile.write('model_.innernamespace(\n') 629 innernamespace.exportLiteral(outfile, level, name_='innernamespace') 630 showIndent(outfile, level) 631 outfile.write('),\n') 632 level -= 1 633 showIndent(outfile, level) 634 outfile.write('],\n') 635 showIndent(outfile, level) 636 outfile.write('innerpage=[\n') 637 level += 1 638 for innerpage in self.innerpage: 639 showIndent(outfile, level) 640 outfile.write('model_.innerpage(\n') 641 innerpage.exportLiteral(outfile, level, name_='innerpage') 642 showIndent(outfile, level) 643 outfile.write('),\n') 644 level -= 1 645 showIndent(outfile, level) 646 outfile.write('],\n') 647 showIndent(outfile, level) 648 outfile.write('innergroup=[\n') 649 level += 1 650 for innergroup in self.innergroup: 651 showIndent(outfile, level) 652 outfile.write('model_.innergroup(\n') 653 innergroup.exportLiteral(outfile, level, name_='innergroup') 654 showIndent(outfile, level) 655 outfile.write('),\n') 656 level -= 1 657 showIndent(outfile, level) 658 outfile.write('],\n') 659 if self.templateparamlist: 660 showIndent(outfile, level) 661 outfile.write('templateparamlist=model_.templateparamlistType(\n') 662 self.templateparamlist.exportLiteral(outfile, level, name_='templateparamlist') 663 showIndent(outfile, level) 664 outfile.write('),\n') 665 showIndent(outfile, level) 666 outfile.write('sectiondef=[\n') 667 level += 1 668 for sectiondef in self.sectiondef: 669 showIndent(outfile, level) 670 outfile.write('model_.sectiondef(\n') 671 sectiondef.exportLiteral(outfile, level, name_='sectiondef') 672 showIndent(outfile, level) 673 outfile.write('),\n') 674 level -= 1 675 showIndent(outfile, level) 676 outfile.write('],\n') 677 if self.briefdescription: 678 showIndent(outfile, level) 679 outfile.write('briefdescription=model_.descriptionType(\n') 680 self.briefdescription.exportLiteral(outfile, level, name_='briefdescription') 681 showIndent(outfile, level) 682 outfile.write('),\n') 683 if self.detaileddescription: 684 showIndent(outfile, level) 685 outfile.write('detaileddescription=model_.descriptionType(\n') 686 self.detaileddescription.exportLiteral(outfile, level, name_='detaileddescription') 687 showIndent(outfile, level) 688 outfile.write('),\n') 689 if self.inheritancegraph: 690 showIndent(outfile, level) 691 outfile.write('inheritancegraph=model_.graphType(\n') 692 self.inheritancegraph.exportLiteral(outfile, level, name_='inheritancegraph') 693 showIndent(outfile, level) 694 outfile.write('),\n') 695 if self.collaborationgraph: 696 showIndent(outfile, level) 697 outfile.write('collaborationgraph=model_.graphType(\n') 698 self.collaborationgraph.exportLiteral(outfile, level, name_='collaborationgraph') 699 showIndent(outfile, level) 700 outfile.write('),\n') 701 if self.programlisting: 702 showIndent(outfile, level) 703 outfile.write('programlisting=model_.listingType(\n') 704 self.programlisting.exportLiteral(outfile, level, name_='programlisting') 705 showIndent(outfile, level) 706 outfile.write('),\n') 707 if self.location: 708 showIndent(outfile, level) 709 outfile.write('location=model_.locationType(\n') 710 self.location.exportLiteral(outfile, level, name_='location') 711 showIndent(outfile, level) 712 outfile.write('),\n') 713 if self.listofallmembers: 714 showIndent(outfile, level) 715 outfile.write('listofallmembers=model_.listofallmembersType(\n') 716 self.listofallmembers.exportLiteral(outfile, level, name_='listofallmembers') 717 showIndent(outfile, level) 718 outfile.write('),\n') 719 def build(self, node_): 720 attrs = node_.attributes 721 self.buildAttributes(attrs) 722 for child_ in node_.childNodes: 723 nodeName_ = child_.nodeName.split(':')[-1] 724 self.buildChildren(child_, nodeName_) 725 def buildAttributes(self, attrs): 726 if attrs.get('kind'): 727 self.kind = attrs.get('kind').value 728 if attrs.get('prot'): 729 self.prot = attrs.get('prot').value 730 if attrs.get('id'): 731 self.id = attrs.get('id').value 732 def buildChildren(self, child_, nodeName_): 733 if child_.nodeType == Node.ELEMENT_NODE and \ 734 nodeName_ == 'compoundname': 735 compoundname_ = '' 736 for text__content_ in child_.childNodes: 737 compoundname_ += text__content_.nodeValue 738 self.compoundname = compoundname_ 739 elif child_.nodeType == Node.ELEMENT_NODE and \ 740 nodeName_ == 'title': 741 obj_ = docTitleType.factory() 742 obj_.build(child_) 743 self.set_title(obj_) 744 elif child_.nodeType == Node.ELEMENT_NODE and \ 745 nodeName_ == 'basecompoundref': 746 obj_ = compoundRefType.factory() 747 obj_.build(child_) 748 self.basecompoundref.append(obj_) 749 elif child_.nodeType == Node.ELEMENT_NODE and \ 750 nodeName_ == 'derivedcompoundref': 751 obj_ = compoundRefType.factory() 752 obj_.build(child_) 753 self.derivedcompoundref.append(obj_) 754 elif child_.nodeType == Node.ELEMENT_NODE and \ 755 nodeName_ == 'includes': 756 obj_ = incType.factory() 757 obj_.build(child_) 758 self.includes.append(obj_) 759 elif child_.nodeType == Node.ELEMENT_NODE and \ 760 nodeName_ == 'includedby': 761 obj_ = incType.factory() 762 obj_.build(child_) 763 self.includedby.append(obj_) 764 elif child_.nodeType == Node.ELEMENT_NODE and \ 765 nodeName_ == 'incdepgraph': 766 obj_ = graphType.factory() 767 obj_.build(child_) 768 self.set_incdepgraph(obj_) 769 elif child_.nodeType == Node.ELEMENT_NODE and \ 770 nodeName_ == 'invincdepgraph': 771 obj_ = graphType.factory() 772 obj_.build(child_) 773 self.set_invincdepgraph(obj_) 774 elif child_.nodeType == Node.ELEMENT_NODE and \ 775 nodeName_ == 'innerdir': 776 obj_ = refType.factory() 777 obj_.build(child_) 778 self.innerdir.append(obj_) 779 elif child_.nodeType == Node.ELEMENT_NODE and \ 780 nodeName_ == 'innerfile': 781 obj_ = refType.factory() 782 obj_.build(child_) 783 self.innerfile.append(obj_) 784 elif child_.nodeType == Node.ELEMENT_NODE and \ 785 nodeName_ == 'innerclass': 786 obj_ = refType.factory() 787 obj_.build(child_) 788 self.innerclass.append(obj_) 789 elif child_.nodeType == Node.ELEMENT_NODE and \ 790 nodeName_ == 'innernamespace': 791 obj_ = refType.factory() 792 obj_.build(child_) 793 self.innernamespace.append(obj_) 794 elif child_.nodeType == Node.ELEMENT_NODE and \ 795 nodeName_ == 'innerpage': 796 obj_ = refType.factory() 797 obj_.build(child_) 798 self.innerpage.append(obj_) 799 elif child_.nodeType == Node.ELEMENT_NODE and \ 800 nodeName_ == 'innergroup': 801 obj_ = refType.factory() 802 obj_.build(child_) 803 self.innergroup.append(obj_) 804 elif child_.nodeType == Node.ELEMENT_NODE and \ 805 nodeName_ == 'templateparamlist': 806 obj_ = templateparamlistType.factory() 807 obj_.build(child_) 808 self.set_templateparamlist(obj_) 809 elif child_.nodeType == Node.ELEMENT_NODE and \ 810 nodeName_ == 'sectiondef': 811 obj_ = sectiondefType.factory() 812 obj_.build(child_) 813 self.sectiondef.append(obj_) 814 elif child_.nodeType == Node.ELEMENT_NODE and \ 815 nodeName_ == 'briefdescription': 816 obj_ = descriptionType.factory() 817 obj_.build(child_) 818 self.set_briefdescription(obj_) 819 elif child_.nodeType == Node.ELEMENT_NODE and \ 820 nodeName_ == 'detaileddescription': 821 obj_ = descriptionType.factory() 822 obj_.build(child_) 823 self.set_detaileddescription(obj_) 824 elif child_.nodeType == Node.ELEMENT_NODE and \ 825 nodeName_ == 'inheritancegraph': 826 obj_ = graphType.factory() 827 obj_.build(child_) 828 self.set_inheritancegraph(obj_) 829 elif child_.nodeType == Node.ELEMENT_NODE and \ 830 nodeName_ == 'collaborationgraph': 831 obj_ = graphType.factory() 832 obj_.build(child_) 833 self.set_collaborationgraph(obj_) 834 elif child_.nodeType == Node.ELEMENT_NODE and \ 835 nodeName_ == 'programlisting': 836 obj_ = listingType.factory() 837 obj_.build(child_) 838 self.set_programlisting(obj_) 839 elif child_.nodeType == Node.ELEMENT_NODE and \ 840 nodeName_ == 'location': 841 obj_ = locationType.factory() 842 obj_.build(child_) 843 self.set_location(obj_) 844 elif child_.nodeType == Node.ELEMENT_NODE and \ 845 nodeName_ == 'listofallmembers': 846 obj_ = listofallmembersType.factory() 847 obj_.build(child_) 848 self.set_listofallmembers(obj_) 849# end class compounddefType 850 851 852class listofallmembersType(GeneratedsSuper): 853 subclass = None 854 superclass = None 855 def __init__(self, member=None): 856 if member is None: 857 self.member = [] 858 else: 859 self.member = member 860 def factory(*args_, **kwargs_): 861 if listofallmembersType.subclass: 862 return listofallmembersType.subclass(*args_, **kwargs_) 863 else: 864 return listofallmembersType(*args_, **kwargs_) 865 factory = staticmethod(factory) 866 def get_member(self): return self.member 867 def set_member(self, member): self.member = member 868 def add_member(self, value): self.member.append(value) 869 def insert_member(self, index, value): self.member[index] = value 870 def export(self, outfile, level, namespace_='', name_='listofallmembersType', namespacedef_=''): 871 showIndent(outfile, level) 872 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 873 self.exportAttributes(outfile, level, namespace_, name_='listofallmembersType') 874 if self.hasContent_(): 875 outfile.write('>\n') 876 self.exportChildren(outfile, level + 1, namespace_, name_) 877 showIndent(outfile, level) 878 outfile.write('</%s%s>\n' % (namespace_, name_)) 879 else: 880 outfile.write(' />\n') 881 def exportAttributes(self, outfile, level, namespace_='', name_='listofallmembersType'): 882 pass 883 def exportChildren(self, outfile, level, namespace_='', name_='listofallmembersType'): 884 for member_ in self.member: 885 member_.export(outfile, level, namespace_, name_='member') 886 def hasContent_(self): 887 if ( 888 self.member is not None 889 ): 890 return True 891 else: 892 return False 893 def exportLiteral(self, outfile, level, name_='listofallmembersType'): 894 level += 1 895 self.exportLiteralAttributes(outfile, level, name_) 896 if self.hasContent_(): 897 self.exportLiteralChildren(outfile, level, name_) 898 def exportLiteralAttributes(self, outfile, level, name_): 899 pass 900 def exportLiteralChildren(self, outfile, level, name_): 901 showIndent(outfile, level) 902 outfile.write('member=[\n') 903 level += 1 904 for member in self.member: 905 showIndent(outfile, level) 906 outfile.write('model_.member(\n') 907 member.exportLiteral(outfile, level, name_='member') 908 showIndent(outfile, level) 909 outfile.write('),\n') 910 level -= 1 911 showIndent(outfile, level) 912 outfile.write('],\n') 913 def build(self, node_): 914 attrs = node_.attributes 915 self.buildAttributes(attrs) 916 for child_ in node_.childNodes: 917 nodeName_ = child_.nodeName.split(':')[-1] 918 self.buildChildren(child_, nodeName_) 919 def buildAttributes(self, attrs): 920 pass 921 def buildChildren(self, child_, nodeName_): 922 if child_.nodeType == Node.ELEMENT_NODE and \ 923 nodeName_ == 'member': 924 obj_ = memberRefType.factory() 925 obj_.build(child_) 926 self.member.append(obj_) 927# end class listofallmembersType 928 929 930class memberRefType(GeneratedsSuper): 931 subclass = None 932 superclass = None 933 def __init__(self, virt=None, prot=None, refid=None, ambiguityscope=None, scope=None, name=None): 934 self.virt = virt 935 self.prot = prot 936 self.refid = refid 937 self.ambiguityscope = ambiguityscope 938 self.scope = scope 939 self.name = name 940 def factory(*args_, **kwargs_): 941 if memberRefType.subclass: 942 return memberRefType.subclass(*args_, **kwargs_) 943 else: 944 return memberRefType(*args_, **kwargs_) 945 factory = staticmethod(factory) 946 def get_scope(self): return self.scope 947 def set_scope(self, scope): self.scope = scope 948 def get_name(self): return self.name 949 def set_name(self, name): self.name = name 950 def get_virt(self): return self.virt 951 def set_virt(self, virt): self.virt = virt 952 def get_prot(self): return self.prot 953 def set_prot(self, prot): self.prot = prot 954 def get_refid(self): return self.refid 955 def set_refid(self, refid): self.refid = refid 956 def get_ambiguityscope(self): return self.ambiguityscope 957 def set_ambiguityscope(self, ambiguityscope): self.ambiguityscope = ambiguityscope 958 def export(self, outfile, level, namespace_='', name_='memberRefType', namespacedef_=''): 959 showIndent(outfile, level) 960 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 961 self.exportAttributes(outfile, level, namespace_, name_='memberRefType') 962 if self.hasContent_(): 963 outfile.write('>\n') 964 self.exportChildren(outfile, level + 1, namespace_, name_) 965 showIndent(outfile, level) 966 outfile.write('</%s%s>\n' % (namespace_, name_)) 967 else: 968 outfile.write(' />\n') 969 def exportAttributes(self, outfile, level, namespace_='', name_='memberRefType'): 970 if self.virt is not None: 971 outfile.write(' virt=%s' % (quote_attrib(self.virt), )) 972 if self.prot is not None: 973 outfile.write(' prot=%s' % (quote_attrib(self.prot), )) 974 if self.refid is not None: 975 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 976 if self.ambiguityscope is not None: 977 outfile.write(' ambiguityscope=%s' % (self.format_string(quote_attrib(self.ambiguityscope).encode(ExternalEncoding), input_name='ambiguityscope'), )) 978 def exportChildren(self, outfile, level, namespace_='', name_='memberRefType'): 979 if self.scope is not None: 980 showIndent(outfile, level) 981 outfile.write('<%sscope>%s</%sscope>\n' % (namespace_, self.format_string(quote_xml(self.scope).encode(ExternalEncoding), input_name='scope'), namespace_)) 982 if self.name is not None: 983 showIndent(outfile, level) 984 outfile.write('<%sname>%s</%sname>\n' % (namespace_, self.format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_)) 985 def hasContent_(self): 986 if ( 987 self.scope is not None or 988 self.name is not None 989 ): 990 return True 991 else: 992 return False 993 def exportLiteral(self, outfile, level, name_='memberRefType'): 994 level += 1 995 self.exportLiteralAttributes(outfile, level, name_) 996 if self.hasContent_(): 997 self.exportLiteralChildren(outfile, level, name_) 998 def exportLiteralAttributes(self, outfile, level, name_): 999 if self.virt is not None: 1000 showIndent(outfile, level) 1001 outfile.write('virt = "%s",\n' % (self.virt,)) 1002 if self.prot is not None: 1003 showIndent(outfile, level) 1004 outfile.write('prot = "%s",\n' % (self.prot,)) 1005 if self.refid is not None: 1006 showIndent(outfile, level) 1007 outfile.write('refid = %s,\n' % (self.refid,)) 1008 if self.ambiguityscope is not None: 1009 showIndent(outfile, level) 1010 outfile.write('ambiguityscope = %s,\n' % (self.ambiguityscope,)) 1011 def exportLiteralChildren(self, outfile, level, name_): 1012 showIndent(outfile, level) 1013 outfile.write('scope=%s,\n' % quote_python(self.scope).encode(ExternalEncoding)) 1014 showIndent(outfile, level) 1015 outfile.write('name=%s,\n' % quote_python(self.name).encode(ExternalEncoding)) 1016 def build(self, node_): 1017 attrs = node_.attributes 1018 self.buildAttributes(attrs) 1019 for child_ in node_.childNodes: 1020 nodeName_ = child_.nodeName.split(':')[-1] 1021 self.buildChildren(child_, nodeName_) 1022 def buildAttributes(self, attrs): 1023 if attrs.get('virt'): 1024 self.virt = attrs.get('virt').value 1025 if attrs.get('prot'): 1026 self.prot = attrs.get('prot').value 1027 if attrs.get('refid'): 1028 self.refid = attrs.get('refid').value 1029 if attrs.get('ambiguityscope'): 1030 self.ambiguityscope = attrs.get('ambiguityscope').value 1031 def buildChildren(self, child_, nodeName_): 1032 if child_.nodeType == Node.ELEMENT_NODE and \ 1033 nodeName_ == 'scope': 1034 scope_ = '' 1035 for text__content_ in child_.childNodes: 1036 scope_ += text__content_.nodeValue 1037 self.scope = scope_ 1038 elif child_.nodeType == Node.ELEMENT_NODE and \ 1039 nodeName_ == 'name': 1040 name_ = '' 1041 for text__content_ in child_.childNodes: 1042 name_ += text__content_.nodeValue 1043 self.name = name_ 1044# end class memberRefType 1045 1046 1047class scope(GeneratedsSuper): 1048 subclass = None 1049 superclass = None 1050 def __init__(self, valueOf_=''): 1051 self.valueOf_ = valueOf_ 1052 def factory(*args_, **kwargs_): 1053 if scope.subclass: 1054 return scope.subclass(*args_, **kwargs_) 1055 else: 1056 return scope(*args_, **kwargs_) 1057 factory = staticmethod(factory) 1058 def getValueOf_(self): return self.valueOf_ 1059 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1060 def export(self, outfile, level, namespace_='', name_='scope', namespacedef_=''): 1061 showIndent(outfile, level) 1062 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1063 self.exportAttributes(outfile, level, namespace_, name_='scope') 1064 if self.hasContent_(): 1065 outfile.write('>\n') 1066 self.exportChildren(outfile, level + 1, namespace_, name_) 1067 showIndent(outfile, level) 1068 outfile.write('</%s%s>\n' % (namespace_, name_)) 1069 else: 1070 outfile.write(' />\n') 1071 def exportAttributes(self, outfile, level, namespace_='', name_='scope'): 1072 pass 1073 def exportChildren(self, outfile, level, namespace_='', name_='scope'): 1074 if self.valueOf_.find('![CDATA')>-1: 1075 value=quote_xml('%s' % self.valueOf_) 1076 value=value.replace('![CDATA','<![CDATA') 1077 value=value.replace(']]',']]>') 1078 outfile.write(value) 1079 else: 1080 outfile.write(quote_xml('%s' % self.valueOf_)) 1081 def hasContent_(self): 1082 if ( 1083 self.valueOf_ is not None 1084 ): 1085 return True 1086 else: 1087 return False 1088 def exportLiteral(self, outfile, level, name_='scope'): 1089 level += 1 1090 self.exportLiteralAttributes(outfile, level, name_) 1091 if self.hasContent_(): 1092 self.exportLiteralChildren(outfile, level, name_) 1093 def exportLiteralAttributes(self, outfile, level, name_): 1094 pass 1095 def exportLiteralChildren(self, outfile, level, name_): 1096 showIndent(outfile, level) 1097 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1098 def build(self, node_): 1099 attrs = node_.attributes 1100 self.buildAttributes(attrs) 1101 self.valueOf_ = '' 1102 for child_ in node_.childNodes: 1103 nodeName_ = child_.nodeName.split(':')[-1] 1104 self.buildChildren(child_, nodeName_) 1105 def buildAttributes(self, attrs): 1106 pass 1107 def buildChildren(self, child_, nodeName_): 1108 if child_.nodeType == Node.TEXT_NODE: 1109 self.valueOf_ += child_.nodeValue 1110 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1111 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1112# end class scope 1113 1114 1115class name(GeneratedsSuper): 1116 subclass = None 1117 superclass = None 1118 def __init__(self, valueOf_=''): 1119 self.valueOf_ = valueOf_ 1120 def factory(*args_, **kwargs_): 1121 if name.subclass: 1122 return name.subclass(*args_, **kwargs_) 1123 else: 1124 return name(*args_, **kwargs_) 1125 factory = staticmethod(factory) 1126 def getValueOf_(self): return self.valueOf_ 1127 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1128 def export(self, outfile, level, namespace_='', name_='name', namespacedef_=''): 1129 showIndent(outfile, level) 1130 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1131 self.exportAttributes(outfile, level, namespace_, name_='name') 1132 if self.hasContent_(): 1133 outfile.write('>\n') 1134 self.exportChildren(outfile, level + 1, namespace_, name_) 1135 showIndent(outfile, level) 1136 outfile.write('</%s%s>\n' % (namespace_, name_)) 1137 else: 1138 outfile.write(' />\n') 1139 def exportAttributes(self, outfile, level, namespace_='', name_='name'): 1140 pass 1141 def exportChildren(self, outfile, level, namespace_='', name_='name'): 1142 if self.valueOf_.find('![CDATA')>-1: 1143 value=quote_xml('%s' % self.valueOf_) 1144 value=value.replace('![CDATA','<![CDATA') 1145 value=value.replace(']]',']]>') 1146 outfile.write(value) 1147 else: 1148 outfile.write(quote_xml('%s' % self.valueOf_)) 1149 def hasContent_(self): 1150 if ( 1151 self.valueOf_ is not None 1152 ): 1153 return True 1154 else: 1155 return False 1156 def exportLiteral(self, outfile, level, name_='name'): 1157 level += 1 1158 self.exportLiteralAttributes(outfile, level, name_) 1159 if self.hasContent_(): 1160 self.exportLiteralChildren(outfile, level, name_) 1161 def exportLiteralAttributes(self, outfile, level, name_): 1162 pass 1163 def exportLiteralChildren(self, outfile, level, name_): 1164 showIndent(outfile, level) 1165 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1166 def build(self, node_): 1167 attrs = node_.attributes 1168 self.buildAttributes(attrs) 1169 self.valueOf_ = '' 1170 for child_ in node_.childNodes: 1171 nodeName_ = child_.nodeName.split(':')[-1] 1172 self.buildChildren(child_, nodeName_) 1173 def buildAttributes(self, attrs): 1174 pass 1175 def buildChildren(self, child_, nodeName_): 1176 if child_.nodeType == Node.TEXT_NODE: 1177 self.valueOf_ += child_.nodeValue 1178 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1179 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1180# end class name 1181 1182 1183class compoundRefType(GeneratedsSuper): 1184 subclass = None 1185 superclass = None 1186 def __init__(self, virt=None, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None): 1187 self.virt = virt 1188 self.prot = prot 1189 self.refid = refid 1190 if mixedclass_ is None: 1191 self.mixedclass_ = MixedContainer 1192 else: 1193 self.mixedclass_ = mixedclass_ 1194 if content_ is None: 1195 self.content_ = [] 1196 else: 1197 self.content_ = content_ 1198 def factory(*args_, **kwargs_): 1199 if compoundRefType.subclass: 1200 return compoundRefType.subclass(*args_, **kwargs_) 1201 else: 1202 return compoundRefType(*args_, **kwargs_) 1203 factory = staticmethod(factory) 1204 def get_virt(self): return self.virt 1205 def set_virt(self, virt): self.virt = virt 1206 def get_prot(self): return self.prot 1207 def set_prot(self, prot): self.prot = prot 1208 def get_refid(self): return self.refid 1209 def set_refid(self, refid): self.refid = refid 1210 def getValueOf_(self): return self.valueOf_ 1211 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1212 def export(self, outfile, level, namespace_='', name_='compoundRefType', namespacedef_=''): 1213 showIndent(outfile, level) 1214 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1215 self.exportAttributes(outfile, level, namespace_, name_='compoundRefType') 1216 outfile.write('>') 1217 self.exportChildren(outfile, level + 1, namespace_, name_) 1218 outfile.write('</%s%s>\n' % (namespace_, name_)) 1219 def exportAttributes(self, outfile, level, namespace_='', name_='compoundRefType'): 1220 if self.virt is not None: 1221 outfile.write(' virt=%s' % (quote_attrib(self.virt), )) 1222 if self.prot is not None: 1223 outfile.write(' prot=%s' % (quote_attrib(self.prot), )) 1224 if self.refid is not None: 1225 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 1226 def exportChildren(self, outfile, level, namespace_='', name_='compoundRefType'): 1227 if self.valueOf_.find('![CDATA')>-1: 1228 value=quote_xml('%s' % self.valueOf_) 1229 value=value.replace('![CDATA','<![CDATA') 1230 value=value.replace(']]',']]>') 1231 outfile.write(value) 1232 else: 1233 outfile.write(quote_xml('%s' % self.valueOf_)) 1234 def hasContent_(self): 1235 if ( 1236 self.valueOf_ is not None 1237 ): 1238 return True 1239 else: 1240 return False 1241 def exportLiteral(self, outfile, level, name_='compoundRefType'): 1242 level += 1 1243 self.exportLiteralAttributes(outfile, level, name_) 1244 if self.hasContent_(): 1245 self.exportLiteralChildren(outfile, level, name_) 1246 def exportLiteralAttributes(self, outfile, level, name_): 1247 if self.virt is not None: 1248 showIndent(outfile, level) 1249 outfile.write('virt = "%s",\n' % (self.virt,)) 1250 if self.prot is not None: 1251 showIndent(outfile, level) 1252 outfile.write('prot = "%s",\n' % (self.prot,)) 1253 if self.refid is not None: 1254 showIndent(outfile, level) 1255 outfile.write('refid = %s,\n' % (self.refid,)) 1256 def exportLiteralChildren(self, outfile, level, name_): 1257 showIndent(outfile, level) 1258 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1259 def build(self, node_): 1260 attrs = node_.attributes 1261 self.buildAttributes(attrs) 1262 self.valueOf_ = '' 1263 for child_ in node_.childNodes: 1264 nodeName_ = child_.nodeName.split(':')[-1] 1265 self.buildChildren(child_, nodeName_) 1266 def buildAttributes(self, attrs): 1267 if attrs.get('virt'): 1268 self.virt = attrs.get('virt').value 1269 if attrs.get('prot'): 1270 self.prot = attrs.get('prot').value 1271 if attrs.get('refid'): 1272 self.refid = attrs.get('refid').value 1273 def buildChildren(self, child_, nodeName_): 1274 if child_.nodeType == Node.TEXT_NODE: 1275 obj_ = self.mixedclass_(MixedContainer.CategoryText, 1276 MixedContainer.TypeNone, '', child_.nodeValue) 1277 self.content_.append(obj_) 1278 if child_.nodeType == Node.TEXT_NODE: 1279 self.valueOf_ += child_.nodeValue 1280 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1281 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1282# end class compoundRefType 1283 1284 1285class reimplementType(GeneratedsSuper): 1286 subclass = None 1287 superclass = None 1288 def __init__(self, refid=None, valueOf_='', mixedclass_=None, content_=None): 1289 self.refid = refid 1290 if mixedclass_ is None: 1291 self.mixedclass_ = MixedContainer 1292 else: 1293 self.mixedclass_ = mixedclass_ 1294 if content_ is None: 1295 self.content_ = [] 1296 else: 1297 self.content_ = content_ 1298 def factory(*args_, **kwargs_): 1299 if reimplementType.subclass: 1300 return reimplementType.subclass(*args_, **kwargs_) 1301 else: 1302 return reimplementType(*args_, **kwargs_) 1303 factory = staticmethod(factory) 1304 def get_refid(self): return self.refid 1305 def set_refid(self, refid): self.refid = refid 1306 def getValueOf_(self): return self.valueOf_ 1307 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1308 def export(self, outfile, level, namespace_='', name_='reimplementType', namespacedef_=''): 1309 showIndent(outfile, level) 1310 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1311 self.exportAttributes(outfile, level, namespace_, name_='reimplementType') 1312 outfile.write('>') 1313 self.exportChildren(outfile, level + 1, namespace_, name_) 1314 outfile.write('</%s%s>\n' % (namespace_, name_)) 1315 def exportAttributes(self, outfile, level, namespace_='', name_='reimplementType'): 1316 if self.refid is not None: 1317 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 1318 def exportChildren(self, outfile, level, namespace_='', name_='reimplementType'): 1319 if self.valueOf_.find('![CDATA')>-1: 1320 value=quote_xml('%s' % self.valueOf_) 1321 value=value.replace('![CDATA','<![CDATA') 1322 value=value.replace(']]',']]>') 1323 outfile.write(value) 1324 else: 1325 outfile.write(quote_xml('%s' % self.valueOf_)) 1326 def hasContent_(self): 1327 if ( 1328 self.valueOf_ is not None 1329 ): 1330 return True 1331 else: 1332 return False 1333 def exportLiteral(self, outfile, level, name_='reimplementType'): 1334 level += 1 1335 self.exportLiteralAttributes(outfile, level, name_) 1336 if self.hasContent_(): 1337 self.exportLiteralChildren(outfile, level, name_) 1338 def exportLiteralAttributes(self, outfile, level, name_): 1339 if self.refid is not None: 1340 showIndent(outfile, level) 1341 outfile.write('refid = %s,\n' % (self.refid,)) 1342 def exportLiteralChildren(self, outfile, level, name_): 1343 showIndent(outfile, level) 1344 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1345 def build(self, node_): 1346 attrs = node_.attributes 1347 self.buildAttributes(attrs) 1348 self.valueOf_ = '' 1349 for child_ in node_.childNodes: 1350 nodeName_ = child_.nodeName.split(':')[-1] 1351 self.buildChildren(child_, nodeName_) 1352 def buildAttributes(self, attrs): 1353 if attrs.get('refid'): 1354 self.refid = attrs.get('refid').value 1355 def buildChildren(self, child_, nodeName_): 1356 if child_.nodeType == Node.TEXT_NODE: 1357 obj_ = self.mixedclass_(MixedContainer.CategoryText, 1358 MixedContainer.TypeNone, '', child_.nodeValue) 1359 self.content_.append(obj_) 1360 if child_.nodeType == Node.TEXT_NODE: 1361 self.valueOf_ += child_.nodeValue 1362 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1363 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1364# end class reimplementType 1365 1366 1367class incType(GeneratedsSuper): 1368 subclass = None 1369 superclass = None 1370 def __init__(self, local=None, refid=None, valueOf_='', mixedclass_=None, content_=None): 1371 self.local = local 1372 self.refid = refid 1373 if mixedclass_ is None: 1374 self.mixedclass_ = MixedContainer 1375 else: 1376 self.mixedclass_ = mixedclass_ 1377 if content_ is None: 1378 self.content_ = [] 1379 else: 1380 self.content_ = content_ 1381 def factory(*args_, **kwargs_): 1382 if incType.subclass: 1383 return incType.subclass(*args_, **kwargs_) 1384 else: 1385 return incType(*args_, **kwargs_) 1386 factory = staticmethod(factory) 1387 def get_local(self): return self.local 1388 def set_local(self, local): self.local = local 1389 def get_refid(self): return self.refid 1390 def set_refid(self, refid): self.refid = refid 1391 def getValueOf_(self): return self.valueOf_ 1392 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1393 def export(self, outfile, level, namespace_='', name_='incType', namespacedef_=''): 1394 showIndent(outfile, level) 1395 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1396 self.exportAttributes(outfile, level, namespace_, name_='incType') 1397 outfile.write('>') 1398 self.exportChildren(outfile, level + 1, namespace_, name_) 1399 outfile.write('</%s%s>\n' % (namespace_, name_)) 1400 def exportAttributes(self, outfile, level, namespace_='', name_='incType'): 1401 if self.local is not None: 1402 outfile.write(' local=%s' % (quote_attrib(self.local), )) 1403 if self.refid is not None: 1404 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 1405 def exportChildren(self, outfile, level, namespace_='', name_='incType'): 1406 if self.valueOf_.find('![CDATA')>-1: 1407 value=quote_xml('%s' % self.valueOf_) 1408 value=value.replace('![CDATA','<![CDATA') 1409 value=value.replace(']]',']]>') 1410 outfile.write(value) 1411 else: 1412 outfile.write(quote_xml('%s' % self.valueOf_)) 1413 def hasContent_(self): 1414 if ( 1415 self.valueOf_ is not None 1416 ): 1417 return True 1418 else: 1419 return False 1420 def exportLiteral(self, outfile, level, name_='incType'): 1421 level += 1 1422 self.exportLiteralAttributes(outfile, level, name_) 1423 if self.hasContent_(): 1424 self.exportLiteralChildren(outfile, level, name_) 1425 def exportLiteralAttributes(self, outfile, level, name_): 1426 if self.local is not None: 1427 showIndent(outfile, level) 1428 outfile.write('local = "%s",\n' % (self.local,)) 1429 if self.refid is not None: 1430 showIndent(outfile, level) 1431 outfile.write('refid = %s,\n' % (self.refid,)) 1432 def exportLiteralChildren(self, outfile, level, name_): 1433 showIndent(outfile, level) 1434 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1435 def build(self, node_): 1436 attrs = node_.attributes 1437 self.buildAttributes(attrs) 1438 self.valueOf_ = '' 1439 for child_ in node_.childNodes: 1440 nodeName_ = child_.nodeName.split(':')[-1] 1441 self.buildChildren(child_, nodeName_) 1442 def buildAttributes(self, attrs): 1443 if attrs.get('local'): 1444 self.local = attrs.get('local').value 1445 if attrs.get('refid'): 1446 self.refid = attrs.get('refid').value 1447 def buildChildren(self, child_, nodeName_): 1448 if child_.nodeType == Node.TEXT_NODE: 1449 obj_ = self.mixedclass_(MixedContainer.CategoryText, 1450 MixedContainer.TypeNone, '', child_.nodeValue) 1451 self.content_.append(obj_) 1452 if child_.nodeType == Node.TEXT_NODE: 1453 self.valueOf_ += child_.nodeValue 1454 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1455 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1456# end class incType 1457 1458 1459class refType(GeneratedsSuper): 1460 subclass = None 1461 superclass = None 1462 def __init__(self, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None): 1463 self.prot = prot 1464 self.refid = refid 1465 if mixedclass_ is None: 1466 self.mixedclass_ = MixedContainer 1467 else: 1468 self.mixedclass_ = mixedclass_ 1469 if content_ is None: 1470 self.content_ = [] 1471 else: 1472 self.content_ = content_ 1473 def factory(*args_, **kwargs_): 1474 if refType.subclass: 1475 return refType.subclass(*args_, **kwargs_) 1476 else: 1477 return refType(*args_, **kwargs_) 1478 factory = staticmethod(factory) 1479 def get_prot(self): return self.prot 1480 def set_prot(self, prot): self.prot = prot 1481 def get_refid(self): return self.refid 1482 def set_refid(self, refid): self.refid = refid 1483 def getValueOf_(self): return self.valueOf_ 1484 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1485 def export(self, outfile, level, namespace_='', name_='refType', namespacedef_=''): 1486 showIndent(outfile, level) 1487 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1488 self.exportAttributes(outfile, level, namespace_, name_='refType') 1489 outfile.write('>') 1490 self.exportChildren(outfile, level + 1, namespace_, name_) 1491 outfile.write('</%s%s>\n' % (namespace_, name_)) 1492 def exportAttributes(self, outfile, level, namespace_='', name_='refType'): 1493 if self.prot is not None: 1494 outfile.write(' prot=%s' % (quote_attrib(self.prot), )) 1495 if self.refid is not None: 1496 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 1497 def exportChildren(self, outfile, level, namespace_='', name_='refType'): 1498 if self.valueOf_.find('![CDATA')>-1: 1499 value=quote_xml('%s' % self.valueOf_) 1500 value=value.replace('![CDATA','<![CDATA') 1501 value=value.replace(']]',']]>') 1502 outfile.write(value) 1503 else: 1504 outfile.write(quote_xml('%s' % self.valueOf_)) 1505 def hasContent_(self): 1506 if ( 1507 self.valueOf_ is not None 1508 ): 1509 return True 1510 else: 1511 return False 1512 def exportLiteral(self, outfile, level, name_='refType'): 1513 level += 1 1514 self.exportLiteralAttributes(outfile, level, name_) 1515 if self.hasContent_(): 1516 self.exportLiteralChildren(outfile, level, name_) 1517 def exportLiteralAttributes(self, outfile, level, name_): 1518 if self.prot is not None: 1519 showIndent(outfile, level) 1520 outfile.write('prot = "%s",\n' % (self.prot,)) 1521 if self.refid is not None: 1522 showIndent(outfile, level) 1523 outfile.write('refid = %s,\n' % (self.refid,)) 1524 def exportLiteralChildren(self, outfile, level, name_): 1525 showIndent(outfile, level) 1526 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1527 def build(self, node_): 1528 attrs = node_.attributes 1529 self.buildAttributes(attrs) 1530 self.valueOf_ = '' 1531 for child_ in node_.childNodes: 1532 nodeName_ = child_.nodeName.split(':')[-1] 1533 self.buildChildren(child_, nodeName_) 1534 def buildAttributes(self, attrs): 1535 if attrs.get('prot'): 1536 self.prot = attrs.get('prot').value 1537 if attrs.get('refid'): 1538 self.refid = attrs.get('refid').value 1539 def buildChildren(self, child_, nodeName_): 1540 if child_.nodeType == Node.TEXT_NODE: 1541 obj_ = self.mixedclass_(MixedContainer.CategoryText, 1542 MixedContainer.TypeNone, '', child_.nodeValue) 1543 self.content_.append(obj_) 1544 if child_.nodeType == Node.TEXT_NODE: 1545 self.valueOf_ += child_.nodeValue 1546 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1547 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1548# end class refType 1549 1550 1551class refTextType(GeneratedsSuper): 1552 subclass = None 1553 superclass = None 1554 def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None): 1555 self.refid = refid 1556 self.kindref = kindref 1557 self.external = external 1558 if mixedclass_ is None: 1559 self.mixedclass_ = MixedContainer 1560 else: 1561 self.mixedclass_ = mixedclass_ 1562 if content_ is None: 1563 self.content_ = [] 1564 else: 1565 self.content_ = content_ 1566 def factory(*args_, **kwargs_): 1567 if refTextType.subclass: 1568 return refTextType.subclass(*args_, **kwargs_) 1569 else: 1570 return refTextType(*args_, **kwargs_) 1571 factory = staticmethod(factory) 1572 def get_refid(self): return self.refid 1573 def set_refid(self, refid): self.refid = refid 1574 def get_kindref(self): return self.kindref 1575 def set_kindref(self, kindref): self.kindref = kindref 1576 def get_external(self): return self.external 1577 def set_external(self, external): self.external = external 1578 def getValueOf_(self): return self.valueOf_ 1579 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 1580 def export(self, outfile, level, namespace_='', name_='refTextType', namespacedef_=''): 1581 showIndent(outfile, level) 1582 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1583 self.exportAttributes(outfile, level, namespace_, name_='refTextType') 1584 outfile.write('>') 1585 self.exportChildren(outfile, level + 1, namespace_, name_) 1586 outfile.write('</%s%s>\n' % (namespace_, name_)) 1587 def exportAttributes(self, outfile, level, namespace_='', name_='refTextType'): 1588 if self.refid is not None: 1589 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 1590 if self.kindref is not None: 1591 outfile.write(' kindref=%s' % (quote_attrib(self.kindref), )) 1592 if self.external is not None: 1593 outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), )) 1594 def exportChildren(self, outfile, level, namespace_='', name_='refTextType'): 1595 if self.valueOf_.find('![CDATA')>-1: 1596 value=quote_xml('%s' % self.valueOf_) 1597 value=value.replace('![CDATA','<![CDATA') 1598 value=value.replace(']]',']]>') 1599 outfile.write(value) 1600 else: 1601 outfile.write(quote_xml('%s' % self.valueOf_)) 1602 def hasContent_(self): 1603 if ( 1604 self.valueOf_ is not None 1605 ): 1606 return True 1607 else: 1608 return False 1609 def exportLiteral(self, outfile, level, name_='refTextType'): 1610 level += 1 1611 self.exportLiteralAttributes(outfile, level, name_) 1612 if self.hasContent_(): 1613 self.exportLiteralChildren(outfile, level, name_) 1614 def exportLiteralAttributes(self, outfile, level, name_): 1615 if self.refid is not None: 1616 showIndent(outfile, level) 1617 outfile.write('refid = %s,\n' % (self.refid,)) 1618 if self.kindref is not None: 1619 showIndent(outfile, level) 1620 outfile.write('kindref = "%s",\n' % (self.kindref,)) 1621 if self.external is not None: 1622 showIndent(outfile, level) 1623 outfile.write('external = %s,\n' % (self.external,)) 1624 def exportLiteralChildren(self, outfile, level, name_): 1625 showIndent(outfile, level) 1626 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 1627 def build(self, node_): 1628 attrs = node_.attributes 1629 self.buildAttributes(attrs) 1630 self.valueOf_ = '' 1631 for child_ in node_.childNodes: 1632 nodeName_ = child_.nodeName.split(':')[-1] 1633 self.buildChildren(child_, nodeName_) 1634 def buildAttributes(self, attrs): 1635 if attrs.get('refid'): 1636 self.refid = attrs.get('refid').value 1637 if attrs.get('kindref'): 1638 self.kindref = attrs.get('kindref').value 1639 if attrs.get('external'): 1640 self.external = attrs.get('external').value 1641 def buildChildren(self, child_, nodeName_): 1642 if child_.nodeType == Node.TEXT_NODE: 1643 obj_ = self.mixedclass_(MixedContainer.CategoryText, 1644 MixedContainer.TypeNone, '', child_.nodeValue) 1645 self.content_.append(obj_) 1646 if child_.nodeType == Node.TEXT_NODE: 1647 self.valueOf_ += child_.nodeValue 1648 elif child_.nodeType == Node.CDATA_SECTION_NODE: 1649 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 1650# end class refTextType 1651 1652 1653class sectiondefType(GeneratedsSuper): 1654 subclass = None 1655 superclass = None 1656 def __init__(self, kind=None, header=None, description=None, memberdef=None): 1657 self.kind = kind 1658 self.header = header 1659 self.description = description 1660 if memberdef is None: 1661 self.memberdef = [] 1662 else: 1663 self.memberdef = memberdef 1664 def factory(*args_, **kwargs_): 1665 if sectiondefType.subclass: 1666 return sectiondefType.subclass(*args_, **kwargs_) 1667 else: 1668 return sectiondefType(*args_, **kwargs_) 1669 factory = staticmethod(factory) 1670 def get_header(self): return self.header 1671 def set_header(self, header): self.header = header 1672 def get_description(self): return self.description 1673 def set_description(self, description): self.description = description 1674 def get_memberdef(self): return self.memberdef 1675 def set_memberdef(self, memberdef): self.memberdef = memberdef 1676 def add_memberdef(self, value): self.memberdef.append(value) 1677 def insert_memberdef(self, index, value): self.memberdef[index] = value 1678 def get_kind(self): return self.kind 1679 def set_kind(self, kind): self.kind = kind 1680 def export(self, outfile, level, namespace_='', name_='sectiondefType', namespacedef_=''): 1681 showIndent(outfile, level) 1682 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1683 self.exportAttributes(outfile, level, namespace_, name_='sectiondefType') 1684 if self.hasContent_(): 1685 outfile.write('>\n') 1686 self.exportChildren(outfile, level + 1, namespace_, name_) 1687 showIndent(outfile, level) 1688 outfile.write('</%s%s>\n' % (namespace_, name_)) 1689 else: 1690 outfile.write(' />\n') 1691 def exportAttributes(self, outfile, level, namespace_='', name_='sectiondefType'): 1692 if self.kind is not None: 1693 outfile.write(' kind=%s' % (quote_attrib(self.kind), )) 1694 def exportChildren(self, outfile, level, namespace_='', name_='sectiondefType'): 1695 if self.header is not None: 1696 showIndent(outfile, level) 1697 outfile.write('<%sheader>%s</%sheader>\n' % (namespace_, self.format_string(quote_xml(self.header).encode(ExternalEncoding), input_name='header'), namespace_)) 1698 if self.description: 1699 self.description.export(outfile, level, namespace_, name_='description') 1700 for memberdef_ in self.memberdef: 1701 memberdef_.export(outfile, level, namespace_, name_='memberdef') 1702 def hasContent_(self): 1703 if ( 1704 self.header is not None or 1705 self.description is not None or 1706 self.memberdef is not None 1707 ): 1708 return True 1709 else: 1710 return False 1711 def exportLiteral(self, outfile, level, name_='sectiondefType'): 1712 level += 1 1713 self.exportLiteralAttributes(outfile, level, name_) 1714 if self.hasContent_(): 1715 self.exportLiteralChildren(outfile, level, name_) 1716 def exportLiteralAttributes(self, outfile, level, name_): 1717 if self.kind is not None: 1718 showIndent(outfile, level) 1719 outfile.write('kind = "%s",\n' % (self.kind,)) 1720 def exportLiteralChildren(self, outfile, level, name_): 1721 showIndent(outfile, level) 1722 outfile.write('header=%s,\n' % quote_python(self.header).encode(ExternalEncoding)) 1723 if self.description: 1724 showIndent(outfile, level) 1725 outfile.write('description=model_.descriptionType(\n') 1726 self.description.exportLiteral(outfile, level, name_='description') 1727 showIndent(outfile, level) 1728 outfile.write('),\n') 1729 showIndent(outfile, level) 1730 outfile.write('memberdef=[\n') 1731 level += 1 1732 for memberdef in self.memberdef: 1733 showIndent(outfile, level) 1734 outfile.write('model_.memberdef(\n') 1735 memberdef.exportLiteral(outfile, level, name_='memberdef') 1736 showIndent(outfile, level) 1737 outfile.write('),\n') 1738 level -= 1 1739 showIndent(outfile, level) 1740 outfile.write('],\n') 1741 def build(self, node_): 1742 attrs = node_.attributes 1743 self.buildAttributes(attrs) 1744 for child_ in node_.childNodes: 1745 nodeName_ = child_.nodeName.split(':')[-1] 1746 self.buildChildren(child_, nodeName_) 1747 def buildAttributes(self, attrs): 1748 if attrs.get('kind'): 1749 self.kind = attrs.get('kind').value 1750 def buildChildren(self, child_, nodeName_): 1751 if child_.nodeType == Node.ELEMENT_NODE and \ 1752 nodeName_ == 'header': 1753 header_ = '' 1754 for text__content_ in child_.childNodes: 1755 header_ += text__content_.nodeValue 1756 self.header = header_ 1757 elif child_.nodeType == Node.ELEMENT_NODE and \ 1758 nodeName_ == 'description': 1759 obj_ = descriptionType.factory() 1760 obj_.build(child_) 1761 self.set_description(obj_) 1762 elif child_.nodeType == Node.ELEMENT_NODE and \ 1763 nodeName_ == 'memberdef': 1764 obj_ = memberdefType.factory() 1765 obj_.build(child_) 1766 self.memberdef.append(obj_) 1767# end class sectiondefType 1768 1769 1770class memberdefType(GeneratedsSuper): 1771 subclass = None 1772 superclass = None 1773 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): 1774 self.initonly = initonly 1775 self.kind = kind 1776 self.volatile = volatile 1777 self.const = const 1778 self.raisexx = raisexx 1779 self.virt = virt 1780 self.readable = readable 1781 self.prot = prot 1782 self.explicit = explicit 1783 self.new = new 1784 self.final = final 1785 self.writable = writable 1786 self.add = add 1787 self.static = static 1788 self.remove = remove 1789 self.sealed = sealed 1790 self.mutable = mutable 1791 self.gettable = gettable 1792 self.inline = inline 1793 self.settable = settable 1794 self.id = id 1795 self.templateparamlist = templateparamlist 1796 self.type_ = type_ 1797 self.definition = definition 1798 self.argsstring = argsstring 1799 self.name = name 1800 self.read = read 1801 self.write = write 1802 self.bitfield = bitfield 1803 if reimplements is None: 1804 self.reimplements = [] 1805 else: 1806 self.reimplements = reimplements 1807 if reimplementedby is None: 1808 self.reimplementedby = [] 1809 else: 1810 self.reimplementedby = reimplementedby 1811 if param is None: 1812 self.param = [] 1813 else: 1814 self.param = param 1815 if enumvalue is None: 1816 self.enumvalue = [] 1817 else: 1818 self.enumvalue = enumvalue 1819 self.initializer = initializer 1820 self.exceptions = exceptions 1821 self.briefdescription = briefdescription 1822 self.detaileddescription = detaileddescription 1823 self.inbodydescription = inbodydescription 1824 self.location = location 1825 if references is None: 1826 self.references = [] 1827 else: 1828 self.references = references 1829 if referencedby is None: 1830 self.referencedby = [] 1831 else: 1832 self.referencedby = referencedby 1833 def factory(*args_, **kwargs_): 1834 if memberdefType.subclass: 1835 return memberdefType.subclass(*args_, **kwargs_) 1836 else: 1837 return memberdefType(*args_, **kwargs_) 1838 factory = staticmethod(factory) 1839 def get_templateparamlist(self): return self.templateparamlist 1840 def set_templateparamlist(self, templateparamlist): self.templateparamlist = templateparamlist 1841 def get_type(self): return self.type_ 1842 def set_type(self, type_): self.type_ = type_ 1843 def get_definition(self): return self.definition 1844 def set_definition(self, definition): self.definition = definition 1845 def get_argsstring(self): return self.argsstring 1846 def set_argsstring(self, argsstring): self.argsstring = argsstring 1847 def get_name(self): return self.name 1848 def set_name(self, name): self.name = name 1849 def get_read(self): return self.read 1850 def set_read(self, read): self.read = read 1851 def get_write(self): return self.write 1852 def set_write(self, write): self.write = write 1853 def get_bitfield(self): return self.bitfield 1854 def set_bitfield(self, bitfield): self.bitfield = bitfield 1855 def get_reimplements(self): return self.reimplements 1856 def set_reimplements(self, reimplements): self.reimplements = reimplements 1857 def add_reimplements(self, value): self.reimplements.append(value) 1858 def insert_reimplements(self, index, value): self.reimplements[index] = value 1859 def get_reimplementedby(self): return self.reimplementedby 1860 def set_reimplementedby(self, reimplementedby): self.reimplementedby = reimplementedby 1861 def add_reimplementedby(self, value): self.reimplementedby.append(value) 1862 def insert_reimplementedby(self, index, value): self.reimplementedby[index] = value 1863 def get_param(self): return self.param 1864 def set_param(self, param): self.param = param 1865 def add_param(self, value): self.param.append(value) 1866 def insert_param(self, index, value): self.param[index] = value 1867 def get_enumvalue(self): return self.enumvalue 1868 def set_enumvalue(self, enumvalue): self.enumvalue = enumvalue 1869 def add_enumvalue(self, value): self.enumvalue.append(value) 1870 def insert_enumvalue(self, index, value): self.enumvalue[index] = value 1871 def get_initializer(self): return self.initializer 1872 def set_initializer(self, initializer): self.initializer = initializer 1873 def get_exceptions(self): return self.exceptions 1874 def set_exceptions(self, exceptions): self.exceptions = exceptions 1875 def get_briefdescription(self): return self.briefdescription 1876 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription 1877 def get_detaileddescription(self): return self.detaileddescription 1878 def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription 1879 def get_inbodydescription(self): return self.inbodydescription 1880 def set_inbodydescription(self, inbodydescription): self.inbodydescription = inbodydescription 1881 def get_location(self): return self.location 1882 def set_location(self, location): self.location = location 1883 def get_references(self): return self.references 1884 def set_references(self, references): self.references = references 1885 def add_references(self, value): self.references.append(value) 1886 def insert_references(self, index, value): self.references[index] = value 1887 def get_referencedby(self): return self.referencedby 1888 def set_referencedby(self, referencedby): self.referencedby = referencedby 1889 def add_referencedby(self, value): self.referencedby.append(value) 1890 def insert_referencedby(self, index, value): self.referencedby[index] = value 1891 def get_initonly(self): return self.initonly 1892 def set_initonly(self, initonly): self.initonly = initonly 1893 def get_kind(self): return self.kind 1894 def set_kind(self, kind): self.kind = kind 1895 def get_volatile(self): return self.volatile 1896 def set_volatile(self, volatile): self.volatile = volatile 1897 def get_const(self): return self.const 1898 def set_const(self, const): self.const = const 1899 def get_raise(self): return self.raisexx 1900 def set_raise(self, raisexx): self.raisexx = raisexx 1901 def get_virt(self): return self.virt 1902 def set_virt(self, virt): self.virt = virt 1903 def get_readable(self): return self.readable 1904 def set_readable(self, readable): self.readable = readable 1905 def get_prot(self): return self.prot 1906 def set_prot(self, prot): self.prot = prot 1907 def get_explicit(self): return self.explicit 1908 def set_explicit(self, explicit): self.explicit = explicit 1909 def get_new(self): return self.new 1910 def set_new(self, new): self.new = new 1911 def get_final(self): return self.final 1912 def set_final(self, final): self.final = final 1913 def get_writable(self): return self.writable 1914 def set_writable(self, writable): self.writable = writable 1915 def get_add(self): return self.add 1916 def set_add(self, add): self.add = add 1917 def get_static(self): return self.static 1918 def set_static(self, static): self.static = static 1919 def get_remove(self): return self.remove 1920 def set_remove(self, remove): self.remove = remove 1921 def get_sealed(self): return self.sealed 1922 def set_sealed(self, sealed): self.sealed = sealed 1923 def get_mutable(self): return self.mutable 1924 def set_mutable(self, mutable): self.mutable = mutable 1925 def get_gettable(self): return self.gettable 1926 def set_gettable(self, gettable): self.gettable = gettable 1927 def get_inline(self): return self.inline 1928 def set_inline(self, inline): self.inline = inline 1929 def get_settable(self): return self.settable 1930 def set_settable(self, settable): self.settable = settable 1931 def get_id(self): return self.id 1932 def set_id(self, id): self.id = id 1933 def export(self, outfile, level, namespace_='', name_='memberdefType', namespacedef_=''): 1934 showIndent(outfile, level) 1935 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 1936 self.exportAttributes(outfile, level, namespace_, name_='memberdefType') 1937 if self.hasContent_(): 1938 outfile.write('>\n') 1939 self.exportChildren(outfile, level + 1, namespace_, name_) 1940 showIndent(outfile, level) 1941 outfile.write('</%s%s>\n' % (namespace_, name_)) 1942 else: 1943 outfile.write(' />\n') 1944 def exportAttributes(self, outfile, level, namespace_='', name_='memberdefType'): 1945 if self.initonly is not None: 1946 outfile.write(' initonly=%s' % (quote_attrib(self.initonly), )) 1947 if self.kind is not None: 1948 outfile.write(' kind=%s' % (quote_attrib(self.kind), )) 1949 if self.volatile is not None: 1950 outfile.write(' volatile=%s' % (quote_attrib(self.volatile), )) 1951 if self.const is not None: 1952 outfile.write(' const=%s' % (quote_attrib(self.const), )) 1953 if self.raisexx is not None: 1954 outfile.write(' raise=%s' % (quote_attrib(self.raisexx), )) 1955 if self.virt is not None: 1956 outfile.write(' virt=%s' % (quote_attrib(self.virt), )) 1957 if self.readable is not None: 1958 outfile.write(' readable=%s' % (quote_attrib(self.readable), )) 1959 if self.prot is not None: 1960 outfile.write(' prot=%s' % (quote_attrib(self.prot), )) 1961 if self.explicit is not None: 1962 outfile.write(' explicit=%s' % (quote_attrib(self.explicit), )) 1963 if self.new is not None: 1964 outfile.write(' new=%s' % (quote_attrib(self.new), )) 1965 if self.final is not None: 1966 outfile.write(' final=%s' % (quote_attrib(self.final), )) 1967 if self.writable is not None: 1968 outfile.write(' writable=%s' % (quote_attrib(self.writable), )) 1969 if self.add is not None: 1970 outfile.write(' add=%s' % (quote_attrib(self.add), )) 1971 if self.static is not None: 1972 outfile.write(' static=%s' % (quote_attrib(self.static), )) 1973 if self.remove is not None: 1974 outfile.write(' remove=%s' % (quote_attrib(self.remove), )) 1975 if self.sealed is not None: 1976 outfile.write(' sealed=%s' % (quote_attrib(self.sealed), )) 1977 if self.mutable is not None: 1978 outfile.write(' mutable=%s' % (quote_attrib(self.mutable), )) 1979 if self.gettable is not None: 1980 outfile.write(' gettable=%s' % (quote_attrib(self.gettable), )) 1981 if self.inline is not None: 1982 outfile.write(' inline=%s' % (quote_attrib(self.inline), )) 1983 if self.settable is not None: 1984 outfile.write(' settable=%s' % (quote_attrib(self.settable), )) 1985 if self.id is not None: 1986 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 1987 def exportChildren(self, outfile, level, namespace_='', name_='memberdefType'): 1988 if self.templateparamlist: 1989 self.templateparamlist.export(outfile, level, namespace_, name_='templateparamlist') 1990 if self.type_: 1991 self.type_.export(outfile, level, namespace_, name_='type') 1992 if self.definition is not None: 1993 showIndent(outfile, level) 1994 outfile.write('<%sdefinition>%s</%sdefinition>\n' % (namespace_, self.format_string(quote_xml(self.definition).encode(ExternalEncoding), input_name='definition'), namespace_)) 1995 if self.argsstring is not None: 1996 showIndent(outfile, level) 1997 outfile.write('<%sargsstring>%s</%sargsstring>\n' % (namespace_, self.format_string(quote_xml(self.argsstring).encode(ExternalEncoding), input_name='argsstring'), namespace_)) 1998 if self.name is not None: 1999 showIndent(outfile, level) 2000 outfile.write('<%sname>%s</%sname>\n' % (namespace_, self.format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_)) 2001 if self.read is not None: 2002 showIndent(outfile, level) 2003 outfile.write('<%sread>%s</%sread>\n' % (namespace_, self.format_string(quote_xml(self.read).encode(ExternalEncoding), input_name='read'), namespace_)) 2004 if self.write is not None: 2005 showIndent(outfile, level) 2006 outfile.write('<%swrite>%s</%swrite>\n' % (namespace_, self.format_string(quote_xml(self.write).encode(ExternalEncoding), input_name='write'), namespace_)) 2007 if self.bitfield is not None: 2008 showIndent(outfile, level) 2009 outfile.write('<%sbitfield>%s</%sbitfield>\n' % (namespace_, self.format_string(quote_xml(self.bitfield).encode(ExternalEncoding), input_name='bitfield'), namespace_)) 2010 for reimplements_ in self.reimplements: 2011 reimplements_.export(outfile, level, namespace_, name_='reimplements') 2012 for reimplementedby_ in self.reimplementedby: 2013 reimplementedby_.export(outfile, level, namespace_, name_='reimplementedby') 2014 for param_ in self.param: 2015 param_.export(outfile, level, namespace_, name_='param') 2016 for enumvalue_ in self.enumvalue: 2017 enumvalue_.export(outfile, level, namespace_, name_='enumvalue') 2018 if self.initializer: 2019 self.initializer.export(outfile, level, namespace_, name_='initializer') 2020 if self.exceptions: 2021 self.exceptions.export(outfile, level, namespace_, name_='exceptions') 2022 if self.briefdescription: 2023 self.briefdescription.export(outfile, level, namespace_, name_='briefdescription') 2024 if self.detaileddescription: 2025 self.detaileddescription.export(outfile, level, namespace_, name_='detaileddescription') 2026 if self.inbodydescription: 2027 self.inbodydescription.export(outfile, level, namespace_, name_='inbodydescription') 2028 if self.location: 2029 self.location.export(outfile, level, namespace_, name_='location', ) 2030 for references_ in self.references: 2031 references_.export(outfile, level, namespace_, name_='references') 2032 for referencedby_ in self.referencedby: 2033 referencedby_.export(outfile, level, namespace_, name_='referencedby') 2034 def hasContent_(self): 2035 if ( 2036 self.templateparamlist is not None or 2037 self.type_ is not None or 2038 self.definition is not None or 2039 self.argsstring is not None or 2040 self.name is not None or 2041 self.read is not None or 2042 self.write is not None or 2043 self.bitfield is not None or 2044 self.reimplements is not None or 2045 self.reimplementedby is not None or 2046 self.param is not None or 2047 self.enumvalue is not None or 2048 self.initializer is not None or 2049 self.exceptions is not None or 2050 self.briefdescription is not None or 2051 self.detaileddescription is not None or 2052 self.inbodydescription is not None or 2053 self.location is not None or 2054 self.references is not None or 2055 self.referencedby is not None 2056 ): 2057 return True 2058 else: 2059 return False 2060 def exportLiteral(self, outfile, level, name_='memberdefType'): 2061 level += 1 2062 self.exportLiteralAttributes(outfile, level, name_) 2063 if self.hasContent_(): 2064 self.exportLiteralChildren(outfile, level, name_) 2065 def exportLiteralAttributes(self, outfile, level, name_): 2066 if self.initonly is not None: 2067 showIndent(outfile, level) 2068 outfile.write('initonly = "%s",\n' % (self.initonly,)) 2069 if self.kind is not None: 2070 showIndent(outfile, level) 2071 outfile.write('kind = "%s",\n' % (self.kind,)) 2072 if self.volatile is not None: 2073 showIndent(outfile, level) 2074 outfile.write('volatile = "%s",\n' % (self.volatile,)) 2075 if self.const is not None: 2076 showIndent(outfile, level) 2077 outfile.write('const = "%s",\n' % (self.const,)) 2078 if self.raisexx is not None: 2079 showIndent(outfile, level) 2080 outfile.write('raisexx = "%s",\n' % (self.raisexx,)) 2081 if self.virt is not None: 2082 showIndent(outfile, level) 2083 outfile.write('virt = "%s",\n' % (self.virt,)) 2084 if self.readable is not None: 2085 showIndent(outfile, level) 2086 outfile.write('readable = "%s",\n' % (self.readable,)) 2087 if self.prot is not None: 2088 showIndent(outfile, level) 2089 outfile.write('prot = "%s",\n' % (self.prot,)) 2090 if self.explicit is not None: 2091 showIndent(outfile, level) 2092 outfile.write('explicit = "%s",\n' % (self.explicit,)) 2093 if self.new is not None: 2094 showIndent(outfile, level) 2095 outfile.write('new = "%s",\n' % (self.new,)) 2096 if self.final is not None: 2097 showIndent(outfile, level) 2098 outfile.write('final = "%s",\n' % (self.final,)) 2099 if self.writable is not None: 2100 showIndent(outfile, level) 2101 outfile.write('writable = "%s",\n' % (self.writable,)) 2102 if self.add is not None: 2103 showIndent(outfile, level) 2104 outfile.write('add = "%s",\n' % (self.add,)) 2105 if self.static is not None: 2106 showIndent(outfile, level) 2107 outfile.write('static = "%s",\n' % (self.static,)) 2108 if self.remove is not None: 2109 showIndent(outfile, level) 2110 outfile.write('remove = "%s",\n' % (self.remove,)) 2111 if self.sealed is not None: 2112 showIndent(outfile, level) 2113 outfile.write('sealed = "%s",\n' % (self.sealed,)) 2114 if self.mutable is not None: 2115 showIndent(outfile, level) 2116 outfile.write('mutable = "%s",\n' % (self.mutable,)) 2117 if self.gettable is not None: 2118 showIndent(outfile, level) 2119 outfile.write('gettable = "%s",\n' % (self.gettable,)) 2120 if self.inline is not None: 2121 showIndent(outfile, level) 2122 outfile.write('inline = "%s",\n' % (self.inline,)) 2123 if self.settable is not None: 2124 showIndent(outfile, level) 2125 outfile.write('settable = "%s",\n' % (self.settable,)) 2126 if self.id is not None: 2127 showIndent(outfile, level) 2128 outfile.write('id = %s,\n' % (self.id,)) 2129 def exportLiteralChildren(self, outfile, level, name_): 2130 if self.templateparamlist: 2131 showIndent(outfile, level) 2132 outfile.write('templateparamlist=model_.templateparamlistType(\n') 2133 self.templateparamlist.exportLiteral(outfile, level, name_='templateparamlist') 2134 showIndent(outfile, level) 2135 outfile.write('),\n') 2136 if self.type_: 2137 showIndent(outfile, level) 2138 outfile.write('type_=model_.linkedTextType(\n') 2139 self.type_.exportLiteral(outfile, level, name_='type') 2140 showIndent(outfile, level) 2141 outfile.write('),\n') 2142 showIndent(outfile, level) 2143 outfile.write('definition=%s,\n' % quote_python(self.definition).encode(ExternalEncoding)) 2144 showIndent(outfile, level) 2145 outfile.write('argsstring=%s,\n' % quote_python(self.argsstring).encode(ExternalEncoding)) 2146 showIndent(outfile, level) 2147 outfile.write('name=%s,\n' % quote_python(self.name).encode(ExternalEncoding)) 2148 showIndent(outfile, level) 2149 outfile.write('read=%s,\n' % quote_python(self.read).encode(ExternalEncoding)) 2150 showIndent(outfile, level) 2151 outfile.write('write=%s,\n' % quote_python(self.write).encode(ExternalEncoding)) 2152 showIndent(outfile, level) 2153 outfile.write('bitfield=%s,\n' % quote_python(self.bitfield).encode(ExternalEncoding)) 2154 showIndent(outfile, level) 2155 outfile.write('reimplements=[\n') 2156 level += 1 2157 for reimplements in self.reimplements: 2158 showIndent(outfile, level) 2159 outfile.write('model_.reimplements(\n') 2160 reimplements.exportLiteral(outfile, level, name_='reimplements') 2161 showIndent(outfile, level) 2162 outfile.write('),\n') 2163 level -= 1 2164 showIndent(outfile, level) 2165 outfile.write('],\n') 2166 showIndent(outfile, level) 2167 outfile.write('reimplementedby=[\n') 2168 level += 1 2169 for reimplementedby in self.reimplementedby: 2170 showIndent(outfile, level) 2171 outfile.write('model_.reimplementedby(\n') 2172 reimplementedby.exportLiteral(outfile, level, name_='reimplementedby') 2173 showIndent(outfile, level) 2174 outfile.write('),\n') 2175 level -= 1 2176 showIndent(outfile, level) 2177 outfile.write('],\n') 2178 showIndent(outfile, level) 2179 outfile.write('param=[\n') 2180 level += 1 2181 for param in self.param: 2182 showIndent(outfile, level) 2183 outfile.write('model_.param(\n') 2184 param.exportLiteral(outfile, level, name_='param') 2185 showIndent(outfile, level) 2186 outfile.write('),\n') 2187 level -= 1 2188 showIndent(outfile, level) 2189 outfile.write('],\n') 2190 showIndent(outfile, level) 2191 outfile.write('enumvalue=[\n') 2192 level += 1 2193 for enumvalue in self.enumvalue: 2194 showIndent(outfile, level) 2195 outfile.write('model_.enumvalue(\n') 2196 enumvalue.exportLiteral(outfile, level, name_='enumvalue') 2197 showIndent(outfile, level) 2198 outfile.write('),\n') 2199 level -= 1 2200 showIndent(outfile, level) 2201 outfile.write('],\n') 2202 if self.initializer: 2203 showIndent(outfile, level) 2204 outfile.write('initializer=model_.linkedTextType(\n') 2205 self.initializer.exportLiteral(outfile, level, name_='initializer') 2206 showIndent(outfile, level) 2207 outfile.write('),\n') 2208 if self.exceptions: 2209 showIndent(outfile, level) 2210 outfile.write('exceptions=model_.linkedTextType(\n') 2211 self.exceptions.exportLiteral(outfile, level, name_='exceptions') 2212 showIndent(outfile, level) 2213 outfile.write('),\n') 2214 if self.briefdescription: 2215 showIndent(outfile, level) 2216 outfile.write('briefdescription=model_.descriptionType(\n') 2217 self.briefdescription.exportLiteral(outfile, level, name_='briefdescription') 2218 showIndent(outfile, level) 2219 outfile.write('),\n') 2220 if self.detaileddescription: 2221 showIndent(outfile, level) 2222 outfile.write('detaileddescription=model_.descriptionType(\n') 2223 self.detaileddescription.exportLiteral(outfile, level, name_='detaileddescription') 2224 showIndent(outfile, level) 2225 outfile.write('),\n') 2226 if self.inbodydescription: 2227 showIndent(outfile, level) 2228 outfile.write('inbodydescription=model_.descriptionType(\n') 2229 self.inbodydescription.exportLiteral(outfile, level, name_='inbodydescription') 2230 showIndent(outfile, level) 2231 outfile.write('),\n') 2232 if self.location: 2233 showIndent(outfile, level) 2234 outfile.write('location=model_.locationType(\n') 2235 self.location.exportLiteral(outfile, level, name_='location') 2236 showIndent(outfile, level) 2237 outfile.write('),\n') 2238 showIndent(outfile, level) 2239 outfile.write('references=[\n') 2240 level += 1 2241 for references in self.references: 2242 showIndent(outfile, level) 2243 outfile.write('model_.references(\n') 2244 references.exportLiteral(outfile, level, name_='references') 2245 showIndent(outfile, level) 2246 outfile.write('),\n') 2247 level -= 1 2248 showIndent(outfile, level) 2249 outfile.write('],\n') 2250 showIndent(outfile, level) 2251 outfile.write('referencedby=[\n') 2252 level += 1 2253 for referencedby in self.referencedby: 2254 showIndent(outfile, level) 2255 outfile.write('model_.referencedby(\n') 2256 referencedby.exportLiteral(outfile, level, name_='referencedby') 2257 showIndent(outfile, level) 2258 outfile.write('),\n') 2259 level -= 1 2260 showIndent(outfile, level) 2261 outfile.write('],\n') 2262 def build(self, node_): 2263 attrs = node_.attributes 2264 self.buildAttributes(attrs) 2265 for child_ in node_.childNodes: 2266 nodeName_ = child_.nodeName.split(':')[-1] 2267 self.buildChildren(child_, nodeName_) 2268 def buildAttributes(self, attrs): 2269 if attrs.get('initonly'): 2270 self.initonly = attrs.get('initonly').value 2271 if attrs.get('kind'): 2272 self.kind = attrs.get('kind').value 2273 if attrs.get('volatile'): 2274 self.volatile = attrs.get('volatile').value 2275 if attrs.get('const'): 2276 self.const = attrs.get('const').value 2277 if attrs.get('raise'): 2278 self.raisexx = attrs.get('raise').value 2279 if attrs.get('virt'): 2280 self.virt = attrs.get('virt').value 2281 if attrs.get('readable'): 2282 self.readable = attrs.get('readable').value 2283 if attrs.get('prot'): 2284 self.prot = attrs.get('prot').value 2285 if attrs.get('explicit'): 2286 self.explicit = attrs.get('explicit').value 2287 if attrs.get('new'): 2288 self.new = attrs.get('new').value 2289 if attrs.get('final'): 2290 self.final = attrs.get('final').value 2291 if attrs.get('writable'): 2292 self.writable = attrs.get('writable').value 2293 if attrs.get('add'): 2294 self.add = attrs.get('add').value 2295 if attrs.get('static'): 2296 self.static = attrs.get('static').value 2297 if attrs.get('remove'): 2298 self.remove = attrs.get('remove').value 2299 if attrs.get('sealed'): 2300 self.sealed = attrs.get('sealed').value 2301 if attrs.get('mutable'): 2302 self.mutable = attrs.get('mutable').value 2303 if attrs.get('gettable'): 2304 self.gettable = attrs.get('gettable').value 2305 if attrs.get('inline'): 2306 self.inline = attrs.get('inline').value 2307 if attrs.get('settable'): 2308 self.settable = attrs.get('settable').value 2309 if attrs.get('id'): 2310 self.id = attrs.get('id').value 2311 def buildChildren(self, child_, nodeName_): 2312 if child_.nodeType == Node.ELEMENT_NODE and \ 2313 nodeName_ == 'templateparamlist': 2314 obj_ = templateparamlistType.factory() 2315 obj_.build(child_) 2316 self.set_templateparamlist(obj_) 2317 elif child_.nodeType == Node.ELEMENT_NODE and \ 2318 nodeName_ == 'type': 2319 obj_ = linkedTextType.factory() 2320 obj_.build(child_) 2321 self.set_type(obj_) 2322 elif child_.nodeType == Node.ELEMENT_NODE and \ 2323 nodeName_ == 'definition': 2324 definition_ = '' 2325 for text__content_ in child_.childNodes: 2326 definition_ += text__content_.nodeValue 2327 self.definition = definition_ 2328 elif child_.nodeType == Node.ELEMENT_NODE and \ 2329 nodeName_ == 'argsstring': 2330 argsstring_ = '' 2331 for text__content_ in child_.childNodes: 2332 argsstring_ += text__content_.nodeValue 2333 self.argsstring = argsstring_ 2334 elif child_.nodeType == Node.ELEMENT_NODE and \ 2335 nodeName_ == 'name': 2336 name_ = '' 2337 for text__content_ in child_.childNodes: 2338 name_ += text__content_.nodeValue 2339 self.name = name_ 2340 elif child_.nodeType == Node.ELEMENT_NODE and \ 2341 nodeName_ == 'read': 2342 read_ = '' 2343 for text__content_ in child_.childNodes: 2344 read_ += text__content_.nodeValue 2345 self.read = read_ 2346 elif child_.nodeType == Node.ELEMENT_NODE and \ 2347 nodeName_ == 'write': 2348 write_ = '' 2349 for text__content_ in child_.childNodes: 2350 write_ += text__content_.nodeValue 2351 self.write = write_ 2352 elif child_.nodeType == Node.ELEMENT_NODE and \ 2353 nodeName_ == 'bitfield': 2354 bitfield_ = '' 2355 for text__content_ in child_.childNodes: 2356 bitfield_ += text__content_.nodeValue 2357 self.bitfield = bitfield_ 2358 elif child_.nodeType == Node.ELEMENT_NODE and \ 2359 nodeName_ == 'reimplements': 2360 obj_ = reimplementType.factory() 2361 obj_.build(child_) 2362 self.reimplements.append(obj_) 2363 elif child_.nodeType == Node.ELEMENT_NODE and \ 2364 nodeName_ == 'reimplementedby': 2365 obj_ = reimplementType.factory() 2366 obj_.build(child_) 2367 self.reimplementedby.append(obj_) 2368 elif child_.nodeType == Node.ELEMENT_NODE and \ 2369 nodeName_ == 'param': 2370 obj_ = paramType.factory() 2371 obj_.build(child_) 2372 self.param.append(obj_) 2373 elif child_.nodeType == Node.ELEMENT_NODE and \ 2374 nodeName_ == 'enumvalue': 2375 obj_ = enumvalueType.factory() 2376 obj_.build(child_) 2377 self.enumvalue.append(obj_) 2378 elif child_.nodeType == Node.ELEMENT_NODE and \ 2379 nodeName_ == 'initializer': 2380 obj_ = linkedTextType.factory() 2381 obj_.build(child_) 2382 self.set_initializer(obj_) 2383 elif child_.nodeType == Node.ELEMENT_NODE and \ 2384 nodeName_ == 'exceptions': 2385 obj_ = linkedTextType.factory() 2386 obj_.build(child_) 2387 self.set_exceptions(obj_) 2388 elif child_.nodeType == Node.ELEMENT_NODE and \ 2389 nodeName_ == 'briefdescription': 2390 obj_ = descriptionType.factory() 2391 obj_.build(child_) 2392 self.set_briefdescription(obj_) 2393 elif child_.nodeType == Node.ELEMENT_NODE and \ 2394 nodeName_ == 'detaileddescription': 2395 obj_ = descriptionType.factory() 2396 obj_.build(child_) 2397 self.set_detaileddescription(obj_) 2398 elif child_.nodeType == Node.ELEMENT_NODE and \ 2399 nodeName_ == 'inbodydescription': 2400 obj_ = descriptionType.factory() 2401 obj_.build(child_) 2402 self.set_inbodydescription(obj_) 2403 elif child_.nodeType == Node.ELEMENT_NODE and \ 2404 nodeName_ == 'location': 2405 obj_ = locationType.factory() 2406 obj_.build(child_) 2407 self.set_location(obj_) 2408 elif child_.nodeType == Node.ELEMENT_NODE and \ 2409 nodeName_ == 'references': 2410 obj_ = referenceType.factory() 2411 obj_.build(child_) 2412 self.references.append(obj_) 2413 elif child_.nodeType == Node.ELEMENT_NODE and \ 2414 nodeName_ == 'referencedby': 2415 obj_ = referenceType.factory() 2416 obj_.build(child_) 2417 self.referencedby.append(obj_) 2418# end class memberdefType 2419 2420 2421class definition(GeneratedsSuper): 2422 subclass = None 2423 superclass = None 2424 def __init__(self, valueOf_=''): 2425 self.valueOf_ = valueOf_ 2426 def factory(*args_, **kwargs_): 2427 if definition.subclass: 2428 return definition.subclass(*args_, **kwargs_) 2429 else: 2430 return definition(*args_, **kwargs_) 2431 factory = staticmethod(factory) 2432 def getValueOf_(self): return self.valueOf_ 2433 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 2434 def export(self, outfile, level, namespace_='', name_='definition', namespacedef_=''): 2435 showIndent(outfile, level) 2436 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2437 self.exportAttributes(outfile, level, namespace_, name_='definition') 2438 if self.hasContent_(): 2439 outfile.write('>\n') 2440 self.exportChildren(outfile, level + 1, namespace_, name_) 2441 showIndent(outfile, level) 2442 outfile.write('</%s%s>\n' % (namespace_, name_)) 2443 else: 2444 outfile.write(' />\n') 2445 def exportAttributes(self, outfile, level, namespace_='', name_='definition'): 2446 pass 2447 def exportChildren(self, outfile, level, namespace_='', name_='definition'): 2448 if self.valueOf_.find('![CDATA')>-1: 2449 value=quote_xml('%s' % self.valueOf_) 2450 value=value.replace('![CDATA','<![CDATA') 2451 value=value.replace(']]',']]>') 2452 outfile.write(value) 2453 else: 2454 outfile.write(quote_xml('%s' % self.valueOf_)) 2455 def hasContent_(self): 2456 if ( 2457 self.valueOf_ is not None 2458 ): 2459 return True 2460 else: 2461 return False 2462 def exportLiteral(self, outfile, level, name_='definition'): 2463 level += 1 2464 self.exportLiteralAttributes(outfile, level, name_) 2465 if self.hasContent_(): 2466 self.exportLiteralChildren(outfile, level, name_) 2467 def exportLiteralAttributes(self, outfile, level, name_): 2468 pass 2469 def exportLiteralChildren(self, outfile, level, name_): 2470 showIndent(outfile, level) 2471 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 2472 def build(self, node_): 2473 attrs = node_.attributes 2474 self.buildAttributes(attrs) 2475 self.valueOf_ = '' 2476 for child_ in node_.childNodes: 2477 nodeName_ = child_.nodeName.split(':')[-1] 2478 self.buildChildren(child_, nodeName_) 2479 def buildAttributes(self, attrs): 2480 pass 2481 def buildChildren(self, child_, nodeName_): 2482 if child_.nodeType == Node.TEXT_NODE: 2483 self.valueOf_ += child_.nodeValue 2484 elif child_.nodeType == Node.CDATA_SECTION_NODE: 2485 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 2486# end class definition 2487 2488 2489class argsstring(GeneratedsSuper): 2490 subclass = None 2491 superclass = None 2492 def __init__(self, valueOf_=''): 2493 self.valueOf_ = valueOf_ 2494 def factory(*args_, **kwargs_): 2495 if argsstring.subclass: 2496 return argsstring.subclass(*args_, **kwargs_) 2497 else: 2498 return argsstring(*args_, **kwargs_) 2499 factory = staticmethod(factory) 2500 def getValueOf_(self): return self.valueOf_ 2501 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 2502 def export(self, outfile, level, namespace_='', name_='argsstring', namespacedef_=''): 2503 showIndent(outfile, level) 2504 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2505 self.exportAttributes(outfile, level, namespace_, name_='argsstring') 2506 if self.hasContent_(): 2507 outfile.write('>\n') 2508 self.exportChildren(outfile, level + 1, namespace_, name_) 2509 showIndent(outfile, level) 2510 outfile.write('</%s%s>\n' % (namespace_, name_)) 2511 else: 2512 outfile.write(' />\n') 2513 def exportAttributes(self, outfile, level, namespace_='', name_='argsstring'): 2514 pass 2515 def exportChildren(self, outfile, level, namespace_='', name_='argsstring'): 2516 if self.valueOf_.find('![CDATA')>-1: 2517 value=quote_xml('%s' % self.valueOf_) 2518 value=value.replace('![CDATA','<![CDATA') 2519 value=value.replace(']]',']]>') 2520 outfile.write(value) 2521 else: 2522 outfile.write(quote_xml('%s' % self.valueOf_)) 2523 def hasContent_(self): 2524 if ( 2525 self.valueOf_ is not None 2526 ): 2527 return True 2528 else: 2529 return False 2530 def exportLiteral(self, outfile, level, name_='argsstring'): 2531 level += 1 2532 self.exportLiteralAttributes(outfile, level, name_) 2533 if self.hasContent_(): 2534 self.exportLiteralChildren(outfile, level, name_) 2535 def exportLiteralAttributes(self, outfile, level, name_): 2536 pass 2537 def exportLiteralChildren(self, outfile, level, name_): 2538 showIndent(outfile, level) 2539 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 2540 def build(self, node_): 2541 attrs = node_.attributes 2542 self.buildAttributes(attrs) 2543 self.valueOf_ = '' 2544 for child_ in node_.childNodes: 2545 nodeName_ = child_.nodeName.split(':')[-1] 2546 self.buildChildren(child_, nodeName_) 2547 def buildAttributes(self, attrs): 2548 pass 2549 def buildChildren(self, child_, nodeName_): 2550 if child_.nodeType == Node.TEXT_NODE: 2551 self.valueOf_ += child_.nodeValue 2552 elif child_.nodeType == Node.CDATA_SECTION_NODE: 2553 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 2554# end class argsstring 2555 2556 2557class read(GeneratedsSuper): 2558 subclass = None 2559 superclass = None 2560 def __init__(self, valueOf_=''): 2561 self.valueOf_ = valueOf_ 2562 def factory(*args_, **kwargs_): 2563 if read.subclass: 2564 return read.subclass(*args_, **kwargs_) 2565 else: 2566 return read(*args_, **kwargs_) 2567 factory = staticmethod(factory) 2568 def getValueOf_(self): return self.valueOf_ 2569 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 2570 def export(self, outfile, level, namespace_='', name_='read', namespacedef_=''): 2571 showIndent(outfile, level) 2572 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2573 self.exportAttributes(outfile, level, namespace_, name_='read') 2574 if self.hasContent_(): 2575 outfile.write('>\n') 2576 self.exportChildren(outfile, level + 1, namespace_, name_) 2577 showIndent(outfile, level) 2578 outfile.write('</%s%s>\n' % (namespace_, name_)) 2579 else: 2580 outfile.write(' />\n') 2581 def exportAttributes(self, outfile, level, namespace_='', name_='read'): 2582 pass 2583 def exportChildren(self, outfile, level, namespace_='', name_='read'): 2584 if self.valueOf_.find('![CDATA')>-1: 2585 value=quote_xml('%s' % self.valueOf_) 2586 value=value.replace('![CDATA','<![CDATA') 2587 value=value.replace(']]',']]>') 2588 outfile.write(value) 2589 else: 2590 outfile.write(quote_xml('%s' % self.valueOf_)) 2591 def hasContent_(self): 2592 if ( 2593 self.valueOf_ is not None 2594 ): 2595 return True 2596 else: 2597 return False 2598 def exportLiteral(self, outfile, level, name_='read'): 2599 level += 1 2600 self.exportLiteralAttributes(outfile, level, name_) 2601 if self.hasContent_(): 2602 self.exportLiteralChildren(outfile, level, name_) 2603 def exportLiteralAttributes(self, outfile, level, name_): 2604 pass 2605 def exportLiteralChildren(self, outfile, level, name_): 2606 showIndent(outfile, level) 2607 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 2608 def build(self, node_): 2609 attrs = node_.attributes 2610 self.buildAttributes(attrs) 2611 self.valueOf_ = '' 2612 for child_ in node_.childNodes: 2613 nodeName_ = child_.nodeName.split(':')[-1] 2614 self.buildChildren(child_, nodeName_) 2615 def buildAttributes(self, attrs): 2616 pass 2617 def buildChildren(self, child_, nodeName_): 2618 if child_.nodeType == Node.TEXT_NODE: 2619 self.valueOf_ += child_.nodeValue 2620 elif child_.nodeType == Node.CDATA_SECTION_NODE: 2621 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 2622# end class read 2623 2624 2625class write(GeneratedsSuper): 2626 subclass = None 2627 superclass = None 2628 def __init__(self, valueOf_=''): 2629 self.valueOf_ = valueOf_ 2630 def factory(*args_, **kwargs_): 2631 if write.subclass: 2632 return write.subclass(*args_, **kwargs_) 2633 else: 2634 return write(*args_, **kwargs_) 2635 factory = staticmethod(factory) 2636 def getValueOf_(self): return self.valueOf_ 2637 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 2638 def export(self, outfile, level, namespace_='', name_='write', namespacedef_=''): 2639 showIndent(outfile, level) 2640 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2641 self.exportAttributes(outfile, level, namespace_, name_='write') 2642 if self.hasContent_(): 2643 outfile.write('>\n') 2644 self.exportChildren(outfile, level + 1, namespace_, name_) 2645 showIndent(outfile, level) 2646 outfile.write('</%s%s>\n' % (namespace_, name_)) 2647 else: 2648 outfile.write(' />\n') 2649 def exportAttributes(self, outfile, level, namespace_='', name_='write'): 2650 pass 2651 def exportChildren(self, outfile, level, namespace_='', name_='write'): 2652 if self.valueOf_.find('![CDATA')>-1: 2653 value=quote_xml('%s' % self.valueOf_) 2654 value=value.replace('![CDATA','<![CDATA') 2655 value=value.replace(']]',']]>') 2656 outfile.write(value) 2657 else: 2658 outfile.write(quote_xml('%s' % self.valueOf_)) 2659 def hasContent_(self): 2660 if ( 2661 self.valueOf_ is not None 2662 ): 2663 return True 2664 else: 2665 return False 2666 def exportLiteral(self, outfile, level, name_='write'): 2667 level += 1 2668 self.exportLiteralAttributes(outfile, level, name_) 2669 if self.hasContent_(): 2670 self.exportLiteralChildren(outfile, level, name_) 2671 def exportLiteralAttributes(self, outfile, level, name_): 2672 pass 2673 def exportLiteralChildren(self, outfile, level, name_): 2674 showIndent(outfile, level) 2675 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 2676 def build(self, node_): 2677 attrs = node_.attributes 2678 self.buildAttributes(attrs) 2679 self.valueOf_ = '' 2680 for child_ in node_.childNodes: 2681 nodeName_ = child_.nodeName.split(':')[-1] 2682 self.buildChildren(child_, nodeName_) 2683 def buildAttributes(self, attrs): 2684 pass 2685 def buildChildren(self, child_, nodeName_): 2686 if child_.nodeType == Node.TEXT_NODE: 2687 self.valueOf_ += child_.nodeValue 2688 elif child_.nodeType == Node.CDATA_SECTION_NODE: 2689 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 2690# end class write 2691 2692 2693class bitfield(GeneratedsSuper): 2694 subclass = None 2695 superclass = None 2696 def __init__(self, valueOf_=''): 2697 self.valueOf_ = valueOf_ 2698 def factory(*args_, **kwargs_): 2699 if bitfield.subclass: 2700 return bitfield.subclass(*args_, **kwargs_) 2701 else: 2702 return bitfield(*args_, **kwargs_) 2703 factory = staticmethod(factory) 2704 def getValueOf_(self): return self.valueOf_ 2705 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 2706 def export(self, outfile, level, namespace_='', name_='bitfield', namespacedef_=''): 2707 showIndent(outfile, level) 2708 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2709 self.exportAttributes(outfile, level, namespace_, name_='bitfield') 2710 if self.hasContent_(): 2711 outfile.write('>\n') 2712 self.exportChildren(outfile, level + 1, namespace_, name_) 2713 showIndent(outfile, level) 2714 outfile.write('</%s%s>\n' % (namespace_, name_)) 2715 else: 2716 outfile.write(' />\n') 2717 def exportAttributes(self, outfile, level, namespace_='', name_='bitfield'): 2718 pass 2719 def exportChildren(self, outfile, level, namespace_='', name_='bitfield'): 2720 if self.valueOf_.find('![CDATA')>-1: 2721 value=quote_xml('%s' % self.valueOf_) 2722 value=value.replace('![CDATA','<![CDATA') 2723 value=value.replace(']]',']]>') 2724 outfile.write(value) 2725 else: 2726 outfile.write(quote_xml('%s' % self.valueOf_)) 2727 def hasContent_(self): 2728 if ( 2729 self.valueOf_ is not None 2730 ): 2731 return True 2732 else: 2733 return False 2734 def exportLiteral(self, outfile, level, name_='bitfield'): 2735 level += 1 2736 self.exportLiteralAttributes(outfile, level, name_) 2737 if self.hasContent_(): 2738 self.exportLiteralChildren(outfile, level, name_) 2739 def exportLiteralAttributes(self, outfile, level, name_): 2740 pass 2741 def exportLiteralChildren(self, outfile, level, name_): 2742 showIndent(outfile, level) 2743 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 2744 def build(self, node_): 2745 attrs = node_.attributes 2746 self.buildAttributes(attrs) 2747 self.valueOf_ = '' 2748 for child_ in node_.childNodes: 2749 nodeName_ = child_.nodeName.split(':')[-1] 2750 self.buildChildren(child_, nodeName_) 2751 def buildAttributes(self, attrs): 2752 pass 2753 def buildChildren(self, child_, nodeName_): 2754 if child_.nodeType == Node.TEXT_NODE: 2755 self.valueOf_ += child_.nodeValue 2756 elif child_.nodeType == Node.CDATA_SECTION_NODE: 2757 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 2758# end class bitfield 2759 2760 2761class descriptionType(GeneratedsSuper): 2762 subclass = None 2763 superclass = None 2764 def __init__(self, title=None, para=None, sect1=None, internal=None, mixedclass_=None, content_=None): 2765 if mixedclass_ is None: 2766 self.mixedclass_ = MixedContainer 2767 else: 2768 self.mixedclass_ = mixedclass_ 2769 if content_ is None: 2770 self.content_ = [] 2771 else: 2772 self.content_ = content_ 2773 def factory(*args_, **kwargs_): 2774 if descriptionType.subclass: 2775 return descriptionType.subclass(*args_, **kwargs_) 2776 else: 2777 return descriptionType(*args_, **kwargs_) 2778 factory = staticmethod(factory) 2779 def get_title(self): return self.title 2780 def set_title(self, title): self.title = title 2781 def get_para(self): return self.para 2782 def set_para(self, para): self.para = para 2783 def add_para(self, value): self.para.append(value) 2784 def insert_para(self, index, value): self.para[index] = value 2785 def get_sect1(self): return self.sect1 2786 def set_sect1(self, sect1): self.sect1 = sect1 2787 def add_sect1(self, value): self.sect1.append(value) 2788 def insert_sect1(self, index, value): self.sect1[index] = value 2789 def get_internal(self): return self.internal 2790 def set_internal(self, internal): self.internal = internal 2791 def export(self, outfile, level, namespace_='', name_='descriptionType', namespacedef_=''): 2792 showIndent(outfile, level) 2793 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2794 self.exportAttributes(outfile, level, namespace_, name_='descriptionType') 2795 outfile.write('>') 2796 self.exportChildren(outfile, level + 1, namespace_, name_) 2797 outfile.write('</%s%s>\n' % (namespace_, name_)) 2798 def exportAttributes(self, outfile, level, namespace_='', name_='descriptionType'): 2799 pass 2800 def exportChildren(self, outfile, level, namespace_='', name_='descriptionType'): 2801 for item_ in self.content_: 2802 item_.export(outfile, level, item_.name, namespace_) 2803 def hasContent_(self): 2804 if ( 2805 self.title is not None or 2806 self.para is not None or 2807 self.sect1 is not None or 2808 self.internal is not None 2809 ): 2810 return True 2811 else: 2812 return False 2813 def exportLiteral(self, outfile, level, name_='descriptionType'): 2814 level += 1 2815 self.exportLiteralAttributes(outfile, level, name_) 2816 if self.hasContent_(): 2817 self.exportLiteralChildren(outfile, level, name_) 2818 def exportLiteralAttributes(self, outfile, level, name_): 2819 pass 2820 def exportLiteralChildren(self, outfile, level, name_): 2821 showIndent(outfile, level) 2822 outfile.write('content_ = [\n') 2823 for item_ in self.content_: 2824 item_.exportLiteral(outfile, level, name_) 2825 showIndent(outfile, level) 2826 outfile.write('],\n') 2827 showIndent(outfile, level) 2828 outfile.write('content_ = [\n') 2829 for item_ in self.content_: 2830 item_.exportLiteral(outfile, level, name_) 2831 showIndent(outfile, level) 2832 outfile.write('],\n') 2833 showIndent(outfile, level) 2834 outfile.write('content_ = [\n') 2835 for item_ in self.content_: 2836 item_.exportLiteral(outfile, level, name_) 2837 showIndent(outfile, level) 2838 outfile.write('],\n') 2839 showIndent(outfile, level) 2840 outfile.write('content_ = [\n') 2841 for item_ in self.content_: 2842 item_.exportLiteral(outfile, level, name_) 2843 showIndent(outfile, level) 2844 outfile.write('],\n') 2845 def build(self, node_): 2846 attrs = node_.attributes 2847 self.buildAttributes(attrs) 2848 for child_ in node_.childNodes: 2849 nodeName_ = child_.nodeName.split(':')[-1] 2850 self.buildChildren(child_, nodeName_) 2851 def buildAttributes(self, attrs): 2852 pass 2853 def buildChildren(self, child_, nodeName_): 2854 if child_.nodeType == Node.ELEMENT_NODE and \ 2855 nodeName_ == 'title': 2856 childobj_ = docTitleType.factory() 2857 childobj_.build(child_) 2858 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 2859 MixedContainer.TypeNone, 'title', childobj_) 2860 self.content_.append(obj_) 2861 elif child_.nodeType == Node.ELEMENT_NODE and \ 2862 nodeName_ == 'para': 2863 childobj_ = docParaType.factory() 2864 childobj_.build(child_) 2865 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 2866 MixedContainer.TypeNone, 'para', childobj_) 2867 self.content_.append(obj_) 2868 elif child_.nodeType == Node.ELEMENT_NODE and \ 2869 nodeName_ == 'sect1': 2870 childobj_ = docSect1Type.factory() 2871 childobj_.build(child_) 2872 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 2873 MixedContainer.TypeNone, 'sect1', childobj_) 2874 self.content_.append(obj_) 2875 elif child_.nodeType == Node.ELEMENT_NODE and \ 2876 nodeName_ == 'internal': 2877 childobj_ = docInternalType.factory() 2878 childobj_.build(child_) 2879 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 2880 MixedContainer.TypeNone, 'internal', childobj_) 2881 self.content_.append(obj_) 2882 elif child_.nodeType == Node.TEXT_NODE: 2883 obj_ = self.mixedclass_(MixedContainer.CategoryText, 2884 MixedContainer.TypeNone, '', child_.nodeValue) 2885 self.content_.append(obj_) 2886# end class descriptionType 2887 2888 2889class enumvalueType(GeneratedsSuper): 2890 subclass = None 2891 superclass = None 2892 def __init__(self, prot=None, id=None, name=None, initializer=None, briefdescription=None, detaileddescription=None, mixedclass_=None, content_=None): 2893 self.prot = prot 2894 self.id = id 2895 if mixedclass_ is None: 2896 self.mixedclass_ = MixedContainer 2897 else: 2898 self.mixedclass_ = mixedclass_ 2899 if content_ is None: 2900 self.content_ = [] 2901 else: 2902 self.content_ = content_ 2903 def factory(*args_, **kwargs_): 2904 if enumvalueType.subclass: 2905 return enumvalueType.subclass(*args_, **kwargs_) 2906 else: 2907 return enumvalueType(*args_, **kwargs_) 2908 factory = staticmethod(factory) 2909 def get_name(self): return self.name 2910 def set_name(self, name): self.name = name 2911 def get_initializer(self): return self.initializer 2912 def set_initializer(self, initializer): self.initializer = initializer 2913 def get_briefdescription(self): return self.briefdescription 2914 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription 2915 def get_detaileddescription(self): return self.detaileddescription 2916 def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription 2917 def get_prot(self): return self.prot 2918 def set_prot(self, prot): self.prot = prot 2919 def get_id(self): return self.id 2920 def set_id(self, id): self.id = id 2921 def export(self, outfile, level, namespace_='', name_='enumvalueType', namespacedef_=''): 2922 showIndent(outfile, level) 2923 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 2924 self.exportAttributes(outfile, level, namespace_, name_='enumvalueType') 2925 outfile.write('>') 2926 self.exportChildren(outfile, level + 1, namespace_, name_) 2927 outfile.write('</%s%s>\n' % (namespace_, name_)) 2928 def exportAttributes(self, outfile, level, namespace_='', name_='enumvalueType'): 2929 if self.prot is not None: 2930 outfile.write(' prot=%s' % (quote_attrib(self.prot), )) 2931 if self.id is not None: 2932 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 2933 def exportChildren(self, outfile, level, namespace_='', name_='enumvalueType'): 2934 for item_ in self.content_: 2935 item_.export(outfile, level, item_.name, namespace_) 2936 def hasContent_(self): 2937 if ( 2938 self.name is not None or 2939 self.initializer is not None or 2940 self.briefdescription is not None or 2941 self.detaileddescription is not None 2942 ): 2943 return True 2944 else: 2945 return False 2946 def exportLiteral(self, outfile, level, name_='enumvalueType'): 2947 level += 1 2948 self.exportLiteralAttributes(outfile, level, name_) 2949 if self.hasContent_(): 2950 self.exportLiteralChildren(outfile, level, name_) 2951 def exportLiteralAttributes(self, outfile, level, name_): 2952 if self.prot is not None: 2953 showIndent(outfile, level) 2954 outfile.write('prot = "%s",\n' % (self.prot,)) 2955 if self.id is not None: 2956 showIndent(outfile, level) 2957 outfile.write('id = %s,\n' % (self.id,)) 2958 def exportLiteralChildren(self, outfile, level, name_): 2959 showIndent(outfile, level) 2960 outfile.write('content_ = [\n') 2961 for item_ in self.content_: 2962 item_.exportLiteral(outfile, level, name_) 2963 showIndent(outfile, level) 2964 outfile.write('],\n') 2965 showIndent(outfile, level) 2966 outfile.write('content_ = [\n') 2967 for item_ in self.content_: 2968 item_.exportLiteral(outfile, level, name_) 2969 showIndent(outfile, level) 2970 outfile.write('],\n') 2971 showIndent(outfile, level) 2972 outfile.write('content_ = [\n') 2973 for item_ in self.content_: 2974 item_.exportLiteral(outfile, level, name_) 2975 showIndent(outfile, level) 2976 outfile.write('],\n') 2977 showIndent(outfile, level) 2978 outfile.write('content_ = [\n') 2979 for item_ in self.content_: 2980 item_.exportLiteral(outfile, level, name_) 2981 showIndent(outfile, level) 2982 outfile.write('],\n') 2983 def build(self, node_): 2984 attrs = node_.attributes 2985 self.buildAttributes(attrs) 2986 for child_ in node_.childNodes: 2987 nodeName_ = child_.nodeName.split(':')[-1] 2988 self.buildChildren(child_, nodeName_) 2989 def buildAttributes(self, attrs): 2990 if attrs.get('prot'): 2991 self.prot = attrs.get('prot').value 2992 if attrs.get('id'): 2993 self.id = attrs.get('id').value 2994 def buildChildren(self, child_, nodeName_): 2995 if child_.nodeType == Node.ELEMENT_NODE and \ 2996 nodeName_ == 'name': 2997 value_ = [] 2998 for text_ in child_.childNodes: 2999 value_.append(text_.nodeValue) 3000 valuestr_ = ''.join(value_) 3001 obj_ = self.mixedclass_(MixedContainer.CategorySimple, 3002 MixedContainer.TypeString, 'name', valuestr_) 3003 self.content_.append(obj_) 3004 elif child_.nodeType == Node.ELEMENT_NODE and \ 3005 nodeName_ == 'initializer': 3006 childobj_ = linkedTextType.factory() 3007 childobj_.build(child_) 3008 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 3009 MixedContainer.TypeNone, 'initializer', childobj_) 3010 self.content_.append(obj_) 3011 elif child_.nodeType == Node.ELEMENT_NODE and \ 3012 nodeName_ == 'briefdescription': 3013 childobj_ = descriptionType.factory() 3014 childobj_.build(child_) 3015 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 3016 MixedContainer.TypeNone, 'briefdescription', childobj_) 3017 self.content_.append(obj_) 3018 elif child_.nodeType == Node.ELEMENT_NODE and \ 3019 nodeName_ == 'detaileddescription': 3020 childobj_ = descriptionType.factory() 3021 childobj_.build(child_) 3022 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 3023 MixedContainer.TypeNone, 'detaileddescription', childobj_) 3024 self.content_.append(obj_) 3025 elif child_.nodeType == Node.TEXT_NODE: 3026 obj_ = self.mixedclass_(MixedContainer.CategoryText, 3027 MixedContainer.TypeNone, '', child_.nodeValue) 3028 self.content_.append(obj_) 3029# end class enumvalueType 3030 3031 3032class templateparamlistType(GeneratedsSuper): 3033 subclass = None 3034 superclass = None 3035 def __init__(self, param=None): 3036 if param is None: 3037 self.param = [] 3038 else: 3039 self.param = param 3040 def factory(*args_, **kwargs_): 3041 if templateparamlistType.subclass: 3042 return templateparamlistType.subclass(*args_, **kwargs_) 3043 else: 3044 return templateparamlistType(*args_, **kwargs_) 3045 factory = staticmethod(factory) 3046 def get_param(self): return self.param 3047 def set_param(self, param): self.param = param 3048 def add_param(self, value): self.param.append(value) 3049 def insert_param(self, index, value): self.param[index] = value 3050 def export(self, outfile, level, namespace_='', name_='templateparamlistType', namespacedef_=''): 3051 showIndent(outfile, level) 3052 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3053 self.exportAttributes(outfile, level, namespace_, name_='templateparamlistType') 3054 if self.hasContent_(): 3055 outfile.write('>\n') 3056 self.exportChildren(outfile, level + 1, namespace_, name_) 3057 showIndent(outfile, level) 3058 outfile.write('</%s%s>\n' % (namespace_, name_)) 3059 else: 3060 outfile.write(' />\n') 3061 def exportAttributes(self, outfile, level, namespace_='', name_='templateparamlistType'): 3062 pass 3063 def exportChildren(self, outfile, level, namespace_='', name_='templateparamlistType'): 3064 for param_ in self.param: 3065 param_.export(outfile, level, namespace_, name_='param') 3066 def hasContent_(self): 3067 if ( 3068 self.param is not None 3069 ): 3070 return True 3071 else: 3072 return False 3073 def exportLiteral(self, outfile, level, name_='templateparamlistType'): 3074 level += 1 3075 self.exportLiteralAttributes(outfile, level, name_) 3076 if self.hasContent_(): 3077 self.exportLiteralChildren(outfile, level, name_) 3078 def exportLiteralAttributes(self, outfile, level, name_): 3079 pass 3080 def exportLiteralChildren(self, outfile, level, name_): 3081 showIndent(outfile, level) 3082 outfile.write('param=[\n') 3083 level += 1 3084 for param in self.param: 3085 showIndent(outfile, level) 3086 outfile.write('model_.param(\n') 3087 param.exportLiteral(outfile, level, name_='param') 3088 showIndent(outfile, level) 3089 outfile.write('),\n') 3090 level -= 1 3091 showIndent(outfile, level) 3092 outfile.write('],\n') 3093 def build(self, node_): 3094 attrs = node_.attributes 3095 self.buildAttributes(attrs) 3096 for child_ in node_.childNodes: 3097 nodeName_ = child_.nodeName.split(':')[-1] 3098 self.buildChildren(child_, nodeName_) 3099 def buildAttributes(self, attrs): 3100 pass 3101 def buildChildren(self, child_, nodeName_): 3102 if child_.nodeType == Node.ELEMENT_NODE and \ 3103 nodeName_ == 'param': 3104 obj_ = paramType.factory() 3105 obj_.build(child_) 3106 self.param.append(obj_) 3107# end class templateparamlistType 3108 3109 3110class paramType(GeneratedsSuper): 3111 subclass = None 3112 superclass = None 3113 def __init__(self, type_=None, declname=None, defname=None, array=None, defval=None, briefdescription=None): 3114 self.type_ = type_ 3115 self.declname = declname 3116 self.defname = defname 3117 self.array = array 3118 self.defval = defval 3119 self.briefdescription = briefdescription 3120 def factory(*args_, **kwargs_): 3121 if paramType.subclass: 3122 return paramType.subclass(*args_, **kwargs_) 3123 else: 3124 return paramType(*args_, **kwargs_) 3125 factory = staticmethod(factory) 3126 def get_type(self): return self.type_ 3127 def set_type(self, type_): self.type_ = type_ 3128 def get_declname(self): return self.declname 3129 def set_declname(self, declname): self.declname = declname 3130 def get_defname(self): return self.defname 3131 def set_defname(self, defname): self.defname = defname 3132 def get_array(self): return self.array 3133 def set_array(self, array): self.array = array 3134 def get_defval(self): return self.defval 3135 def set_defval(self, defval): self.defval = defval 3136 def get_briefdescription(self): return self.briefdescription 3137 def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription 3138 def export(self, outfile, level, namespace_='', name_='paramType', namespacedef_=''): 3139 showIndent(outfile, level) 3140 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3141 self.exportAttributes(outfile, level, namespace_, name_='paramType') 3142 if self.hasContent_(): 3143 outfile.write('>\n') 3144 self.exportChildren(outfile, level + 1, namespace_, name_) 3145 showIndent(outfile, level) 3146 outfile.write('</%s%s>\n' % (namespace_, name_)) 3147 else: 3148 outfile.write(' />\n') 3149 def exportAttributes(self, outfile, level, namespace_='', name_='paramType'): 3150 pass 3151 def exportChildren(self, outfile, level, namespace_='', name_='paramType'): 3152 if self.type_: 3153 self.type_.export(outfile, level, namespace_, name_='type') 3154 if self.declname is not None: 3155 showIndent(outfile, level) 3156 outfile.write('<%sdeclname>%s</%sdeclname>\n' % (namespace_, self.format_string(quote_xml(self.declname).encode(ExternalEncoding), input_name='declname'), namespace_)) 3157 if self.defname is not None: 3158 showIndent(outfile, level) 3159 outfile.write('<%sdefname>%s</%sdefname>\n' % (namespace_, self.format_string(quote_xml(self.defname).encode(ExternalEncoding), input_name='defname'), namespace_)) 3160 if self.array is not None: 3161 showIndent(outfile, level) 3162 outfile.write('<%sarray>%s</%sarray>\n' % (namespace_, self.format_string(quote_xml(self.array).encode(ExternalEncoding), input_name='array'), namespace_)) 3163 if self.defval: 3164 self.defval.export(outfile, level, namespace_, name_='defval') 3165 if self.briefdescription: 3166 self.briefdescription.export(outfile, level, namespace_, name_='briefdescription') 3167 def hasContent_(self): 3168 if ( 3169 self.type_ is not None or 3170 self.declname is not None or 3171 self.defname is not None or 3172 self.array is not None or 3173 self.defval is not None or 3174 self.briefdescription is not None 3175 ): 3176 return True 3177 else: 3178 return False 3179 def exportLiteral(self, outfile, level, name_='paramType'): 3180 level += 1 3181 self.exportLiteralAttributes(outfile, level, name_) 3182 if self.hasContent_(): 3183 self.exportLiteralChildren(outfile, level, name_) 3184 def exportLiteralAttributes(self, outfile, level, name_): 3185 pass 3186 def exportLiteralChildren(self, outfile, level, name_): 3187 if self.type_: 3188 showIndent(outfile, level) 3189 outfile.write('type_=model_.linkedTextType(\n') 3190 self.type_.exportLiteral(outfile, level, name_='type') 3191 showIndent(outfile, level) 3192 outfile.write('),\n') 3193 showIndent(outfile, level) 3194 outfile.write('declname=%s,\n' % quote_python(self.declname).encode(ExternalEncoding)) 3195 showIndent(outfile, level) 3196 outfile.write('defname=%s,\n' % quote_python(self.defname).encode(ExternalEncoding)) 3197 showIndent(outfile, level) 3198 outfile.write('array=%s,\n' % quote_python(self.array).encode(ExternalEncoding)) 3199 if self.defval: 3200 showIndent(outfile, level) 3201 outfile.write('defval=model_.linkedTextType(\n') 3202 self.defval.exportLiteral(outfile, level, name_='defval') 3203 showIndent(outfile, level) 3204 outfile.write('),\n') 3205 if self.briefdescription: 3206 showIndent(outfile, level) 3207 outfile.write('briefdescription=model_.descriptionType(\n') 3208 self.briefdescription.exportLiteral(outfile, level, name_='briefdescription') 3209 showIndent(outfile, level) 3210 outfile.write('),\n') 3211 def build(self, node_): 3212 attrs = node_.attributes 3213 self.buildAttributes(attrs) 3214 for child_ in node_.childNodes: 3215 nodeName_ = child_.nodeName.split(':')[-1] 3216 self.buildChildren(child_, nodeName_) 3217 def buildAttributes(self, attrs): 3218 pass 3219 def buildChildren(self, child_, nodeName_): 3220 if child_.nodeType == Node.ELEMENT_NODE and \ 3221 nodeName_ == 'type': 3222 obj_ = linkedTextType.factory() 3223 obj_.build(child_) 3224 self.set_type(obj_) 3225 elif child_.nodeType == Node.ELEMENT_NODE and \ 3226 nodeName_ == 'declname': 3227 declname_ = '' 3228 for text__content_ in child_.childNodes: 3229 declname_ += text__content_.nodeValue 3230 self.declname = declname_ 3231 elif child_.nodeType == Node.ELEMENT_NODE and \ 3232 nodeName_ == 'defname': 3233 defname_ = '' 3234 for text__content_ in child_.childNodes: 3235 defname_ += text__content_.nodeValue 3236 self.defname = defname_ 3237 elif child_.nodeType == Node.ELEMENT_NODE and \ 3238 nodeName_ == 'array': 3239 array_ = '' 3240 for text__content_ in child_.childNodes: 3241 array_ += text__content_.nodeValue 3242 self.array = array_ 3243 elif child_.nodeType == Node.ELEMENT_NODE and \ 3244 nodeName_ == 'defval': 3245 obj_ = linkedTextType.factory() 3246 obj_.build(child_) 3247 self.set_defval(obj_) 3248 elif child_.nodeType == Node.ELEMENT_NODE and \ 3249 nodeName_ == 'briefdescription': 3250 obj_ = descriptionType.factory() 3251 obj_.build(child_) 3252 self.set_briefdescription(obj_) 3253# end class paramType 3254 3255 3256class declname(GeneratedsSuper): 3257 subclass = None 3258 superclass = None 3259 def __init__(self, valueOf_=''): 3260 self.valueOf_ = valueOf_ 3261 def factory(*args_, **kwargs_): 3262 if declname.subclass: 3263 return declname.subclass(*args_, **kwargs_) 3264 else: 3265 return declname(*args_, **kwargs_) 3266 factory = staticmethod(factory) 3267 def getValueOf_(self): return self.valueOf_ 3268 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 3269 def export(self, outfile, level, namespace_='', name_='declname', namespacedef_=''): 3270 showIndent(outfile, level) 3271 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3272 self.exportAttributes(outfile, level, namespace_, name_='declname') 3273 if self.hasContent_(): 3274 outfile.write('>\n') 3275 self.exportChildren(outfile, level + 1, namespace_, name_) 3276 showIndent(outfile, level) 3277 outfile.write('</%s%s>\n' % (namespace_, name_)) 3278 else: 3279 outfile.write(' />\n') 3280 def exportAttributes(self, outfile, level, namespace_='', name_='declname'): 3281 pass 3282 def exportChildren(self, outfile, level, namespace_='', name_='declname'): 3283 if self.valueOf_.find('![CDATA')>-1: 3284 value=quote_xml('%s' % self.valueOf_) 3285 value=value.replace('![CDATA','<![CDATA') 3286 value=value.replace(']]',']]>') 3287 outfile.write(value) 3288 else: 3289 outfile.write(quote_xml('%s' % self.valueOf_)) 3290 def hasContent_(self): 3291 if ( 3292 self.valueOf_ is not None 3293 ): 3294 return True 3295 else: 3296 return False 3297 def exportLiteral(self, outfile, level, name_='declname'): 3298 level += 1 3299 self.exportLiteralAttributes(outfile, level, name_) 3300 if self.hasContent_(): 3301 self.exportLiteralChildren(outfile, level, name_) 3302 def exportLiteralAttributes(self, outfile, level, name_): 3303 pass 3304 def exportLiteralChildren(self, outfile, level, name_): 3305 showIndent(outfile, level) 3306 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 3307 def build(self, node_): 3308 attrs = node_.attributes 3309 self.buildAttributes(attrs) 3310 self.valueOf_ = '' 3311 for child_ in node_.childNodes: 3312 nodeName_ = child_.nodeName.split(':')[-1] 3313 self.buildChildren(child_, nodeName_) 3314 def buildAttributes(self, attrs): 3315 pass 3316 def buildChildren(self, child_, nodeName_): 3317 if child_.nodeType == Node.TEXT_NODE: 3318 self.valueOf_ += child_.nodeValue 3319 elif child_.nodeType == Node.CDATA_SECTION_NODE: 3320 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 3321# end class declname 3322 3323 3324class defname(GeneratedsSuper): 3325 subclass = None 3326 superclass = None 3327 def __init__(self, valueOf_=''): 3328 self.valueOf_ = valueOf_ 3329 def factory(*args_, **kwargs_): 3330 if defname.subclass: 3331 return defname.subclass(*args_, **kwargs_) 3332 else: 3333 return defname(*args_, **kwargs_) 3334 factory = staticmethod(factory) 3335 def getValueOf_(self): return self.valueOf_ 3336 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 3337 def export(self, outfile, level, namespace_='', name_='defname', namespacedef_=''): 3338 showIndent(outfile, level) 3339 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3340 self.exportAttributes(outfile, level, namespace_, name_='defname') 3341 if self.hasContent_(): 3342 outfile.write('>\n') 3343 self.exportChildren(outfile, level + 1, namespace_, name_) 3344 showIndent(outfile, level) 3345 outfile.write('</%s%s>\n' % (namespace_, name_)) 3346 else: 3347 outfile.write(' />\n') 3348 def exportAttributes(self, outfile, level, namespace_='', name_='defname'): 3349 pass 3350 def exportChildren(self, outfile, level, namespace_='', name_='defname'): 3351 if self.valueOf_.find('![CDATA')>-1: 3352 value=quote_xml('%s' % self.valueOf_) 3353 value=value.replace('![CDATA','<![CDATA') 3354 value=value.replace(']]',']]>') 3355 outfile.write(value) 3356 else: 3357 outfile.write(quote_xml('%s' % self.valueOf_)) 3358 def hasContent_(self): 3359 if ( 3360 self.valueOf_ is not None 3361 ): 3362 return True 3363 else: 3364 return False 3365 def exportLiteral(self, outfile, level, name_='defname'): 3366 level += 1 3367 self.exportLiteralAttributes(outfile, level, name_) 3368 if self.hasContent_(): 3369 self.exportLiteralChildren(outfile, level, name_) 3370 def exportLiteralAttributes(self, outfile, level, name_): 3371 pass 3372 def exportLiteralChildren(self, outfile, level, name_): 3373 showIndent(outfile, level) 3374 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 3375 def build(self, node_): 3376 attrs = node_.attributes 3377 self.buildAttributes(attrs) 3378 self.valueOf_ = '' 3379 for child_ in node_.childNodes: 3380 nodeName_ = child_.nodeName.split(':')[-1] 3381 self.buildChildren(child_, nodeName_) 3382 def buildAttributes(self, attrs): 3383 pass 3384 def buildChildren(self, child_, nodeName_): 3385 if child_.nodeType == Node.TEXT_NODE: 3386 self.valueOf_ += child_.nodeValue 3387 elif child_.nodeType == Node.CDATA_SECTION_NODE: 3388 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 3389# end class defname 3390 3391 3392class array(GeneratedsSuper): 3393 subclass = None 3394 superclass = None 3395 def __init__(self, valueOf_=''): 3396 self.valueOf_ = valueOf_ 3397 def factory(*args_, **kwargs_): 3398 if array.subclass: 3399 return array.subclass(*args_, **kwargs_) 3400 else: 3401 return array(*args_, **kwargs_) 3402 factory = staticmethod(factory) 3403 def getValueOf_(self): return self.valueOf_ 3404 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 3405 def export(self, outfile, level, namespace_='', name_='array', namespacedef_=''): 3406 showIndent(outfile, level) 3407 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3408 self.exportAttributes(outfile, level, namespace_, name_='array') 3409 if self.hasContent_(): 3410 outfile.write('>\n') 3411 self.exportChildren(outfile, level + 1, namespace_, name_) 3412 showIndent(outfile, level) 3413 outfile.write('</%s%s>\n' % (namespace_, name_)) 3414 else: 3415 outfile.write(' />\n') 3416 def exportAttributes(self, outfile, level, namespace_='', name_='array'): 3417 pass 3418 def exportChildren(self, outfile, level, namespace_='', name_='array'): 3419 if self.valueOf_.find('![CDATA')>-1: 3420 value=quote_xml('%s' % self.valueOf_) 3421 value=value.replace('![CDATA','<![CDATA') 3422 value=value.replace(']]',']]>') 3423 outfile.write(value) 3424 else: 3425 outfile.write(quote_xml('%s' % self.valueOf_)) 3426 def hasContent_(self): 3427 if ( 3428 self.valueOf_ is not None 3429 ): 3430 return True 3431 else: 3432 return False 3433 def exportLiteral(self, outfile, level, name_='array'): 3434 level += 1 3435 self.exportLiteralAttributes(outfile, level, name_) 3436 if self.hasContent_(): 3437 self.exportLiteralChildren(outfile, level, name_) 3438 def exportLiteralAttributes(self, outfile, level, name_): 3439 pass 3440 def exportLiteralChildren(self, outfile, level, name_): 3441 showIndent(outfile, level) 3442 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 3443 def build(self, node_): 3444 attrs = node_.attributes 3445 self.buildAttributes(attrs) 3446 self.valueOf_ = '' 3447 for child_ in node_.childNodes: 3448 nodeName_ = child_.nodeName.split(':')[-1] 3449 self.buildChildren(child_, nodeName_) 3450 def buildAttributes(self, attrs): 3451 pass 3452 def buildChildren(self, child_, nodeName_): 3453 if child_.nodeType == Node.TEXT_NODE: 3454 self.valueOf_ += child_.nodeValue 3455 elif child_.nodeType == Node.CDATA_SECTION_NODE: 3456 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 3457# end class array 3458 3459 3460class linkedTextType(GeneratedsSuper): 3461 subclass = None 3462 superclass = None 3463 def __init__(self, ref=None, mixedclass_=None, content_=None): 3464 if mixedclass_ is None: 3465 self.mixedclass_ = MixedContainer 3466 else: 3467 self.mixedclass_ = mixedclass_ 3468 if content_ is None: 3469 self.content_ = [] 3470 else: 3471 self.content_ = content_ 3472 def factory(*args_, **kwargs_): 3473 if linkedTextType.subclass: 3474 return linkedTextType.subclass(*args_, **kwargs_) 3475 else: 3476 return linkedTextType(*args_, **kwargs_) 3477 factory = staticmethod(factory) 3478 def get_ref(self): return self.ref 3479 def set_ref(self, ref): self.ref = ref 3480 def add_ref(self, value): self.ref.append(value) 3481 def insert_ref(self, index, value): self.ref[index] = value 3482 def export(self, outfile, level, namespace_='', name_='linkedTextType', namespacedef_=''): 3483 showIndent(outfile, level) 3484 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3485 self.exportAttributes(outfile, level, namespace_, name_='linkedTextType') 3486 outfile.write('>') 3487 self.exportChildren(outfile, level + 1, namespace_, name_) 3488 outfile.write('</%s%s>\n' % (namespace_, name_)) 3489 def exportAttributes(self, outfile, level, namespace_='', name_='linkedTextType'): 3490 pass 3491 def exportChildren(self, outfile, level, namespace_='', name_='linkedTextType'): 3492 for item_ in self.content_: 3493 item_.export(outfile, level, item_.name, namespace_) 3494 def hasContent_(self): 3495 if ( 3496 self.ref is not None 3497 ): 3498 return True 3499 else: 3500 return False 3501 def exportLiteral(self, outfile, level, name_='linkedTextType'): 3502 level += 1 3503 self.exportLiteralAttributes(outfile, level, name_) 3504 if self.hasContent_(): 3505 self.exportLiteralChildren(outfile, level, name_) 3506 def exportLiteralAttributes(self, outfile, level, name_): 3507 pass 3508 def exportLiteralChildren(self, outfile, level, name_): 3509 showIndent(outfile, level) 3510 outfile.write('content_ = [\n') 3511 for item_ in self.content_: 3512 item_.exportLiteral(outfile, level, name_) 3513 showIndent(outfile, level) 3514 outfile.write('],\n') 3515 def build(self, node_): 3516 attrs = node_.attributes 3517 self.buildAttributes(attrs) 3518 for child_ in node_.childNodes: 3519 nodeName_ = child_.nodeName.split(':')[-1] 3520 self.buildChildren(child_, nodeName_) 3521 def buildAttributes(self, attrs): 3522 pass 3523 def buildChildren(self, child_, nodeName_): 3524 if child_.nodeType == Node.ELEMENT_NODE and \ 3525 nodeName_ == 'ref': 3526 childobj_ = docRefTextType.factory() 3527 childobj_.build(child_) 3528 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 3529 MixedContainer.TypeNone, 'ref', childobj_) 3530 self.content_.append(obj_) 3531 elif child_.nodeType == Node.TEXT_NODE: 3532 obj_ = self.mixedclass_(MixedContainer.CategoryText, 3533 MixedContainer.TypeNone, '', child_.nodeValue) 3534 self.content_.append(obj_) 3535# end class linkedTextType 3536 3537 3538class graphType(GeneratedsSuper): 3539 subclass = None 3540 superclass = None 3541 def __init__(self, node=None): 3542 if node is None: 3543 self.node = [] 3544 else: 3545 self.node = node 3546 def factory(*args_, **kwargs_): 3547 if graphType.subclass: 3548 return graphType.subclass(*args_, **kwargs_) 3549 else: 3550 return graphType(*args_, **kwargs_) 3551 factory = staticmethod(factory) 3552 def get_node(self): return self.node 3553 def set_node(self, node): self.node = node 3554 def add_node(self, value): self.node.append(value) 3555 def insert_node(self, index, value): self.node[index] = value 3556 def export(self, outfile, level, namespace_='', name_='graphType', namespacedef_=''): 3557 showIndent(outfile, level) 3558 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3559 self.exportAttributes(outfile, level, namespace_, name_='graphType') 3560 if self.hasContent_(): 3561 outfile.write('>\n') 3562 self.exportChildren(outfile, level + 1, namespace_, name_) 3563 showIndent(outfile, level) 3564 outfile.write('</%s%s>\n' % (namespace_, name_)) 3565 else: 3566 outfile.write(' />\n') 3567 def exportAttributes(self, outfile, level, namespace_='', name_='graphType'): 3568 pass 3569 def exportChildren(self, outfile, level, namespace_='', name_='graphType'): 3570 for node_ in self.node: 3571 node_.export(outfile, level, namespace_, name_='node') 3572 def hasContent_(self): 3573 if ( 3574 self.node is not None 3575 ): 3576 return True 3577 else: 3578 return False 3579 def exportLiteral(self, outfile, level, name_='graphType'): 3580 level += 1 3581 self.exportLiteralAttributes(outfile, level, name_) 3582 if self.hasContent_(): 3583 self.exportLiteralChildren(outfile, level, name_) 3584 def exportLiteralAttributes(self, outfile, level, name_): 3585 pass 3586 def exportLiteralChildren(self, outfile, level, name_): 3587 showIndent(outfile, level) 3588 outfile.write('node=[\n') 3589 level += 1 3590 for node in self.node: 3591 showIndent(outfile, level) 3592 outfile.write('model_.node(\n') 3593 node.exportLiteral(outfile, level, name_='node') 3594 showIndent(outfile, level) 3595 outfile.write('),\n') 3596 level -= 1 3597 showIndent(outfile, level) 3598 outfile.write('],\n') 3599 def build(self, node_): 3600 attrs = node_.attributes 3601 self.buildAttributes(attrs) 3602 for child_ in node_.childNodes: 3603 nodeName_ = child_.nodeName.split(':')[-1] 3604 self.buildChildren(child_, nodeName_) 3605 def buildAttributes(self, attrs): 3606 pass 3607 def buildChildren(self, child_, nodeName_): 3608 if child_.nodeType == Node.ELEMENT_NODE and \ 3609 nodeName_ == 'node': 3610 obj_ = nodeType.factory() 3611 obj_.build(child_) 3612 self.node.append(obj_) 3613# end class graphType 3614 3615 3616class nodeType(GeneratedsSuper): 3617 subclass = None 3618 superclass = None 3619 def __init__(self, id=None, label=None, link=None, childnode=None): 3620 self.id = id 3621 self.label = label 3622 self.link = link 3623 if childnode is None: 3624 self.childnode = [] 3625 else: 3626 self.childnode = childnode 3627 def factory(*args_, **kwargs_): 3628 if nodeType.subclass: 3629 return nodeType.subclass(*args_, **kwargs_) 3630 else: 3631 return nodeType(*args_, **kwargs_) 3632 factory = staticmethod(factory) 3633 def get_label(self): return self.label 3634 def set_label(self, label): self.label = label 3635 def get_link(self): return self.link 3636 def set_link(self, link): self.link = link 3637 def get_childnode(self): return self.childnode 3638 def set_childnode(self, childnode): self.childnode = childnode 3639 def add_childnode(self, value): self.childnode.append(value) 3640 def insert_childnode(self, index, value): self.childnode[index] = value 3641 def get_id(self): return self.id 3642 def set_id(self, id): self.id = id 3643 def export(self, outfile, level, namespace_='', name_='nodeType', namespacedef_=''): 3644 showIndent(outfile, level) 3645 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3646 self.exportAttributes(outfile, level, namespace_, name_='nodeType') 3647 if self.hasContent_(): 3648 outfile.write('>\n') 3649 self.exportChildren(outfile, level + 1, namespace_, name_) 3650 showIndent(outfile, level) 3651 outfile.write('</%s%s>\n' % (namespace_, name_)) 3652 else: 3653 outfile.write(' />\n') 3654 def exportAttributes(self, outfile, level, namespace_='', name_='nodeType'): 3655 if self.id is not None: 3656 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 3657 def exportChildren(self, outfile, level, namespace_='', name_='nodeType'): 3658 if self.label is not None: 3659 showIndent(outfile, level) 3660 outfile.write('<%slabel>%s</%slabel>\n' % (namespace_, self.format_string(quote_xml(self.label).encode(ExternalEncoding), input_name='label'), namespace_)) 3661 if self.link: 3662 self.link.export(outfile, level, namespace_, name_='link') 3663 for childnode_ in self.childnode: 3664 childnode_.export(outfile, level, namespace_, name_='childnode') 3665 def hasContent_(self): 3666 if ( 3667 self.label is not None or 3668 self.link is not None or 3669 self.childnode is not None 3670 ): 3671 return True 3672 else: 3673 return False 3674 def exportLiteral(self, outfile, level, name_='nodeType'): 3675 level += 1 3676 self.exportLiteralAttributes(outfile, level, name_) 3677 if self.hasContent_(): 3678 self.exportLiteralChildren(outfile, level, name_) 3679 def exportLiteralAttributes(self, outfile, level, name_): 3680 if self.id is not None: 3681 showIndent(outfile, level) 3682 outfile.write('id = %s,\n' % (self.id,)) 3683 def exportLiteralChildren(self, outfile, level, name_): 3684 showIndent(outfile, level) 3685 outfile.write('label=%s,\n' % quote_python(self.label).encode(ExternalEncoding)) 3686 if self.link: 3687 showIndent(outfile, level) 3688 outfile.write('link=model_.linkType(\n') 3689 self.link.exportLiteral(outfile, level, name_='link') 3690 showIndent(outfile, level) 3691 outfile.write('),\n') 3692 showIndent(outfile, level) 3693 outfile.write('childnode=[\n') 3694 level += 1 3695 for childnode in self.childnode: 3696 showIndent(outfile, level) 3697 outfile.write('model_.childnode(\n') 3698 childnode.exportLiteral(outfile, level, name_='childnode') 3699 showIndent(outfile, level) 3700 outfile.write('),\n') 3701 level -= 1 3702 showIndent(outfile, level) 3703 outfile.write('],\n') 3704 def build(self, node_): 3705 attrs = node_.attributes 3706 self.buildAttributes(attrs) 3707 for child_ in node_.childNodes: 3708 nodeName_ = child_.nodeName.split(':')[-1] 3709 self.buildChildren(child_, nodeName_) 3710 def buildAttributes(self, attrs): 3711 if attrs.get('id'): 3712 self.id = attrs.get('id').value 3713 def buildChildren(self, child_, nodeName_): 3714 if child_.nodeType == Node.ELEMENT_NODE and \ 3715 nodeName_ == 'label': 3716 label_ = '' 3717 for text__content_ in child_.childNodes: 3718 label_ += text__content_.nodeValue 3719 self.label = label_ 3720 elif child_.nodeType == Node.ELEMENT_NODE and \ 3721 nodeName_ == 'link': 3722 obj_ = linkType.factory() 3723 obj_.build(child_) 3724 self.set_link(obj_) 3725 elif child_.nodeType == Node.ELEMENT_NODE and \ 3726 nodeName_ == 'childnode': 3727 obj_ = childnodeType.factory() 3728 obj_.build(child_) 3729 self.childnode.append(obj_) 3730# end class nodeType 3731 3732 3733class label(GeneratedsSuper): 3734 subclass = None 3735 superclass = None 3736 def __init__(self, valueOf_=''): 3737 self.valueOf_ = valueOf_ 3738 def factory(*args_, **kwargs_): 3739 if label.subclass: 3740 return label.subclass(*args_, **kwargs_) 3741 else: 3742 return label(*args_, **kwargs_) 3743 factory = staticmethod(factory) 3744 def getValueOf_(self): return self.valueOf_ 3745 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 3746 def export(self, outfile, level, namespace_='', name_='label', namespacedef_=''): 3747 showIndent(outfile, level) 3748 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3749 self.exportAttributes(outfile, level, namespace_, name_='label') 3750 if self.hasContent_(): 3751 outfile.write('>\n') 3752 self.exportChildren(outfile, level + 1, namespace_, name_) 3753 showIndent(outfile, level) 3754 outfile.write('</%s%s>\n' % (namespace_, name_)) 3755 else: 3756 outfile.write(' />\n') 3757 def exportAttributes(self, outfile, level, namespace_='', name_='label'): 3758 pass 3759 def exportChildren(self, outfile, level, namespace_='', name_='label'): 3760 if self.valueOf_.find('![CDATA')>-1: 3761 value=quote_xml('%s' % self.valueOf_) 3762 value=value.replace('![CDATA','<![CDATA') 3763 value=value.replace(']]',']]>') 3764 outfile.write(value) 3765 else: 3766 outfile.write(quote_xml('%s' % self.valueOf_)) 3767 def hasContent_(self): 3768 if ( 3769 self.valueOf_ is not None 3770 ): 3771 return True 3772 else: 3773 return False 3774 def exportLiteral(self, outfile, level, name_='label'): 3775 level += 1 3776 self.exportLiteralAttributes(outfile, level, name_) 3777 if self.hasContent_(): 3778 self.exportLiteralChildren(outfile, level, name_) 3779 def exportLiteralAttributes(self, outfile, level, name_): 3780 pass 3781 def exportLiteralChildren(self, outfile, level, name_): 3782 showIndent(outfile, level) 3783 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 3784 def build(self, node_): 3785 attrs = node_.attributes 3786 self.buildAttributes(attrs) 3787 self.valueOf_ = '' 3788 for child_ in node_.childNodes: 3789 nodeName_ = child_.nodeName.split(':')[-1] 3790 self.buildChildren(child_, nodeName_) 3791 def buildAttributes(self, attrs): 3792 pass 3793 def buildChildren(self, child_, nodeName_): 3794 if child_.nodeType == Node.TEXT_NODE: 3795 self.valueOf_ += child_.nodeValue 3796 elif child_.nodeType == Node.CDATA_SECTION_NODE: 3797 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 3798# end class label 3799 3800 3801class childnodeType(GeneratedsSuper): 3802 subclass = None 3803 superclass = None 3804 def __init__(self, relation=None, refid=None, edgelabel=None): 3805 self.relation = relation 3806 self.refid = refid 3807 if edgelabel is None: 3808 self.edgelabel = [] 3809 else: 3810 self.edgelabel = edgelabel 3811 def factory(*args_, **kwargs_): 3812 if childnodeType.subclass: 3813 return childnodeType.subclass(*args_, **kwargs_) 3814 else: 3815 return childnodeType(*args_, **kwargs_) 3816 factory = staticmethod(factory) 3817 def get_edgelabel(self): return self.edgelabel 3818 def set_edgelabel(self, edgelabel): self.edgelabel = edgelabel 3819 def add_edgelabel(self, value): self.edgelabel.append(value) 3820 def insert_edgelabel(self, index, value): self.edgelabel[index] = value 3821 def get_relation(self): return self.relation 3822 def set_relation(self, relation): self.relation = relation 3823 def get_refid(self): return self.refid 3824 def set_refid(self, refid): self.refid = refid 3825 def export(self, outfile, level, namespace_='', name_='childnodeType', namespacedef_=''): 3826 showIndent(outfile, level) 3827 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3828 self.exportAttributes(outfile, level, namespace_, name_='childnodeType') 3829 if self.hasContent_(): 3830 outfile.write('>\n') 3831 self.exportChildren(outfile, level + 1, namespace_, name_) 3832 showIndent(outfile, level) 3833 outfile.write('</%s%s>\n' % (namespace_, name_)) 3834 else: 3835 outfile.write(' />\n') 3836 def exportAttributes(self, outfile, level, namespace_='', name_='childnodeType'): 3837 if self.relation is not None: 3838 outfile.write(' relation=%s' % (quote_attrib(self.relation), )) 3839 if self.refid is not None: 3840 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 3841 def exportChildren(self, outfile, level, namespace_='', name_='childnodeType'): 3842 for edgelabel_ in self.edgelabel: 3843 showIndent(outfile, level) 3844 outfile.write('<%sedgelabel>%s</%sedgelabel>\n' % (namespace_, self.format_string(quote_xml(edgelabel_).encode(ExternalEncoding), input_name='edgelabel'), namespace_)) 3845 def hasContent_(self): 3846 if ( 3847 self.edgelabel is not None 3848 ): 3849 return True 3850 else: 3851 return False 3852 def exportLiteral(self, outfile, level, name_='childnodeType'): 3853 level += 1 3854 self.exportLiteralAttributes(outfile, level, name_) 3855 if self.hasContent_(): 3856 self.exportLiteralChildren(outfile, level, name_) 3857 def exportLiteralAttributes(self, outfile, level, name_): 3858 if self.relation is not None: 3859 showIndent(outfile, level) 3860 outfile.write('relation = "%s",\n' % (self.relation,)) 3861 if self.refid is not None: 3862 showIndent(outfile, level) 3863 outfile.write('refid = %s,\n' % (self.refid,)) 3864 def exportLiteralChildren(self, outfile, level, name_): 3865 showIndent(outfile, level) 3866 outfile.write('edgelabel=[\n') 3867 level += 1 3868 for edgelabel in self.edgelabel: 3869 showIndent(outfile, level) 3870 outfile.write('%s,\n' % quote_python(edgelabel).encode(ExternalEncoding)) 3871 level -= 1 3872 showIndent(outfile, level) 3873 outfile.write('],\n') 3874 def build(self, node_): 3875 attrs = node_.attributes 3876 self.buildAttributes(attrs) 3877 for child_ in node_.childNodes: 3878 nodeName_ = child_.nodeName.split(':')[-1] 3879 self.buildChildren(child_, nodeName_) 3880 def buildAttributes(self, attrs): 3881 if attrs.get('relation'): 3882 self.relation = attrs.get('relation').value 3883 if attrs.get('refid'): 3884 self.refid = attrs.get('refid').value 3885 def buildChildren(self, child_, nodeName_): 3886 if child_.nodeType == Node.ELEMENT_NODE and \ 3887 nodeName_ == 'edgelabel': 3888 edgelabel_ = '' 3889 for text__content_ in child_.childNodes: 3890 edgelabel_ += text__content_.nodeValue 3891 self.edgelabel.append(edgelabel_) 3892# end class childnodeType 3893 3894 3895class edgelabel(GeneratedsSuper): 3896 subclass = None 3897 superclass = None 3898 def __init__(self, valueOf_=''): 3899 self.valueOf_ = valueOf_ 3900 def factory(*args_, **kwargs_): 3901 if edgelabel.subclass: 3902 return edgelabel.subclass(*args_, **kwargs_) 3903 else: 3904 return edgelabel(*args_, **kwargs_) 3905 factory = staticmethod(factory) 3906 def getValueOf_(self): return self.valueOf_ 3907 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 3908 def export(self, outfile, level, namespace_='', name_='edgelabel', namespacedef_=''): 3909 showIndent(outfile, level) 3910 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3911 self.exportAttributes(outfile, level, namespace_, name_='edgelabel') 3912 if self.hasContent_(): 3913 outfile.write('>\n') 3914 self.exportChildren(outfile, level + 1, namespace_, name_) 3915 showIndent(outfile, level) 3916 outfile.write('</%s%s>\n' % (namespace_, name_)) 3917 else: 3918 outfile.write(' />\n') 3919 def exportAttributes(self, outfile, level, namespace_='', name_='edgelabel'): 3920 pass 3921 def exportChildren(self, outfile, level, namespace_='', name_='edgelabel'): 3922 if self.valueOf_.find('![CDATA')>-1: 3923 value=quote_xml('%s' % self.valueOf_) 3924 value=value.replace('![CDATA','<![CDATA') 3925 value=value.replace(']]',']]>') 3926 outfile.write(value) 3927 else: 3928 outfile.write(quote_xml('%s' % self.valueOf_)) 3929 def hasContent_(self): 3930 if ( 3931 self.valueOf_ is not None 3932 ): 3933 return True 3934 else: 3935 return False 3936 def exportLiteral(self, outfile, level, name_='edgelabel'): 3937 level += 1 3938 self.exportLiteralAttributes(outfile, level, name_) 3939 if self.hasContent_(): 3940 self.exportLiteralChildren(outfile, level, name_) 3941 def exportLiteralAttributes(self, outfile, level, name_): 3942 pass 3943 def exportLiteralChildren(self, outfile, level, name_): 3944 showIndent(outfile, level) 3945 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 3946 def build(self, node_): 3947 attrs = node_.attributes 3948 self.buildAttributes(attrs) 3949 self.valueOf_ = '' 3950 for child_ in node_.childNodes: 3951 nodeName_ = child_.nodeName.split(':')[-1] 3952 self.buildChildren(child_, nodeName_) 3953 def buildAttributes(self, attrs): 3954 pass 3955 def buildChildren(self, child_, nodeName_): 3956 if child_.nodeType == Node.TEXT_NODE: 3957 self.valueOf_ += child_.nodeValue 3958 elif child_.nodeType == Node.CDATA_SECTION_NODE: 3959 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 3960# end class edgelabel 3961 3962 3963class linkType(GeneratedsSuper): 3964 subclass = None 3965 superclass = None 3966 def __init__(self, refid=None, external=None, valueOf_=''): 3967 self.refid = refid 3968 self.external = external 3969 self.valueOf_ = valueOf_ 3970 def factory(*args_, **kwargs_): 3971 if linkType.subclass: 3972 return linkType.subclass(*args_, **kwargs_) 3973 else: 3974 return linkType(*args_, **kwargs_) 3975 factory = staticmethod(factory) 3976 def get_refid(self): return self.refid 3977 def set_refid(self, refid): self.refid = refid 3978 def get_external(self): return self.external 3979 def set_external(self, external): self.external = external 3980 def getValueOf_(self): return self.valueOf_ 3981 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 3982 def export(self, outfile, level, namespace_='', name_='linkType', namespacedef_=''): 3983 showIndent(outfile, level) 3984 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 3985 self.exportAttributes(outfile, level, namespace_, name_='linkType') 3986 if self.hasContent_(): 3987 outfile.write('>\n') 3988 self.exportChildren(outfile, level + 1, namespace_, name_) 3989 showIndent(outfile, level) 3990 outfile.write('</%s%s>\n' % (namespace_, name_)) 3991 else: 3992 outfile.write(' />\n') 3993 def exportAttributes(self, outfile, level, namespace_='', name_='linkType'): 3994 if self.refid is not None: 3995 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 3996 if self.external is not None: 3997 outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), )) 3998 def exportChildren(self, outfile, level, namespace_='', name_='linkType'): 3999 if self.valueOf_.find('![CDATA')>-1: 4000 value=quote_xml('%s' % self.valueOf_) 4001 value=value.replace('![CDATA','<![CDATA') 4002 value=value.replace(']]',']]>') 4003 outfile.write(value) 4004 else: 4005 outfile.write(quote_xml('%s' % self.valueOf_)) 4006 def hasContent_(self): 4007 if ( 4008 self.valueOf_ is not None 4009 ): 4010 return True 4011 else: 4012 return False 4013 def exportLiteral(self, outfile, level, name_='linkType'): 4014 level += 1 4015 self.exportLiteralAttributes(outfile, level, name_) 4016 if self.hasContent_(): 4017 self.exportLiteralChildren(outfile, level, name_) 4018 def exportLiteralAttributes(self, outfile, level, name_): 4019 if self.refid is not None: 4020 showIndent(outfile, level) 4021 outfile.write('refid = %s,\n' % (self.refid,)) 4022 if self.external is not None: 4023 showIndent(outfile, level) 4024 outfile.write('external = %s,\n' % (self.external,)) 4025 def exportLiteralChildren(self, outfile, level, name_): 4026 showIndent(outfile, level) 4027 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 4028 def build(self, node_): 4029 attrs = node_.attributes 4030 self.buildAttributes(attrs) 4031 self.valueOf_ = '' 4032 for child_ in node_.childNodes: 4033 nodeName_ = child_.nodeName.split(':')[-1] 4034 self.buildChildren(child_, nodeName_) 4035 def buildAttributes(self, attrs): 4036 if attrs.get('refid'): 4037 self.refid = attrs.get('refid').value 4038 if attrs.get('external'): 4039 self.external = attrs.get('external').value 4040 def buildChildren(self, child_, nodeName_): 4041 if child_.nodeType == Node.TEXT_NODE: 4042 self.valueOf_ += child_.nodeValue 4043 elif child_.nodeType == Node.CDATA_SECTION_NODE: 4044 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 4045# end class linkType 4046 4047 4048class listingType(GeneratedsSuper): 4049 subclass = None 4050 superclass = None 4051 def __init__(self, codeline=None): 4052 if codeline is None: 4053 self.codeline = [] 4054 else: 4055 self.codeline = codeline 4056 def factory(*args_, **kwargs_): 4057 if listingType.subclass: 4058 return listingType.subclass(*args_, **kwargs_) 4059 else: 4060 return listingType(*args_, **kwargs_) 4061 factory = staticmethod(factory) 4062 def get_codeline(self): return self.codeline 4063 def set_codeline(self, codeline): self.codeline = codeline 4064 def add_codeline(self, value): self.codeline.append(value) 4065 def insert_codeline(self, index, value): self.codeline[index] = value 4066 def export(self, outfile, level, namespace_='', name_='listingType', namespacedef_=''): 4067 showIndent(outfile, level) 4068 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4069 self.exportAttributes(outfile, level, namespace_, name_='listingType') 4070 if self.hasContent_(): 4071 outfile.write('>\n') 4072 self.exportChildren(outfile, level + 1, namespace_, name_) 4073 showIndent(outfile, level) 4074 outfile.write('</%s%s>\n' % (namespace_, name_)) 4075 else: 4076 outfile.write(' />\n') 4077 def exportAttributes(self, outfile, level, namespace_='', name_='listingType'): 4078 pass 4079 def exportChildren(self, outfile, level, namespace_='', name_='listingType'): 4080 for codeline_ in self.codeline: 4081 codeline_.export(outfile, level, namespace_, name_='codeline') 4082 def hasContent_(self): 4083 if ( 4084 self.codeline is not None 4085 ): 4086 return True 4087 else: 4088 return False 4089 def exportLiteral(self, outfile, level, name_='listingType'): 4090 level += 1 4091 self.exportLiteralAttributes(outfile, level, name_) 4092 if self.hasContent_(): 4093 self.exportLiteralChildren(outfile, level, name_) 4094 def exportLiteralAttributes(self, outfile, level, name_): 4095 pass 4096 def exportLiteralChildren(self, outfile, level, name_): 4097 showIndent(outfile, level) 4098 outfile.write('codeline=[\n') 4099 level += 1 4100 for codeline in self.codeline: 4101 showIndent(outfile, level) 4102 outfile.write('model_.codeline(\n') 4103 codeline.exportLiteral(outfile, level, name_='codeline') 4104 showIndent(outfile, level) 4105 outfile.write('),\n') 4106 level -= 1 4107 showIndent(outfile, level) 4108 outfile.write('],\n') 4109 def build(self, node_): 4110 attrs = node_.attributes 4111 self.buildAttributes(attrs) 4112 for child_ in node_.childNodes: 4113 nodeName_ = child_.nodeName.split(':')[-1] 4114 self.buildChildren(child_, nodeName_) 4115 def buildAttributes(self, attrs): 4116 pass 4117 def buildChildren(self, child_, nodeName_): 4118 if child_.nodeType == Node.ELEMENT_NODE and \ 4119 nodeName_ == 'codeline': 4120 obj_ = codelineType.factory() 4121 obj_.build(child_) 4122 self.codeline.append(obj_) 4123# end class listingType 4124 4125 4126class codelineType(GeneratedsSuper): 4127 subclass = None 4128 superclass = None 4129 def __init__(self, external=None, lineno=None, refkind=None, refid=None, highlight=None): 4130 self.external = external 4131 self.lineno = lineno 4132 self.refkind = refkind 4133 self.refid = refid 4134 if highlight is None: 4135 self.highlight = [] 4136 else: 4137 self.highlight = highlight 4138 def factory(*args_, **kwargs_): 4139 if codelineType.subclass: 4140 return codelineType.subclass(*args_, **kwargs_) 4141 else: 4142 return codelineType(*args_, **kwargs_) 4143 factory = staticmethod(factory) 4144 def get_highlight(self): return self.highlight 4145 def set_highlight(self, highlight): self.highlight = highlight 4146 def add_highlight(self, value): self.highlight.append(value) 4147 def insert_highlight(self, index, value): self.highlight[index] = value 4148 def get_external(self): return self.external 4149 def set_external(self, external): self.external = external 4150 def get_lineno(self): return self.lineno 4151 def set_lineno(self, lineno): self.lineno = lineno 4152 def get_refkind(self): return self.refkind 4153 def set_refkind(self, refkind): self.refkind = refkind 4154 def get_refid(self): return self.refid 4155 def set_refid(self, refid): self.refid = refid 4156 def export(self, outfile, level, namespace_='', name_='codelineType', namespacedef_=''): 4157 showIndent(outfile, level) 4158 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4159 self.exportAttributes(outfile, level, namespace_, name_='codelineType') 4160 if self.hasContent_(): 4161 outfile.write('>\n') 4162 self.exportChildren(outfile, level + 1, namespace_, name_) 4163 showIndent(outfile, level) 4164 outfile.write('</%s%s>\n' % (namespace_, name_)) 4165 else: 4166 outfile.write(' />\n') 4167 def exportAttributes(self, outfile, level, namespace_='', name_='codelineType'): 4168 if self.external is not None: 4169 outfile.write(' external=%s' % (quote_attrib(self.external), )) 4170 if self.lineno is not None: 4171 outfile.write(' lineno="%s"' % self.format_integer(self.lineno, input_name='lineno')) 4172 if self.refkind is not None: 4173 outfile.write(' refkind=%s' % (quote_attrib(self.refkind), )) 4174 if self.refid is not None: 4175 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 4176 def exportChildren(self, outfile, level, namespace_='', name_='codelineType'): 4177 for highlight_ in self.highlight: 4178 highlight_.export(outfile, level, namespace_, name_='highlight') 4179 def hasContent_(self): 4180 if ( 4181 self.highlight is not None 4182 ): 4183 return True 4184 else: 4185 return False 4186 def exportLiteral(self, outfile, level, name_='codelineType'): 4187 level += 1 4188 self.exportLiteralAttributes(outfile, level, name_) 4189 if self.hasContent_(): 4190 self.exportLiteralChildren(outfile, level, name_) 4191 def exportLiteralAttributes(self, outfile, level, name_): 4192 if self.external is not None: 4193 showIndent(outfile, level) 4194 outfile.write('external = "%s",\n' % (self.external,)) 4195 if self.lineno is not None: 4196 showIndent(outfile, level) 4197 outfile.write('lineno = %s,\n' % (self.lineno,)) 4198 if self.refkind is not None: 4199 showIndent(outfile, level) 4200 outfile.write('refkind = "%s",\n' % (self.refkind,)) 4201 if self.refid is not None: 4202 showIndent(outfile, level) 4203 outfile.write('refid = %s,\n' % (self.refid,)) 4204 def exportLiteralChildren(self, outfile, level, name_): 4205 showIndent(outfile, level) 4206 outfile.write('highlight=[\n') 4207 level += 1 4208 for highlight in self.highlight: 4209 showIndent(outfile, level) 4210 outfile.write('model_.highlight(\n') 4211 highlight.exportLiteral(outfile, level, name_='highlight') 4212 showIndent(outfile, level) 4213 outfile.write('),\n') 4214 level -= 1 4215 showIndent(outfile, level) 4216 outfile.write('],\n') 4217 def build(self, node_): 4218 attrs = node_.attributes 4219 self.buildAttributes(attrs) 4220 for child_ in node_.childNodes: 4221 nodeName_ = child_.nodeName.split(':')[-1] 4222 self.buildChildren(child_, nodeName_) 4223 def buildAttributes(self, attrs): 4224 if attrs.get('external'): 4225 self.external = attrs.get('external').value 4226 if attrs.get('lineno'): 4227 try: 4228 self.lineno = int(attrs.get('lineno').value) 4229 except ValueError as exp: 4230 raise ValueError('Bad integer attribute (lineno): %s' % exp) 4231 if attrs.get('refkind'): 4232 self.refkind = attrs.get('refkind').value 4233 if attrs.get('refid'): 4234 self.refid = attrs.get('refid').value 4235 def buildChildren(self, child_, nodeName_): 4236 if child_.nodeType == Node.ELEMENT_NODE and \ 4237 nodeName_ == 'highlight': 4238 obj_ = highlightType.factory() 4239 obj_.build(child_) 4240 self.highlight.append(obj_) 4241# end class codelineType 4242 4243 4244class highlightType(GeneratedsSuper): 4245 subclass = None 4246 superclass = None 4247 def __init__(self, classxx=None, sp=None, ref=None, mixedclass_=None, content_=None): 4248 self.classxx = classxx 4249 if mixedclass_ is None: 4250 self.mixedclass_ = MixedContainer 4251 else: 4252 self.mixedclass_ = mixedclass_ 4253 if content_ is None: 4254 self.content_ = [] 4255 else: 4256 self.content_ = content_ 4257 def factory(*args_, **kwargs_): 4258 if highlightType.subclass: 4259 return highlightType.subclass(*args_, **kwargs_) 4260 else: 4261 return highlightType(*args_, **kwargs_) 4262 factory = staticmethod(factory) 4263 def get_sp(self): return self.sp 4264 def set_sp(self, sp): self.sp = sp 4265 def add_sp(self, value): self.sp.append(value) 4266 def insert_sp(self, index, value): self.sp[index] = value 4267 def get_ref(self): return self.ref 4268 def set_ref(self, ref): self.ref = ref 4269 def add_ref(self, value): self.ref.append(value) 4270 def insert_ref(self, index, value): self.ref[index] = value 4271 def get_class(self): return self.classxx 4272 def set_class(self, classxx): self.classxx = classxx 4273 def export(self, outfile, level, namespace_='', name_='highlightType', namespacedef_=''): 4274 showIndent(outfile, level) 4275 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4276 self.exportAttributes(outfile, level, namespace_, name_='highlightType') 4277 outfile.write('>') 4278 self.exportChildren(outfile, level + 1, namespace_, name_) 4279 outfile.write('</%s%s>\n' % (namespace_, name_)) 4280 def exportAttributes(self, outfile, level, namespace_='', name_='highlightType'): 4281 if self.classxx is not None: 4282 outfile.write(' class=%s' % (quote_attrib(self.classxx), )) 4283 def exportChildren(self, outfile, level, namespace_='', name_='highlightType'): 4284 for item_ in self.content_: 4285 item_.export(outfile, level, item_.name, namespace_) 4286 def hasContent_(self): 4287 if ( 4288 self.sp is not None or 4289 self.ref is not None 4290 ): 4291 return True 4292 else: 4293 return False 4294 def exportLiteral(self, outfile, level, name_='highlightType'): 4295 level += 1 4296 self.exportLiteralAttributes(outfile, level, name_) 4297 if self.hasContent_(): 4298 self.exportLiteralChildren(outfile, level, name_) 4299 def exportLiteralAttributes(self, outfile, level, name_): 4300 if self.classxx is not None: 4301 showIndent(outfile, level) 4302 outfile.write('classxx = "%s",\n' % (self.classxx,)) 4303 def exportLiteralChildren(self, outfile, level, name_): 4304 showIndent(outfile, level) 4305 outfile.write('content_ = [\n') 4306 for item_ in self.content_: 4307 item_.exportLiteral(outfile, level, name_) 4308 showIndent(outfile, level) 4309 outfile.write('],\n') 4310 showIndent(outfile, level) 4311 outfile.write('content_ = [\n') 4312 for item_ in self.content_: 4313 item_.exportLiteral(outfile, level, name_) 4314 showIndent(outfile, level) 4315 outfile.write('],\n') 4316 def build(self, node_): 4317 attrs = node_.attributes 4318 self.buildAttributes(attrs) 4319 for child_ in node_.childNodes: 4320 nodeName_ = child_.nodeName.split(':')[-1] 4321 self.buildChildren(child_, nodeName_) 4322 def buildAttributes(self, attrs): 4323 if attrs.get('class'): 4324 self.classxx = attrs.get('class').value 4325 def buildChildren(self, child_, nodeName_): 4326 if child_.nodeType == Node.ELEMENT_NODE and \ 4327 nodeName_ == 'sp': 4328 value_ = [] 4329 for text_ in child_.childNodes: 4330 value_.append(text_.nodeValue) 4331 valuestr_ = ''.join(value_) 4332 obj_ = self.mixedclass_(MixedContainer.CategorySimple, 4333 MixedContainer.TypeString, 'sp', valuestr_) 4334 self.content_.append(obj_) 4335 elif child_.nodeType == Node.ELEMENT_NODE and \ 4336 nodeName_ == 'ref': 4337 childobj_ = docRefTextType.factory() 4338 childobj_.build(child_) 4339 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4340 MixedContainer.TypeNone, 'ref', childobj_) 4341 self.content_.append(obj_) 4342 elif child_.nodeType == Node.TEXT_NODE: 4343 obj_ = self.mixedclass_(MixedContainer.CategoryText, 4344 MixedContainer.TypeNone, '', child_.nodeValue) 4345 self.content_.append(obj_) 4346# end class highlightType 4347 4348 4349class sp(GeneratedsSuper): 4350 subclass = None 4351 superclass = None 4352 def __init__(self, valueOf_=''): 4353 self.valueOf_ = valueOf_ 4354 def factory(*args_, **kwargs_): 4355 if sp.subclass: 4356 return sp.subclass(*args_, **kwargs_) 4357 else: 4358 return sp(*args_, **kwargs_) 4359 factory = staticmethod(factory) 4360 def getValueOf_(self): return self.valueOf_ 4361 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 4362 def export(self, outfile, level, namespace_='', name_='sp', namespacedef_=''): 4363 showIndent(outfile, level) 4364 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4365 self.exportAttributes(outfile, level, namespace_, name_='sp') 4366 if self.hasContent_(): 4367 outfile.write('>\n') 4368 self.exportChildren(outfile, level + 1, namespace_, name_) 4369 showIndent(outfile, level) 4370 outfile.write('</%s%s>\n' % (namespace_, name_)) 4371 else: 4372 outfile.write(' />\n') 4373 def exportAttributes(self, outfile, level, namespace_='', name_='sp'): 4374 pass 4375 def exportChildren(self, outfile, level, namespace_='', name_='sp'): 4376 if self.valueOf_.find('![CDATA')>-1: 4377 value=quote_xml('%s' % self.valueOf_) 4378 value=value.replace('![CDATA','<![CDATA') 4379 value=value.replace(']]',']]>') 4380 outfile.write(value) 4381 else: 4382 outfile.write(quote_xml('%s' % self.valueOf_)) 4383 def hasContent_(self): 4384 if ( 4385 self.valueOf_ is not None 4386 ): 4387 return True 4388 else: 4389 return False 4390 def exportLiteral(self, outfile, level, name_='sp'): 4391 level += 1 4392 self.exportLiteralAttributes(outfile, level, name_) 4393 if self.hasContent_(): 4394 self.exportLiteralChildren(outfile, level, name_) 4395 def exportLiteralAttributes(self, outfile, level, name_): 4396 pass 4397 def exportLiteralChildren(self, outfile, level, name_): 4398 showIndent(outfile, level) 4399 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 4400 def build(self, node_): 4401 attrs = node_.attributes 4402 self.buildAttributes(attrs) 4403 self.valueOf_ = '' 4404 for child_ in node_.childNodes: 4405 nodeName_ = child_.nodeName.split(':')[-1] 4406 self.buildChildren(child_, nodeName_) 4407 def buildAttributes(self, attrs): 4408 pass 4409 def buildChildren(self, child_, nodeName_): 4410 if child_.nodeType == Node.TEXT_NODE: 4411 self.valueOf_ += child_.nodeValue 4412 elif child_.nodeType == Node.CDATA_SECTION_NODE: 4413 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 4414# end class sp 4415 4416 4417class referenceType(GeneratedsSuper): 4418 subclass = None 4419 superclass = None 4420 def __init__(self, endline=None, startline=None, refid=None, compoundref=None, valueOf_='', mixedclass_=None, content_=None): 4421 self.endline = endline 4422 self.startline = startline 4423 self.refid = refid 4424 self.compoundref = compoundref 4425 if mixedclass_ is None: 4426 self.mixedclass_ = MixedContainer 4427 else: 4428 self.mixedclass_ = mixedclass_ 4429 if content_ is None: 4430 self.content_ = [] 4431 else: 4432 self.content_ = content_ 4433 def factory(*args_, **kwargs_): 4434 if referenceType.subclass: 4435 return referenceType.subclass(*args_, **kwargs_) 4436 else: 4437 return referenceType(*args_, **kwargs_) 4438 factory = staticmethod(factory) 4439 def get_endline(self): return self.endline 4440 def set_endline(self, endline): self.endline = endline 4441 def get_startline(self): return self.startline 4442 def set_startline(self, startline): self.startline = startline 4443 def get_refid(self): return self.refid 4444 def set_refid(self, refid): self.refid = refid 4445 def get_compoundref(self): return self.compoundref 4446 def set_compoundref(self, compoundref): self.compoundref = compoundref 4447 def getValueOf_(self): return self.valueOf_ 4448 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 4449 def export(self, outfile, level, namespace_='', name_='referenceType', namespacedef_=''): 4450 showIndent(outfile, level) 4451 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4452 self.exportAttributes(outfile, level, namespace_, name_='referenceType') 4453 outfile.write('>') 4454 self.exportChildren(outfile, level + 1, namespace_, name_) 4455 outfile.write('</%s%s>\n' % (namespace_, name_)) 4456 def exportAttributes(self, outfile, level, namespace_='', name_='referenceType'): 4457 if self.endline is not None: 4458 outfile.write(' endline="%s"' % self.format_integer(self.endline, input_name='endline')) 4459 if self.startline is not None: 4460 outfile.write(' startline="%s"' % self.format_integer(self.startline, input_name='startline')) 4461 if self.refid is not None: 4462 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 4463 if self.compoundref is not None: 4464 outfile.write(' compoundref=%s' % (self.format_string(quote_attrib(self.compoundref).encode(ExternalEncoding), input_name='compoundref'), )) 4465 def exportChildren(self, outfile, level, namespace_='', name_='referenceType'): 4466 if self.valueOf_.find('![CDATA')>-1: 4467 value=quote_xml('%s' % self.valueOf_) 4468 value=value.replace('![CDATA','<![CDATA') 4469 value=value.replace(']]',']]>') 4470 outfile.write(value) 4471 else: 4472 outfile.write(quote_xml('%s' % self.valueOf_)) 4473 def hasContent_(self): 4474 if ( 4475 self.valueOf_ is not None 4476 ): 4477 return True 4478 else: 4479 return False 4480 def exportLiteral(self, outfile, level, name_='referenceType'): 4481 level += 1 4482 self.exportLiteralAttributes(outfile, level, name_) 4483 if self.hasContent_(): 4484 self.exportLiteralChildren(outfile, level, name_) 4485 def exportLiteralAttributes(self, outfile, level, name_): 4486 if self.endline is not None: 4487 showIndent(outfile, level) 4488 outfile.write('endline = %s,\n' % (self.endline,)) 4489 if self.startline is not None: 4490 showIndent(outfile, level) 4491 outfile.write('startline = %s,\n' % (self.startline,)) 4492 if self.refid is not None: 4493 showIndent(outfile, level) 4494 outfile.write('refid = %s,\n' % (self.refid,)) 4495 if self.compoundref is not None: 4496 showIndent(outfile, level) 4497 outfile.write('compoundref = %s,\n' % (self.compoundref,)) 4498 def exportLiteralChildren(self, outfile, level, name_): 4499 showIndent(outfile, level) 4500 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 4501 def build(self, node_): 4502 attrs = node_.attributes 4503 self.buildAttributes(attrs) 4504 self.valueOf_ = '' 4505 for child_ in node_.childNodes: 4506 nodeName_ = child_.nodeName.split(':')[-1] 4507 self.buildChildren(child_, nodeName_) 4508 def buildAttributes(self, attrs): 4509 if attrs.get('endline'): 4510 try: 4511 self.endline = int(attrs.get('endline').value) 4512 except ValueError as exp: 4513 raise ValueError('Bad integer attribute (endline): %s' % exp) 4514 if attrs.get('startline'): 4515 try: 4516 self.startline = int(attrs.get('startline').value) 4517 except ValueError as exp: 4518 raise ValueError('Bad integer attribute (startline): %s' % exp) 4519 if attrs.get('refid'): 4520 self.refid = attrs.get('refid').value 4521 if attrs.get('compoundref'): 4522 self.compoundref = attrs.get('compoundref').value 4523 def buildChildren(self, child_, nodeName_): 4524 if child_.nodeType == Node.TEXT_NODE: 4525 obj_ = self.mixedclass_(MixedContainer.CategoryText, 4526 MixedContainer.TypeNone, '', child_.nodeValue) 4527 self.content_.append(obj_) 4528 if child_.nodeType == Node.TEXT_NODE: 4529 self.valueOf_ += child_.nodeValue 4530 elif child_.nodeType == Node.CDATA_SECTION_NODE: 4531 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 4532# end class referenceType 4533 4534 4535class locationType(GeneratedsSuper): 4536 subclass = None 4537 superclass = None 4538 def __init__(self, bodystart=None, line=None, bodyend=None, bodyfile=None, file=None, valueOf_=''): 4539 self.bodystart = bodystart 4540 self.line = line 4541 self.bodyend = bodyend 4542 self.bodyfile = bodyfile 4543 self.file = file 4544 self.valueOf_ = valueOf_ 4545 def factory(*args_, **kwargs_): 4546 if locationType.subclass: 4547 return locationType.subclass(*args_, **kwargs_) 4548 else: 4549 return locationType(*args_, **kwargs_) 4550 factory = staticmethod(factory) 4551 def get_bodystart(self): return self.bodystart 4552 def set_bodystart(self, bodystart): self.bodystart = bodystart 4553 def get_line(self): return self.line 4554 def set_line(self, line): self.line = line 4555 def get_bodyend(self): return self.bodyend 4556 def set_bodyend(self, bodyend): self.bodyend = bodyend 4557 def get_bodyfile(self): return self.bodyfile 4558 def set_bodyfile(self, bodyfile): self.bodyfile = bodyfile 4559 def get_file(self): return self.file 4560 def set_file(self, file): self.file = file 4561 def getValueOf_(self): return self.valueOf_ 4562 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 4563 def export(self, outfile, level, namespace_='', name_='locationType', namespacedef_=''): 4564 showIndent(outfile, level) 4565 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4566 self.exportAttributes(outfile, level, namespace_, name_='locationType') 4567 if self.hasContent_(): 4568 outfile.write('>\n') 4569 self.exportChildren(outfile, level + 1, namespace_, name_) 4570 showIndent(outfile, level) 4571 outfile.write('</%s%s>\n' % (namespace_, name_)) 4572 else: 4573 outfile.write(' />\n') 4574 def exportAttributes(self, outfile, level, namespace_='', name_='locationType'): 4575 if self.bodystart is not None: 4576 outfile.write(' bodystart="%s"' % self.format_integer(self.bodystart, input_name='bodystart')) 4577 if self.line is not None: 4578 outfile.write(' line="%s"' % self.format_integer(self.line, input_name='line')) 4579 if self.bodyend is not None: 4580 outfile.write(' bodyend="%s"' % self.format_integer(self.bodyend, input_name='bodyend')) 4581 if self.bodyfile is not None: 4582 outfile.write(' bodyfile=%s' % (self.format_string(quote_attrib(self.bodyfile).encode(ExternalEncoding), input_name='bodyfile'), )) 4583 if self.file is not None: 4584 outfile.write(' file=%s' % (self.format_string(quote_attrib(self.file).encode(ExternalEncoding), input_name='file'), )) 4585 def exportChildren(self, outfile, level, namespace_='', name_='locationType'): 4586 if self.valueOf_.find('![CDATA')>-1: 4587 value=quote_xml('%s' % self.valueOf_) 4588 value=value.replace('![CDATA','<![CDATA') 4589 value=value.replace(']]',']]>') 4590 outfile.write(value) 4591 else: 4592 outfile.write(quote_xml('%s' % self.valueOf_)) 4593 def hasContent_(self): 4594 if ( 4595 self.valueOf_ is not None 4596 ): 4597 return True 4598 else: 4599 return False 4600 def exportLiteral(self, outfile, level, name_='locationType'): 4601 level += 1 4602 self.exportLiteralAttributes(outfile, level, name_) 4603 if self.hasContent_(): 4604 self.exportLiteralChildren(outfile, level, name_) 4605 def exportLiteralAttributes(self, outfile, level, name_): 4606 if self.bodystart is not None: 4607 showIndent(outfile, level) 4608 outfile.write('bodystart = %s,\n' % (self.bodystart,)) 4609 if self.line is not None: 4610 showIndent(outfile, level) 4611 outfile.write('line = %s,\n' % (self.line,)) 4612 if self.bodyend is not None: 4613 showIndent(outfile, level) 4614 outfile.write('bodyend = %s,\n' % (self.bodyend,)) 4615 if self.bodyfile is not None: 4616 showIndent(outfile, level) 4617 outfile.write('bodyfile = %s,\n' % (self.bodyfile,)) 4618 if self.file is not None: 4619 showIndent(outfile, level) 4620 outfile.write('file = %s,\n' % (self.file,)) 4621 def exportLiteralChildren(self, outfile, level, name_): 4622 showIndent(outfile, level) 4623 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 4624 def build(self, node_): 4625 attrs = node_.attributes 4626 self.buildAttributes(attrs) 4627 self.valueOf_ = '' 4628 for child_ in node_.childNodes: 4629 nodeName_ = child_.nodeName.split(':')[-1] 4630 self.buildChildren(child_, nodeName_) 4631 def buildAttributes(self, attrs): 4632 if attrs.get('bodystart'): 4633 try: 4634 self.bodystart = int(attrs.get('bodystart').value) 4635 except ValueError as exp: 4636 raise ValueError('Bad integer attribute (bodystart): %s' % exp) 4637 if attrs.get('line'): 4638 try: 4639 self.line = int(attrs.get('line').value) 4640 except ValueError as exp: 4641 raise ValueError('Bad integer attribute (line): %s' % exp) 4642 if attrs.get('bodyend'): 4643 try: 4644 self.bodyend = int(attrs.get('bodyend').value) 4645 except ValueError as exp: 4646 raise ValueError('Bad integer attribute (bodyend): %s' % exp) 4647 if attrs.get('bodyfile'): 4648 self.bodyfile = attrs.get('bodyfile').value 4649 if attrs.get('file'): 4650 self.file = attrs.get('file').value 4651 def buildChildren(self, child_, nodeName_): 4652 if child_.nodeType == Node.TEXT_NODE: 4653 self.valueOf_ += child_.nodeValue 4654 elif child_.nodeType == Node.CDATA_SECTION_NODE: 4655 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 4656# end class locationType 4657 4658 4659class docSect1Type(GeneratedsSuper): 4660 subclass = None 4661 superclass = None 4662 def __init__(self, id=None, title=None, para=None, sect2=None, internal=None, mixedclass_=None, content_=None): 4663 self.id = id 4664 if mixedclass_ is None: 4665 self.mixedclass_ = MixedContainer 4666 else: 4667 self.mixedclass_ = mixedclass_ 4668 if content_ is None: 4669 self.content_ = [] 4670 else: 4671 self.content_ = content_ 4672 def factory(*args_, **kwargs_): 4673 if docSect1Type.subclass: 4674 return docSect1Type.subclass(*args_, **kwargs_) 4675 else: 4676 return docSect1Type(*args_, **kwargs_) 4677 factory = staticmethod(factory) 4678 def get_title(self): return self.title 4679 def set_title(self, title): self.title = title 4680 def get_para(self): return self.para 4681 def set_para(self, para): self.para = para 4682 def add_para(self, value): self.para.append(value) 4683 def insert_para(self, index, value): self.para[index] = value 4684 def get_sect2(self): return self.sect2 4685 def set_sect2(self, sect2): self.sect2 = sect2 4686 def add_sect2(self, value): self.sect2.append(value) 4687 def insert_sect2(self, index, value): self.sect2[index] = value 4688 def get_internal(self): return self.internal 4689 def set_internal(self, internal): self.internal = internal 4690 def get_id(self): return self.id 4691 def set_id(self, id): self.id = id 4692 def export(self, outfile, level, namespace_='', name_='docSect1Type', namespacedef_=''): 4693 showIndent(outfile, level) 4694 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4695 self.exportAttributes(outfile, level, namespace_, name_='docSect1Type') 4696 outfile.write('>') 4697 self.exportChildren(outfile, level + 1, namespace_, name_) 4698 outfile.write('</%s%s>\n' % (namespace_, name_)) 4699 def exportAttributes(self, outfile, level, namespace_='', name_='docSect1Type'): 4700 if self.id is not None: 4701 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 4702 def exportChildren(self, outfile, level, namespace_='', name_='docSect1Type'): 4703 for item_ in self.content_: 4704 item_.export(outfile, level, item_.name, namespace_) 4705 def hasContent_(self): 4706 if ( 4707 self.title is not None or 4708 self.para is not None or 4709 self.sect2 is not None or 4710 self.internal is not None 4711 ): 4712 return True 4713 else: 4714 return False 4715 def exportLiteral(self, outfile, level, name_='docSect1Type'): 4716 level += 1 4717 self.exportLiteralAttributes(outfile, level, name_) 4718 if self.hasContent_(): 4719 self.exportLiteralChildren(outfile, level, name_) 4720 def exportLiteralAttributes(self, outfile, level, name_): 4721 if self.id is not None: 4722 showIndent(outfile, level) 4723 outfile.write('id = %s,\n' % (self.id,)) 4724 def exportLiteralChildren(self, outfile, level, name_): 4725 showIndent(outfile, level) 4726 outfile.write('content_ = [\n') 4727 for item_ in self.content_: 4728 item_.exportLiteral(outfile, level, name_) 4729 showIndent(outfile, level) 4730 outfile.write('],\n') 4731 showIndent(outfile, level) 4732 outfile.write('content_ = [\n') 4733 for item_ in self.content_: 4734 item_.exportLiteral(outfile, level, name_) 4735 showIndent(outfile, level) 4736 outfile.write('],\n') 4737 showIndent(outfile, level) 4738 outfile.write('content_ = [\n') 4739 for item_ in self.content_: 4740 item_.exportLiteral(outfile, level, name_) 4741 showIndent(outfile, level) 4742 outfile.write('],\n') 4743 showIndent(outfile, level) 4744 outfile.write('content_ = [\n') 4745 for item_ in self.content_: 4746 item_.exportLiteral(outfile, level, name_) 4747 showIndent(outfile, level) 4748 outfile.write('],\n') 4749 def build(self, node_): 4750 attrs = node_.attributes 4751 self.buildAttributes(attrs) 4752 for child_ in node_.childNodes: 4753 nodeName_ = child_.nodeName.split(':')[-1] 4754 self.buildChildren(child_, nodeName_) 4755 def buildAttributes(self, attrs): 4756 if attrs.get('id'): 4757 self.id = attrs.get('id').value 4758 def buildChildren(self, child_, nodeName_): 4759 if child_.nodeType == Node.ELEMENT_NODE and \ 4760 nodeName_ == 'title': 4761 childobj_ = docTitleType.factory() 4762 childobj_.build(child_) 4763 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4764 MixedContainer.TypeNone, 'title', childobj_) 4765 self.content_.append(obj_) 4766 elif child_.nodeType == Node.ELEMENT_NODE and \ 4767 nodeName_ == 'para': 4768 childobj_ = docParaType.factory() 4769 childobj_.build(child_) 4770 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4771 MixedContainer.TypeNone, 'para', childobj_) 4772 self.content_.append(obj_) 4773 elif child_.nodeType == Node.ELEMENT_NODE and \ 4774 nodeName_ == 'sect2': 4775 childobj_ = docSect2Type.factory() 4776 childobj_.build(child_) 4777 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4778 MixedContainer.TypeNone, 'sect2', childobj_) 4779 self.content_.append(obj_) 4780 elif child_.nodeType == Node.ELEMENT_NODE and \ 4781 nodeName_ == 'internal': 4782 childobj_ = docInternalS1Type.factory() 4783 childobj_.build(child_) 4784 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4785 MixedContainer.TypeNone, 'internal', childobj_) 4786 self.content_.append(obj_) 4787 elif child_.nodeType == Node.TEXT_NODE: 4788 obj_ = self.mixedclass_(MixedContainer.CategoryText, 4789 MixedContainer.TypeNone, '', child_.nodeValue) 4790 self.content_.append(obj_) 4791# end class docSect1Type 4792 4793 4794class docSect2Type(GeneratedsSuper): 4795 subclass = None 4796 superclass = None 4797 def __init__(self, id=None, title=None, para=None, sect3=None, internal=None, mixedclass_=None, content_=None): 4798 self.id = id 4799 if mixedclass_ is None: 4800 self.mixedclass_ = MixedContainer 4801 else: 4802 self.mixedclass_ = mixedclass_ 4803 if content_ is None: 4804 self.content_ = [] 4805 else: 4806 self.content_ = content_ 4807 def factory(*args_, **kwargs_): 4808 if docSect2Type.subclass: 4809 return docSect2Type.subclass(*args_, **kwargs_) 4810 else: 4811 return docSect2Type(*args_, **kwargs_) 4812 factory = staticmethod(factory) 4813 def get_title(self): return self.title 4814 def set_title(self, title): self.title = title 4815 def get_para(self): return self.para 4816 def set_para(self, para): self.para = para 4817 def add_para(self, value): self.para.append(value) 4818 def insert_para(self, index, value): self.para[index] = value 4819 def get_sect3(self): return self.sect3 4820 def set_sect3(self, sect3): self.sect3 = sect3 4821 def add_sect3(self, value): self.sect3.append(value) 4822 def insert_sect3(self, index, value): self.sect3[index] = value 4823 def get_internal(self): return self.internal 4824 def set_internal(self, internal): self.internal = internal 4825 def get_id(self): return self.id 4826 def set_id(self, id): self.id = id 4827 def export(self, outfile, level, namespace_='', name_='docSect2Type', namespacedef_=''): 4828 showIndent(outfile, level) 4829 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4830 self.exportAttributes(outfile, level, namespace_, name_='docSect2Type') 4831 outfile.write('>') 4832 self.exportChildren(outfile, level + 1, namespace_, name_) 4833 outfile.write('</%s%s>\n' % (namespace_, name_)) 4834 def exportAttributes(self, outfile, level, namespace_='', name_='docSect2Type'): 4835 if self.id is not None: 4836 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 4837 def exportChildren(self, outfile, level, namespace_='', name_='docSect2Type'): 4838 for item_ in self.content_: 4839 item_.export(outfile, level, item_.name, namespace_) 4840 def hasContent_(self): 4841 if ( 4842 self.title is not None or 4843 self.para is not None or 4844 self.sect3 is not None or 4845 self.internal is not None 4846 ): 4847 return True 4848 else: 4849 return False 4850 def exportLiteral(self, outfile, level, name_='docSect2Type'): 4851 level += 1 4852 self.exportLiteralAttributes(outfile, level, name_) 4853 if self.hasContent_(): 4854 self.exportLiteralChildren(outfile, level, name_) 4855 def exportLiteralAttributes(self, outfile, level, name_): 4856 if self.id is not None: 4857 showIndent(outfile, level) 4858 outfile.write('id = %s,\n' % (self.id,)) 4859 def exportLiteralChildren(self, outfile, level, name_): 4860 showIndent(outfile, level) 4861 outfile.write('content_ = [\n') 4862 for item_ in self.content_: 4863 item_.exportLiteral(outfile, level, name_) 4864 showIndent(outfile, level) 4865 outfile.write('],\n') 4866 showIndent(outfile, level) 4867 outfile.write('content_ = [\n') 4868 for item_ in self.content_: 4869 item_.exportLiteral(outfile, level, name_) 4870 showIndent(outfile, level) 4871 outfile.write('],\n') 4872 showIndent(outfile, level) 4873 outfile.write('content_ = [\n') 4874 for item_ in self.content_: 4875 item_.exportLiteral(outfile, level, name_) 4876 showIndent(outfile, level) 4877 outfile.write('],\n') 4878 showIndent(outfile, level) 4879 outfile.write('content_ = [\n') 4880 for item_ in self.content_: 4881 item_.exportLiteral(outfile, level, name_) 4882 showIndent(outfile, level) 4883 outfile.write('],\n') 4884 def build(self, node_): 4885 attrs = node_.attributes 4886 self.buildAttributes(attrs) 4887 for child_ in node_.childNodes: 4888 nodeName_ = child_.nodeName.split(':')[-1] 4889 self.buildChildren(child_, nodeName_) 4890 def buildAttributes(self, attrs): 4891 if attrs.get('id'): 4892 self.id = attrs.get('id').value 4893 def buildChildren(self, child_, nodeName_): 4894 if child_.nodeType == Node.ELEMENT_NODE and \ 4895 nodeName_ == 'title': 4896 childobj_ = docTitleType.factory() 4897 childobj_.build(child_) 4898 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4899 MixedContainer.TypeNone, 'title', childobj_) 4900 self.content_.append(obj_) 4901 elif child_.nodeType == Node.ELEMENT_NODE and \ 4902 nodeName_ == 'para': 4903 childobj_ = docParaType.factory() 4904 childobj_.build(child_) 4905 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4906 MixedContainer.TypeNone, 'para', childobj_) 4907 self.content_.append(obj_) 4908 elif child_.nodeType == Node.ELEMENT_NODE and \ 4909 nodeName_ == 'sect3': 4910 childobj_ = docSect3Type.factory() 4911 childobj_.build(child_) 4912 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4913 MixedContainer.TypeNone, 'sect3', childobj_) 4914 self.content_.append(obj_) 4915 elif child_.nodeType == Node.ELEMENT_NODE and \ 4916 nodeName_ == 'internal': 4917 childobj_ = docInternalS2Type.factory() 4918 childobj_.build(child_) 4919 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 4920 MixedContainer.TypeNone, 'internal', childobj_) 4921 self.content_.append(obj_) 4922 elif child_.nodeType == Node.TEXT_NODE: 4923 obj_ = self.mixedclass_(MixedContainer.CategoryText, 4924 MixedContainer.TypeNone, '', child_.nodeValue) 4925 self.content_.append(obj_) 4926# end class docSect2Type 4927 4928 4929class docSect3Type(GeneratedsSuper): 4930 subclass = None 4931 superclass = None 4932 def __init__(self, id=None, title=None, para=None, sect4=None, internal=None, mixedclass_=None, content_=None): 4933 self.id = id 4934 if mixedclass_ is None: 4935 self.mixedclass_ = MixedContainer 4936 else: 4937 self.mixedclass_ = mixedclass_ 4938 if content_ is None: 4939 self.content_ = [] 4940 else: 4941 self.content_ = content_ 4942 def factory(*args_, **kwargs_): 4943 if docSect3Type.subclass: 4944 return docSect3Type.subclass(*args_, **kwargs_) 4945 else: 4946 return docSect3Type(*args_, **kwargs_) 4947 factory = staticmethod(factory) 4948 def get_title(self): return self.title 4949 def set_title(self, title): self.title = title 4950 def get_para(self): return self.para 4951 def set_para(self, para): self.para = para 4952 def add_para(self, value): self.para.append(value) 4953 def insert_para(self, index, value): self.para[index] = value 4954 def get_sect4(self): return self.sect4 4955 def set_sect4(self, sect4): self.sect4 = sect4 4956 def add_sect4(self, value): self.sect4.append(value) 4957 def insert_sect4(self, index, value): self.sect4[index] = value 4958 def get_internal(self): return self.internal 4959 def set_internal(self, internal): self.internal = internal 4960 def get_id(self): return self.id 4961 def set_id(self, id): self.id = id 4962 def export(self, outfile, level, namespace_='', name_='docSect3Type', namespacedef_=''): 4963 showIndent(outfile, level) 4964 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 4965 self.exportAttributes(outfile, level, namespace_, name_='docSect3Type') 4966 outfile.write('>') 4967 self.exportChildren(outfile, level + 1, namespace_, name_) 4968 outfile.write('</%s%s>\n' % (namespace_, name_)) 4969 def exportAttributes(self, outfile, level, namespace_='', name_='docSect3Type'): 4970 if self.id is not None: 4971 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 4972 def exportChildren(self, outfile, level, namespace_='', name_='docSect3Type'): 4973 for item_ in self.content_: 4974 item_.export(outfile, level, item_.name, namespace_) 4975 def hasContent_(self): 4976 if ( 4977 self.title is not None or 4978 self.para is not None or 4979 self.sect4 is not None or 4980 self.internal is not None 4981 ): 4982 return True 4983 else: 4984 return False 4985 def exportLiteral(self, outfile, level, name_='docSect3Type'): 4986 level += 1 4987 self.exportLiteralAttributes(outfile, level, name_) 4988 if self.hasContent_(): 4989 self.exportLiteralChildren(outfile, level, name_) 4990 def exportLiteralAttributes(self, outfile, level, name_): 4991 if self.id is not None: 4992 showIndent(outfile, level) 4993 outfile.write('id = %s,\n' % (self.id,)) 4994 def exportLiteralChildren(self, outfile, level, name_): 4995 showIndent(outfile, level) 4996 outfile.write('content_ = [\n') 4997 for item_ in self.content_: 4998 item_.exportLiteral(outfile, level, name_) 4999 showIndent(outfile, level) 5000 outfile.write('],\n') 5001 showIndent(outfile, level) 5002 outfile.write('content_ = [\n') 5003 for item_ in self.content_: 5004 item_.exportLiteral(outfile, level, name_) 5005 showIndent(outfile, level) 5006 outfile.write('],\n') 5007 showIndent(outfile, level) 5008 outfile.write('content_ = [\n') 5009 for item_ in self.content_: 5010 item_.exportLiteral(outfile, level, name_) 5011 showIndent(outfile, level) 5012 outfile.write('],\n') 5013 showIndent(outfile, level) 5014 outfile.write('content_ = [\n') 5015 for item_ in self.content_: 5016 item_.exportLiteral(outfile, level, name_) 5017 showIndent(outfile, level) 5018 outfile.write('],\n') 5019 def build(self, node_): 5020 attrs = node_.attributes 5021 self.buildAttributes(attrs) 5022 for child_ in node_.childNodes: 5023 nodeName_ = child_.nodeName.split(':')[-1] 5024 self.buildChildren(child_, nodeName_) 5025 def buildAttributes(self, attrs): 5026 if attrs.get('id'): 5027 self.id = attrs.get('id').value 5028 def buildChildren(self, child_, nodeName_): 5029 if child_.nodeType == Node.ELEMENT_NODE and \ 5030 nodeName_ == 'title': 5031 childobj_ = docTitleType.factory() 5032 childobj_.build(child_) 5033 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5034 MixedContainer.TypeNone, 'title', childobj_) 5035 self.content_.append(obj_) 5036 elif child_.nodeType == Node.ELEMENT_NODE and \ 5037 nodeName_ == 'para': 5038 childobj_ = docParaType.factory() 5039 childobj_.build(child_) 5040 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5041 MixedContainer.TypeNone, 'para', childobj_) 5042 self.content_.append(obj_) 5043 elif child_.nodeType == Node.ELEMENT_NODE and \ 5044 nodeName_ == 'sect4': 5045 childobj_ = docSect4Type.factory() 5046 childobj_.build(child_) 5047 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5048 MixedContainer.TypeNone, 'sect4', childobj_) 5049 self.content_.append(obj_) 5050 elif child_.nodeType == Node.ELEMENT_NODE and \ 5051 nodeName_ == 'internal': 5052 childobj_ = docInternalS3Type.factory() 5053 childobj_.build(child_) 5054 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5055 MixedContainer.TypeNone, 'internal', childobj_) 5056 self.content_.append(obj_) 5057 elif child_.nodeType == Node.TEXT_NODE: 5058 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5059 MixedContainer.TypeNone, '', child_.nodeValue) 5060 self.content_.append(obj_) 5061# end class docSect3Type 5062 5063 5064class docSect4Type(GeneratedsSuper): 5065 subclass = None 5066 superclass = None 5067 def __init__(self, id=None, title=None, para=None, internal=None, mixedclass_=None, content_=None): 5068 self.id = id 5069 if mixedclass_ is None: 5070 self.mixedclass_ = MixedContainer 5071 else: 5072 self.mixedclass_ = mixedclass_ 5073 if content_ is None: 5074 self.content_ = [] 5075 else: 5076 self.content_ = content_ 5077 def factory(*args_, **kwargs_): 5078 if docSect4Type.subclass: 5079 return docSect4Type.subclass(*args_, **kwargs_) 5080 else: 5081 return docSect4Type(*args_, **kwargs_) 5082 factory = staticmethod(factory) 5083 def get_title(self): return self.title 5084 def set_title(self, title): self.title = title 5085 def get_para(self): return self.para 5086 def set_para(self, para): self.para = para 5087 def add_para(self, value): self.para.append(value) 5088 def insert_para(self, index, value): self.para[index] = value 5089 def get_internal(self): return self.internal 5090 def set_internal(self, internal): self.internal = internal 5091 def get_id(self): return self.id 5092 def set_id(self, id): self.id = id 5093 def export(self, outfile, level, namespace_='', name_='docSect4Type', namespacedef_=''): 5094 showIndent(outfile, level) 5095 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5096 self.exportAttributes(outfile, level, namespace_, name_='docSect4Type') 5097 outfile.write('>') 5098 self.exportChildren(outfile, level + 1, namespace_, name_) 5099 outfile.write('</%s%s>\n' % (namespace_, name_)) 5100 def exportAttributes(self, outfile, level, namespace_='', name_='docSect4Type'): 5101 if self.id is not None: 5102 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 5103 def exportChildren(self, outfile, level, namespace_='', name_='docSect4Type'): 5104 for item_ in self.content_: 5105 item_.export(outfile, level, item_.name, namespace_) 5106 def hasContent_(self): 5107 if ( 5108 self.title is not None or 5109 self.para is not None or 5110 self.internal is not None 5111 ): 5112 return True 5113 else: 5114 return False 5115 def exportLiteral(self, outfile, level, name_='docSect4Type'): 5116 level += 1 5117 self.exportLiteralAttributes(outfile, level, name_) 5118 if self.hasContent_(): 5119 self.exportLiteralChildren(outfile, level, name_) 5120 def exportLiteralAttributes(self, outfile, level, name_): 5121 if self.id is not None: 5122 showIndent(outfile, level) 5123 outfile.write('id = %s,\n' % (self.id,)) 5124 def exportLiteralChildren(self, outfile, level, name_): 5125 showIndent(outfile, level) 5126 outfile.write('content_ = [\n') 5127 for item_ in self.content_: 5128 item_.exportLiteral(outfile, level, name_) 5129 showIndent(outfile, level) 5130 outfile.write('],\n') 5131 showIndent(outfile, level) 5132 outfile.write('content_ = [\n') 5133 for item_ in self.content_: 5134 item_.exportLiteral(outfile, level, name_) 5135 showIndent(outfile, level) 5136 outfile.write('],\n') 5137 showIndent(outfile, level) 5138 outfile.write('content_ = [\n') 5139 for item_ in self.content_: 5140 item_.exportLiteral(outfile, level, name_) 5141 showIndent(outfile, level) 5142 outfile.write('],\n') 5143 def build(self, node_): 5144 attrs = node_.attributes 5145 self.buildAttributes(attrs) 5146 for child_ in node_.childNodes: 5147 nodeName_ = child_.nodeName.split(':')[-1] 5148 self.buildChildren(child_, nodeName_) 5149 def buildAttributes(self, attrs): 5150 if attrs.get('id'): 5151 self.id = attrs.get('id').value 5152 def buildChildren(self, child_, nodeName_): 5153 if child_.nodeType == Node.ELEMENT_NODE and \ 5154 nodeName_ == 'title': 5155 childobj_ = docTitleType.factory() 5156 childobj_.build(child_) 5157 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5158 MixedContainer.TypeNone, 'title', childobj_) 5159 self.content_.append(obj_) 5160 elif child_.nodeType == Node.ELEMENT_NODE and \ 5161 nodeName_ == 'para': 5162 childobj_ = docParaType.factory() 5163 childobj_.build(child_) 5164 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5165 MixedContainer.TypeNone, 'para', childobj_) 5166 self.content_.append(obj_) 5167 elif child_.nodeType == Node.ELEMENT_NODE and \ 5168 nodeName_ == 'internal': 5169 childobj_ = docInternalS4Type.factory() 5170 childobj_.build(child_) 5171 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5172 MixedContainer.TypeNone, 'internal', childobj_) 5173 self.content_.append(obj_) 5174 elif child_.nodeType == Node.TEXT_NODE: 5175 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5176 MixedContainer.TypeNone, '', child_.nodeValue) 5177 self.content_.append(obj_) 5178# end class docSect4Type 5179 5180 5181class docInternalType(GeneratedsSuper): 5182 subclass = None 5183 superclass = None 5184 def __init__(self, para=None, sect1=None, mixedclass_=None, content_=None): 5185 if mixedclass_ is None: 5186 self.mixedclass_ = MixedContainer 5187 else: 5188 self.mixedclass_ = mixedclass_ 5189 if content_ is None: 5190 self.content_ = [] 5191 else: 5192 self.content_ = content_ 5193 def factory(*args_, **kwargs_): 5194 if docInternalType.subclass: 5195 return docInternalType.subclass(*args_, **kwargs_) 5196 else: 5197 return docInternalType(*args_, **kwargs_) 5198 factory = staticmethod(factory) 5199 def get_para(self): return self.para 5200 def set_para(self, para): self.para = para 5201 def add_para(self, value): self.para.append(value) 5202 def insert_para(self, index, value): self.para[index] = value 5203 def get_sect1(self): return self.sect1 5204 def set_sect1(self, sect1): self.sect1 = sect1 5205 def add_sect1(self, value): self.sect1.append(value) 5206 def insert_sect1(self, index, value): self.sect1[index] = value 5207 def export(self, outfile, level, namespace_='', name_='docInternalType', namespacedef_=''): 5208 showIndent(outfile, level) 5209 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5210 self.exportAttributes(outfile, level, namespace_, name_='docInternalType') 5211 outfile.write('>') 5212 self.exportChildren(outfile, level + 1, namespace_, name_) 5213 outfile.write('</%s%s>\n' % (namespace_, name_)) 5214 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalType'): 5215 pass 5216 def exportChildren(self, outfile, level, namespace_='', name_='docInternalType'): 5217 for item_ in self.content_: 5218 item_.export(outfile, level, item_.name, namespace_) 5219 def hasContent_(self): 5220 if ( 5221 self.para is not None or 5222 self.sect1 is not None 5223 ): 5224 return True 5225 else: 5226 return False 5227 def exportLiteral(self, outfile, level, name_='docInternalType'): 5228 level += 1 5229 self.exportLiteralAttributes(outfile, level, name_) 5230 if self.hasContent_(): 5231 self.exportLiteralChildren(outfile, level, name_) 5232 def exportLiteralAttributes(self, outfile, level, name_): 5233 pass 5234 def exportLiteralChildren(self, outfile, level, name_): 5235 showIndent(outfile, level) 5236 outfile.write('content_ = [\n') 5237 for item_ in self.content_: 5238 item_.exportLiteral(outfile, level, name_) 5239 showIndent(outfile, level) 5240 outfile.write('],\n') 5241 showIndent(outfile, level) 5242 outfile.write('content_ = [\n') 5243 for item_ in self.content_: 5244 item_.exportLiteral(outfile, level, name_) 5245 showIndent(outfile, level) 5246 outfile.write('],\n') 5247 def build(self, node_): 5248 attrs = node_.attributes 5249 self.buildAttributes(attrs) 5250 for child_ in node_.childNodes: 5251 nodeName_ = child_.nodeName.split(':')[-1] 5252 self.buildChildren(child_, nodeName_) 5253 def buildAttributes(self, attrs): 5254 pass 5255 def buildChildren(self, child_, nodeName_): 5256 if child_.nodeType == Node.ELEMENT_NODE and \ 5257 nodeName_ == 'para': 5258 childobj_ = docParaType.factory() 5259 childobj_.build(child_) 5260 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5261 MixedContainer.TypeNone, 'para', childobj_) 5262 self.content_.append(obj_) 5263 elif child_.nodeType == Node.ELEMENT_NODE and \ 5264 nodeName_ == 'sect1': 5265 childobj_ = docSect1Type.factory() 5266 childobj_.build(child_) 5267 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5268 MixedContainer.TypeNone, 'sect1', 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 docInternalType 5275 5276 5277class docInternalS1Type(GeneratedsSuper): 5278 subclass = None 5279 superclass = None 5280 def __init__(self, para=None, sect2=None, mixedclass_=None, content_=None): 5281 if mixedclass_ is None: 5282 self.mixedclass_ = MixedContainer 5283 else: 5284 self.mixedclass_ = mixedclass_ 5285 if content_ is None: 5286 self.content_ = [] 5287 else: 5288 self.content_ = content_ 5289 def factory(*args_, **kwargs_): 5290 if docInternalS1Type.subclass: 5291 return docInternalS1Type.subclass(*args_, **kwargs_) 5292 else: 5293 return docInternalS1Type(*args_, **kwargs_) 5294 factory = staticmethod(factory) 5295 def get_para(self): return self.para 5296 def set_para(self, para): self.para = para 5297 def add_para(self, value): self.para.append(value) 5298 def insert_para(self, index, value): self.para[index] = value 5299 def get_sect2(self): return self.sect2 5300 def set_sect2(self, sect2): self.sect2 = sect2 5301 def add_sect2(self, value): self.sect2.append(value) 5302 def insert_sect2(self, index, value): self.sect2[index] = value 5303 def export(self, outfile, level, namespace_='', name_='docInternalS1Type', namespacedef_=''): 5304 showIndent(outfile, level) 5305 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5306 self.exportAttributes(outfile, level, namespace_, name_='docInternalS1Type') 5307 outfile.write('>') 5308 self.exportChildren(outfile, level + 1, namespace_, name_) 5309 outfile.write('</%s%s>\n' % (namespace_, name_)) 5310 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS1Type'): 5311 pass 5312 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS1Type'): 5313 for item_ in self.content_: 5314 item_.export(outfile, level, item_.name, namespace_) 5315 def hasContent_(self): 5316 if ( 5317 self.para is not None or 5318 self.sect2 is not None 5319 ): 5320 return True 5321 else: 5322 return False 5323 def exportLiteral(self, outfile, level, name_='docInternalS1Type'): 5324 level += 1 5325 self.exportLiteralAttributes(outfile, level, name_) 5326 if self.hasContent_(): 5327 self.exportLiteralChildren(outfile, level, name_) 5328 def exportLiteralAttributes(self, outfile, level, name_): 5329 pass 5330 def exportLiteralChildren(self, outfile, level, name_): 5331 showIndent(outfile, level) 5332 outfile.write('content_ = [\n') 5333 for item_ in self.content_: 5334 item_.exportLiteral(outfile, level, name_) 5335 showIndent(outfile, level) 5336 outfile.write('],\n') 5337 showIndent(outfile, level) 5338 outfile.write('content_ = [\n') 5339 for item_ in self.content_: 5340 item_.exportLiteral(outfile, level, name_) 5341 showIndent(outfile, level) 5342 outfile.write('],\n') 5343 def build(self, node_): 5344 attrs = node_.attributes 5345 self.buildAttributes(attrs) 5346 for child_ in node_.childNodes: 5347 nodeName_ = child_.nodeName.split(':')[-1] 5348 self.buildChildren(child_, nodeName_) 5349 def buildAttributes(self, attrs): 5350 pass 5351 def buildChildren(self, child_, nodeName_): 5352 if child_.nodeType == Node.ELEMENT_NODE and \ 5353 nodeName_ == 'para': 5354 childobj_ = docParaType.factory() 5355 childobj_.build(child_) 5356 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5357 MixedContainer.TypeNone, 'para', childobj_) 5358 self.content_.append(obj_) 5359 elif child_.nodeType == Node.ELEMENT_NODE and \ 5360 nodeName_ == 'sect2': 5361 childobj_ = docSect2Type.factory() 5362 childobj_.build(child_) 5363 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5364 MixedContainer.TypeNone, 'sect2', childobj_) 5365 self.content_.append(obj_) 5366 elif child_.nodeType == Node.TEXT_NODE: 5367 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5368 MixedContainer.TypeNone, '', child_.nodeValue) 5369 self.content_.append(obj_) 5370# end class docInternalS1Type 5371 5372 5373class docInternalS2Type(GeneratedsSuper): 5374 subclass = None 5375 superclass = None 5376 def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None): 5377 if mixedclass_ is None: 5378 self.mixedclass_ = MixedContainer 5379 else: 5380 self.mixedclass_ = mixedclass_ 5381 if content_ is None: 5382 self.content_ = [] 5383 else: 5384 self.content_ = content_ 5385 def factory(*args_, **kwargs_): 5386 if docInternalS2Type.subclass: 5387 return docInternalS2Type.subclass(*args_, **kwargs_) 5388 else: 5389 return docInternalS2Type(*args_, **kwargs_) 5390 factory = staticmethod(factory) 5391 def get_para(self): return self.para 5392 def set_para(self, para): self.para = para 5393 def add_para(self, value): self.para.append(value) 5394 def insert_para(self, index, value): self.para[index] = value 5395 def get_sect3(self): return self.sect3 5396 def set_sect3(self, sect3): self.sect3 = sect3 5397 def add_sect3(self, value): self.sect3.append(value) 5398 def insert_sect3(self, index, value): self.sect3[index] = value 5399 def export(self, outfile, level, namespace_='', name_='docInternalS2Type', namespacedef_=''): 5400 showIndent(outfile, level) 5401 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5402 self.exportAttributes(outfile, level, namespace_, name_='docInternalS2Type') 5403 outfile.write('>') 5404 self.exportChildren(outfile, level + 1, namespace_, name_) 5405 outfile.write('</%s%s>\n' % (namespace_, name_)) 5406 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS2Type'): 5407 pass 5408 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS2Type'): 5409 for item_ in self.content_: 5410 item_.export(outfile, level, item_.name, namespace_) 5411 def hasContent_(self): 5412 if ( 5413 self.para is not None or 5414 self.sect3 is not None 5415 ): 5416 return True 5417 else: 5418 return False 5419 def exportLiteral(self, outfile, level, name_='docInternalS2Type'): 5420 level += 1 5421 self.exportLiteralAttributes(outfile, level, name_) 5422 if self.hasContent_(): 5423 self.exportLiteralChildren(outfile, level, name_) 5424 def exportLiteralAttributes(self, outfile, level, name_): 5425 pass 5426 def exportLiteralChildren(self, outfile, level, name_): 5427 showIndent(outfile, level) 5428 outfile.write('content_ = [\n') 5429 for item_ in self.content_: 5430 item_.exportLiteral(outfile, level, name_) 5431 showIndent(outfile, level) 5432 outfile.write('],\n') 5433 showIndent(outfile, level) 5434 outfile.write('content_ = [\n') 5435 for item_ in self.content_: 5436 item_.exportLiteral(outfile, level, name_) 5437 showIndent(outfile, level) 5438 outfile.write('],\n') 5439 def build(self, node_): 5440 attrs = node_.attributes 5441 self.buildAttributes(attrs) 5442 for child_ in node_.childNodes: 5443 nodeName_ = child_.nodeName.split(':')[-1] 5444 self.buildChildren(child_, nodeName_) 5445 def buildAttributes(self, attrs): 5446 pass 5447 def buildChildren(self, child_, nodeName_): 5448 if child_.nodeType == Node.ELEMENT_NODE and \ 5449 nodeName_ == 'para': 5450 childobj_ = docParaType.factory() 5451 childobj_.build(child_) 5452 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5453 MixedContainer.TypeNone, 'para', childobj_) 5454 self.content_.append(obj_) 5455 elif child_.nodeType == Node.ELEMENT_NODE and \ 5456 nodeName_ == 'sect3': 5457 childobj_ = docSect3Type.factory() 5458 childobj_.build(child_) 5459 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5460 MixedContainer.TypeNone, 'sect3', childobj_) 5461 self.content_.append(obj_) 5462 elif child_.nodeType == Node.TEXT_NODE: 5463 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5464 MixedContainer.TypeNone, '', child_.nodeValue) 5465 self.content_.append(obj_) 5466# end class docInternalS2Type 5467 5468 5469class docInternalS3Type(GeneratedsSuper): 5470 subclass = None 5471 superclass = None 5472 def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None): 5473 if mixedclass_ is None: 5474 self.mixedclass_ = MixedContainer 5475 else: 5476 self.mixedclass_ = mixedclass_ 5477 if content_ is None: 5478 self.content_ = [] 5479 else: 5480 self.content_ = content_ 5481 def factory(*args_, **kwargs_): 5482 if docInternalS3Type.subclass: 5483 return docInternalS3Type.subclass(*args_, **kwargs_) 5484 else: 5485 return docInternalS3Type(*args_, **kwargs_) 5486 factory = staticmethod(factory) 5487 def get_para(self): return self.para 5488 def set_para(self, para): self.para = para 5489 def add_para(self, value): self.para.append(value) 5490 def insert_para(self, index, value): self.para[index] = value 5491 def get_sect3(self): return self.sect3 5492 def set_sect3(self, sect3): self.sect3 = sect3 5493 def add_sect3(self, value): self.sect3.append(value) 5494 def insert_sect3(self, index, value): self.sect3[index] = value 5495 def export(self, outfile, level, namespace_='', name_='docInternalS3Type', namespacedef_=''): 5496 showIndent(outfile, level) 5497 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5498 self.exportAttributes(outfile, level, namespace_, name_='docInternalS3Type') 5499 outfile.write('>') 5500 self.exportChildren(outfile, level + 1, namespace_, name_) 5501 outfile.write('</%s%s>\n' % (namespace_, name_)) 5502 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS3Type'): 5503 pass 5504 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS3Type'): 5505 for item_ in self.content_: 5506 item_.export(outfile, level, item_.name, namespace_) 5507 def hasContent_(self): 5508 if ( 5509 self.para is not None or 5510 self.sect3 is not None 5511 ): 5512 return True 5513 else: 5514 return False 5515 def exportLiteral(self, outfile, level, name_='docInternalS3Type'): 5516 level += 1 5517 self.exportLiteralAttributes(outfile, level, name_) 5518 if self.hasContent_(): 5519 self.exportLiteralChildren(outfile, level, name_) 5520 def exportLiteralAttributes(self, outfile, level, name_): 5521 pass 5522 def exportLiteralChildren(self, outfile, level, name_): 5523 showIndent(outfile, level) 5524 outfile.write('content_ = [\n') 5525 for item_ in self.content_: 5526 item_.exportLiteral(outfile, level, name_) 5527 showIndent(outfile, level) 5528 outfile.write('],\n') 5529 showIndent(outfile, level) 5530 outfile.write('content_ = [\n') 5531 for item_ in self.content_: 5532 item_.exportLiteral(outfile, level, name_) 5533 showIndent(outfile, level) 5534 outfile.write('],\n') 5535 def build(self, node_): 5536 attrs = node_.attributes 5537 self.buildAttributes(attrs) 5538 for child_ in node_.childNodes: 5539 nodeName_ = child_.nodeName.split(':')[-1] 5540 self.buildChildren(child_, nodeName_) 5541 def buildAttributes(self, attrs): 5542 pass 5543 def buildChildren(self, child_, nodeName_): 5544 if child_.nodeType == Node.ELEMENT_NODE and \ 5545 nodeName_ == 'para': 5546 childobj_ = docParaType.factory() 5547 childobj_.build(child_) 5548 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5549 MixedContainer.TypeNone, 'para', childobj_) 5550 self.content_.append(obj_) 5551 elif child_.nodeType == Node.ELEMENT_NODE and \ 5552 nodeName_ == 'sect3': 5553 childobj_ = docSect4Type.factory() 5554 childobj_.build(child_) 5555 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5556 MixedContainer.TypeNone, 'sect3', childobj_) 5557 self.content_.append(obj_) 5558 elif child_.nodeType == Node.TEXT_NODE: 5559 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5560 MixedContainer.TypeNone, '', child_.nodeValue) 5561 self.content_.append(obj_) 5562# end class docInternalS3Type 5563 5564 5565class docInternalS4Type(GeneratedsSuper): 5566 subclass = None 5567 superclass = None 5568 def __init__(self, para=None, mixedclass_=None, content_=None): 5569 if mixedclass_ is None: 5570 self.mixedclass_ = MixedContainer 5571 else: 5572 self.mixedclass_ = mixedclass_ 5573 if content_ is None: 5574 self.content_ = [] 5575 else: 5576 self.content_ = content_ 5577 def factory(*args_, **kwargs_): 5578 if docInternalS4Type.subclass: 5579 return docInternalS4Type.subclass(*args_, **kwargs_) 5580 else: 5581 return docInternalS4Type(*args_, **kwargs_) 5582 factory = staticmethod(factory) 5583 def get_para(self): return self.para 5584 def set_para(self, para): self.para = para 5585 def add_para(self, value): self.para.append(value) 5586 def insert_para(self, index, value): self.para[index] = value 5587 def export(self, outfile, level, namespace_='', name_='docInternalS4Type', namespacedef_=''): 5588 showIndent(outfile, level) 5589 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5590 self.exportAttributes(outfile, level, namespace_, name_='docInternalS4Type') 5591 outfile.write('>') 5592 self.exportChildren(outfile, level + 1, namespace_, name_) 5593 outfile.write('</%s%s>\n' % (namespace_, name_)) 5594 def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS4Type'): 5595 pass 5596 def exportChildren(self, outfile, level, namespace_='', name_='docInternalS4Type'): 5597 for item_ in self.content_: 5598 item_.export(outfile, level, item_.name, namespace_) 5599 def hasContent_(self): 5600 if ( 5601 self.para is not None 5602 ): 5603 return True 5604 else: 5605 return False 5606 def exportLiteral(self, outfile, level, name_='docInternalS4Type'): 5607 level += 1 5608 self.exportLiteralAttributes(outfile, level, name_) 5609 if self.hasContent_(): 5610 self.exportLiteralChildren(outfile, level, name_) 5611 def exportLiteralAttributes(self, outfile, level, name_): 5612 pass 5613 def exportLiteralChildren(self, outfile, level, name_): 5614 showIndent(outfile, level) 5615 outfile.write('content_ = [\n') 5616 for item_ in self.content_: 5617 item_.exportLiteral(outfile, level, name_) 5618 showIndent(outfile, level) 5619 outfile.write('],\n') 5620 def build(self, node_): 5621 attrs = node_.attributes 5622 self.buildAttributes(attrs) 5623 for child_ in node_.childNodes: 5624 nodeName_ = child_.nodeName.split(':')[-1] 5625 self.buildChildren(child_, nodeName_) 5626 def buildAttributes(self, attrs): 5627 pass 5628 def buildChildren(self, child_, nodeName_): 5629 if child_.nodeType == Node.ELEMENT_NODE and \ 5630 nodeName_ == 'para': 5631 childobj_ = docParaType.factory() 5632 childobj_.build(child_) 5633 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 5634 MixedContainer.TypeNone, 'para', childobj_) 5635 self.content_.append(obj_) 5636 elif child_.nodeType == Node.TEXT_NODE: 5637 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5638 MixedContainer.TypeNone, '', child_.nodeValue) 5639 self.content_.append(obj_) 5640# end class docInternalS4Type 5641 5642 5643class docTitleType(GeneratedsSuper): 5644 subclass = None 5645 superclass = None 5646 def __init__(self, valueOf_='', mixedclass_=None, content_=None): 5647 if mixedclass_ is None: 5648 self.mixedclass_ = MixedContainer 5649 else: 5650 self.mixedclass_ = mixedclass_ 5651 if content_ is None: 5652 self.content_ = [] 5653 else: 5654 self.content_ = content_ 5655 def factory(*args_, **kwargs_): 5656 if docTitleType.subclass: 5657 return docTitleType.subclass(*args_, **kwargs_) 5658 else: 5659 return docTitleType(*args_, **kwargs_) 5660 factory = staticmethod(factory) 5661 def getValueOf_(self): return self.valueOf_ 5662 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 5663 def export(self, outfile, level, namespace_='', name_='docTitleType', namespacedef_=''): 5664 showIndent(outfile, level) 5665 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5666 self.exportAttributes(outfile, level, namespace_, name_='docTitleType') 5667 outfile.write('>') 5668 self.exportChildren(outfile, level + 1, namespace_, name_) 5669 outfile.write('</%s%s>\n' % (namespace_, name_)) 5670 def exportAttributes(self, outfile, level, namespace_='', name_='docTitleType'): 5671 pass 5672 def exportChildren(self, outfile, level, namespace_='', name_='docTitleType'): 5673 if self.valueOf_.find('![CDATA')>-1: 5674 value=quote_xml('%s' % self.valueOf_) 5675 value=value.replace('![CDATA','<![CDATA') 5676 value=value.replace(']]',']]>') 5677 outfile.write(value) 5678 else: 5679 outfile.write(quote_xml('%s' % self.valueOf_)) 5680 def hasContent_(self): 5681 if ( 5682 self.valueOf_ is not None 5683 ): 5684 return True 5685 else: 5686 return False 5687 def exportLiteral(self, outfile, level, name_='docTitleType'): 5688 level += 1 5689 self.exportLiteralAttributes(outfile, level, name_) 5690 if self.hasContent_(): 5691 self.exportLiteralChildren(outfile, level, name_) 5692 def exportLiteralAttributes(self, outfile, level, name_): 5693 pass 5694 def exportLiteralChildren(self, outfile, level, name_): 5695 showIndent(outfile, level) 5696 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 5697 def build(self, node_): 5698 attrs = node_.attributes 5699 self.buildAttributes(attrs) 5700 self.valueOf_ = '' 5701 for child_ in node_.childNodes: 5702 nodeName_ = child_.nodeName.split(':')[-1] 5703 self.buildChildren(child_, nodeName_) 5704 def buildAttributes(self, attrs): 5705 pass 5706 def buildChildren(self, child_, nodeName_): 5707 if child_.nodeType == Node.TEXT_NODE: 5708 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5709 MixedContainer.TypeNone, '', child_.nodeValue) 5710 self.content_.append(obj_) 5711 if child_.nodeType == Node.TEXT_NODE: 5712 self.valueOf_ += child_.nodeValue 5713 elif child_.nodeType == Node.CDATA_SECTION_NODE: 5714 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 5715# end class docTitleType 5716 5717 5718class docParaType(GeneratedsSuper): 5719 subclass = None 5720 superclass = None 5721 def __init__(self, valueOf_='', mixedclass_=None, content_=None): 5722 if mixedclass_ is None: 5723 self.mixedclass_ = MixedContainer 5724 else: 5725 self.mixedclass_ = mixedclass_ 5726 if content_ is None: 5727 self.content_ = [] 5728 else: 5729 self.content_ = content_ 5730 def factory(*args_, **kwargs_): 5731 if docParaType.subclass: 5732 return docParaType.subclass(*args_, **kwargs_) 5733 else: 5734 return docParaType(*args_, **kwargs_) 5735 factory = staticmethod(factory) 5736 def getValueOf_(self): return self.valueOf_ 5737 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 5738 def export(self, outfile, level, namespace_='', name_='docParaType', namespacedef_=''): 5739 showIndent(outfile, level) 5740 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5741 self.exportAttributes(outfile, level, namespace_, name_='docParaType') 5742 outfile.write('>') 5743 self.exportChildren(outfile, level + 1, namespace_, name_) 5744 outfile.write('</%s%s>\n' % (namespace_, name_)) 5745 def exportAttributes(self, outfile, level, namespace_='', name_='docParaType'): 5746 pass 5747 def exportChildren(self, outfile, level, namespace_='', name_='docParaType'): 5748 if self.valueOf_.find('![CDATA')>-1: 5749 value=quote_xml('%s' % self.valueOf_) 5750 value=value.replace('![CDATA','<![CDATA') 5751 value=value.replace(']]',']]>') 5752 outfile.write(value) 5753 else: 5754 outfile.write(quote_xml('%s' % self.valueOf_)) 5755 def hasContent_(self): 5756 if ( 5757 self.valueOf_ is not None 5758 ): 5759 return True 5760 else: 5761 return False 5762 def exportLiteral(self, outfile, level, name_='docParaType'): 5763 level += 1 5764 self.exportLiteralAttributes(outfile, level, name_) 5765 if self.hasContent_(): 5766 self.exportLiteralChildren(outfile, level, name_) 5767 def exportLiteralAttributes(self, outfile, level, name_): 5768 pass 5769 def exportLiteralChildren(self, outfile, level, name_): 5770 showIndent(outfile, level) 5771 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 5772 def build(self, node_): 5773 attrs = node_.attributes 5774 self.buildAttributes(attrs) 5775 self.valueOf_ = '' 5776 for child_ in node_.childNodes: 5777 nodeName_ = child_.nodeName.split(':')[-1] 5778 self.buildChildren(child_, nodeName_) 5779 def buildAttributes(self, attrs): 5780 pass 5781 def buildChildren(self, child_, nodeName_): 5782 if child_.nodeType == Node.TEXT_NODE: 5783 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5784 MixedContainer.TypeNone, '', child_.nodeValue) 5785 self.content_.append(obj_) 5786 if child_.nodeType == Node.TEXT_NODE: 5787 self.valueOf_ += child_.nodeValue 5788 elif child_.nodeType == Node.CDATA_SECTION_NODE: 5789 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 5790# end class docParaType 5791 5792 5793class docMarkupType(GeneratedsSuper): 5794 subclass = None 5795 superclass = None 5796 def __init__(self, valueOf_='', mixedclass_=None, content_=None): 5797 if mixedclass_ is None: 5798 self.mixedclass_ = MixedContainer 5799 else: 5800 self.mixedclass_ = mixedclass_ 5801 if content_ is None: 5802 self.content_ = [] 5803 else: 5804 self.content_ = content_ 5805 def factory(*args_, **kwargs_): 5806 if docMarkupType.subclass: 5807 return docMarkupType.subclass(*args_, **kwargs_) 5808 else: 5809 return docMarkupType(*args_, **kwargs_) 5810 factory = staticmethod(factory) 5811 def getValueOf_(self): return self.valueOf_ 5812 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 5813 def export(self, outfile, level, namespace_='', name_='docMarkupType', namespacedef_=''): 5814 showIndent(outfile, level) 5815 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5816 self.exportAttributes(outfile, level, namespace_, name_='docMarkupType') 5817 outfile.write('>') 5818 self.exportChildren(outfile, level + 1, namespace_, name_) 5819 outfile.write('</%s%s>\n' % (namespace_, name_)) 5820 def exportAttributes(self, outfile, level, namespace_='', name_='docMarkupType'): 5821 pass 5822 def exportChildren(self, outfile, level, namespace_='', name_='docMarkupType'): 5823 if self.valueOf_.find('![CDATA')>-1: 5824 value=quote_xml('%s' % self.valueOf_) 5825 value=value.replace('![CDATA','<![CDATA') 5826 value=value.replace(']]',']]>') 5827 outfile.write(value) 5828 else: 5829 outfile.write(quote_xml('%s' % self.valueOf_)) 5830 def hasContent_(self): 5831 if ( 5832 self.valueOf_ is not None 5833 ): 5834 return True 5835 else: 5836 return False 5837 def exportLiteral(self, outfile, level, name_='docMarkupType'): 5838 level += 1 5839 self.exportLiteralAttributes(outfile, level, name_) 5840 if self.hasContent_(): 5841 self.exportLiteralChildren(outfile, level, name_) 5842 def exportLiteralAttributes(self, outfile, level, name_): 5843 pass 5844 def exportLiteralChildren(self, outfile, level, name_): 5845 showIndent(outfile, level) 5846 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 5847 def build(self, node_): 5848 attrs = node_.attributes 5849 self.buildAttributes(attrs) 5850 self.valueOf_ = '' 5851 for child_ in node_.childNodes: 5852 nodeName_ = child_.nodeName.split(':')[-1] 5853 self.buildChildren(child_, nodeName_) 5854 def buildAttributes(self, attrs): 5855 pass 5856 def buildChildren(self, child_, nodeName_): 5857 if child_.nodeType == Node.TEXT_NODE: 5858 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5859 MixedContainer.TypeNone, '', child_.nodeValue) 5860 self.content_.append(obj_) 5861 if child_.nodeType == Node.TEXT_NODE: 5862 self.valueOf_ += child_.nodeValue 5863 elif child_.nodeType == Node.CDATA_SECTION_NODE: 5864 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 5865# end class docMarkupType 5866 5867 5868class docURLLink(GeneratedsSuper): 5869 subclass = None 5870 superclass = None 5871 def __init__(self, url=None, valueOf_='', mixedclass_=None, content_=None): 5872 self.url = url 5873 if mixedclass_ is None: 5874 self.mixedclass_ = MixedContainer 5875 else: 5876 self.mixedclass_ = mixedclass_ 5877 if content_ is None: 5878 self.content_ = [] 5879 else: 5880 self.content_ = content_ 5881 def factory(*args_, **kwargs_): 5882 if docURLLink.subclass: 5883 return docURLLink.subclass(*args_, **kwargs_) 5884 else: 5885 return docURLLink(*args_, **kwargs_) 5886 factory = staticmethod(factory) 5887 def get_url(self): return self.url 5888 def set_url(self, url): self.url = url 5889 def getValueOf_(self): return self.valueOf_ 5890 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 5891 def export(self, outfile, level, namespace_='', name_='docURLLink', namespacedef_=''): 5892 showIndent(outfile, level) 5893 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5894 self.exportAttributes(outfile, level, namespace_, name_='docURLLink') 5895 outfile.write('>') 5896 self.exportChildren(outfile, level + 1, namespace_, name_) 5897 outfile.write('</%s%s>\n' % (namespace_, name_)) 5898 def exportAttributes(self, outfile, level, namespace_='', name_='docURLLink'): 5899 if self.url is not None: 5900 outfile.write(' url=%s' % (self.format_string(quote_attrib(self.url).encode(ExternalEncoding), input_name='url'), )) 5901 def exportChildren(self, outfile, level, namespace_='', name_='docURLLink'): 5902 if self.valueOf_.find('![CDATA')>-1: 5903 value=quote_xml('%s' % self.valueOf_) 5904 value=value.replace('![CDATA','<![CDATA') 5905 value=value.replace(']]',']]>') 5906 outfile.write(value) 5907 else: 5908 outfile.write(quote_xml('%s' % self.valueOf_)) 5909 def hasContent_(self): 5910 if ( 5911 self.valueOf_ is not None 5912 ): 5913 return True 5914 else: 5915 return False 5916 def exportLiteral(self, outfile, level, name_='docURLLink'): 5917 level += 1 5918 self.exportLiteralAttributes(outfile, level, name_) 5919 if self.hasContent_(): 5920 self.exportLiteralChildren(outfile, level, name_) 5921 def exportLiteralAttributes(self, outfile, level, name_): 5922 if self.url is not None: 5923 showIndent(outfile, level) 5924 outfile.write('url = %s,\n' % (self.url,)) 5925 def exportLiteralChildren(self, outfile, level, name_): 5926 showIndent(outfile, level) 5927 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 5928 def build(self, node_): 5929 attrs = node_.attributes 5930 self.buildAttributes(attrs) 5931 self.valueOf_ = '' 5932 for child_ in node_.childNodes: 5933 nodeName_ = child_.nodeName.split(':')[-1] 5934 self.buildChildren(child_, nodeName_) 5935 def buildAttributes(self, attrs): 5936 if attrs.get('url'): 5937 self.url = attrs.get('url').value 5938 def buildChildren(self, child_, nodeName_): 5939 if child_.nodeType == Node.TEXT_NODE: 5940 obj_ = self.mixedclass_(MixedContainer.CategoryText, 5941 MixedContainer.TypeNone, '', child_.nodeValue) 5942 self.content_.append(obj_) 5943 if child_.nodeType == Node.TEXT_NODE: 5944 self.valueOf_ += child_.nodeValue 5945 elif child_.nodeType == Node.CDATA_SECTION_NODE: 5946 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 5947# end class docURLLink 5948 5949 5950class docAnchorType(GeneratedsSuper): 5951 subclass = None 5952 superclass = None 5953 def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): 5954 self.id = id 5955 if mixedclass_ is None: 5956 self.mixedclass_ = MixedContainer 5957 else: 5958 self.mixedclass_ = mixedclass_ 5959 if content_ is None: 5960 self.content_ = [] 5961 else: 5962 self.content_ = content_ 5963 def factory(*args_, **kwargs_): 5964 if docAnchorType.subclass: 5965 return docAnchorType.subclass(*args_, **kwargs_) 5966 else: 5967 return docAnchorType(*args_, **kwargs_) 5968 factory = staticmethod(factory) 5969 def get_id(self): return self.id 5970 def set_id(self, id): self.id = id 5971 def getValueOf_(self): return self.valueOf_ 5972 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 5973 def export(self, outfile, level, namespace_='', name_='docAnchorType', namespacedef_=''): 5974 showIndent(outfile, level) 5975 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 5976 self.exportAttributes(outfile, level, namespace_, name_='docAnchorType') 5977 outfile.write('>') 5978 self.exportChildren(outfile, level + 1, namespace_, name_) 5979 outfile.write('</%s%s>\n' % (namespace_, name_)) 5980 def exportAttributes(self, outfile, level, namespace_='', name_='docAnchorType'): 5981 if self.id is not None: 5982 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 5983 def exportChildren(self, outfile, level, namespace_='', name_='docAnchorType'): 5984 if self.valueOf_.find('![CDATA')>-1: 5985 value=quote_xml('%s' % self.valueOf_) 5986 value=value.replace('![CDATA','<![CDATA') 5987 value=value.replace(']]',']]>') 5988 outfile.write(value) 5989 else: 5990 outfile.write(quote_xml('%s' % self.valueOf_)) 5991 def hasContent_(self): 5992 if ( 5993 self.valueOf_ is not None 5994 ): 5995 return True 5996 else: 5997 return False 5998 def exportLiteral(self, outfile, level, name_='docAnchorType'): 5999 level += 1 6000 self.exportLiteralAttributes(outfile, level, name_) 6001 if self.hasContent_(): 6002 self.exportLiteralChildren(outfile, level, name_) 6003 def exportLiteralAttributes(self, outfile, level, name_): 6004 if self.id is not None: 6005 showIndent(outfile, level) 6006 outfile.write('id = %s,\n' % (self.id,)) 6007 def exportLiteralChildren(self, outfile, level, name_): 6008 showIndent(outfile, level) 6009 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 6010 def build(self, node_): 6011 attrs = node_.attributes 6012 self.buildAttributes(attrs) 6013 self.valueOf_ = '' 6014 for child_ in node_.childNodes: 6015 nodeName_ = child_.nodeName.split(':')[-1] 6016 self.buildChildren(child_, nodeName_) 6017 def buildAttributes(self, attrs): 6018 if attrs.get('id'): 6019 self.id = attrs.get('id').value 6020 def buildChildren(self, child_, nodeName_): 6021 if child_.nodeType == Node.TEXT_NODE: 6022 obj_ = self.mixedclass_(MixedContainer.CategoryText, 6023 MixedContainer.TypeNone, '', child_.nodeValue) 6024 self.content_.append(obj_) 6025 if child_.nodeType == Node.TEXT_NODE: 6026 self.valueOf_ += child_.nodeValue 6027 elif child_.nodeType == Node.CDATA_SECTION_NODE: 6028 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 6029# end class docAnchorType 6030 6031 6032class docFormulaType(GeneratedsSuper): 6033 subclass = None 6034 superclass = None 6035 def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): 6036 self.id = id 6037 if mixedclass_ is None: 6038 self.mixedclass_ = MixedContainer 6039 else: 6040 self.mixedclass_ = mixedclass_ 6041 if content_ is None: 6042 self.content_ = [] 6043 else: 6044 self.content_ = content_ 6045 def factory(*args_, **kwargs_): 6046 if docFormulaType.subclass: 6047 return docFormulaType.subclass(*args_, **kwargs_) 6048 else: 6049 return docFormulaType(*args_, **kwargs_) 6050 factory = staticmethod(factory) 6051 def get_id(self): return self.id 6052 def set_id(self, id): self.id = id 6053 def getValueOf_(self): return self.valueOf_ 6054 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 6055 def export(self, outfile, level, namespace_='', name_='docFormulaType', namespacedef_=''): 6056 showIndent(outfile, level) 6057 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6058 self.exportAttributes(outfile, level, namespace_, name_='docFormulaType') 6059 outfile.write('>') 6060 self.exportChildren(outfile, level + 1, namespace_, name_) 6061 outfile.write('</%s%s>\n' % (namespace_, name_)) 6062 def exportAttributes(self, outfile, level, namespace_='', name_='docFormulaType'): 6063 if self.id is not None: 6064 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 6065 def exportChildren(self, outfile, level, namespace_='', name_='docFormulaType'): 6066 if self.valueOf_.find('![CDATA')>-1: 6067 value=quote_xml('%s' % self.valueOf_) 6068 value=value.replace('![CDATA','<![CDATA') 6069 value=value.replace(']]',']]>') 6070 outfile.write(value) 6071 else: 6072 outfile.write(quote_xml('%s' % self.valueOf_)) 6073 def hasContent_(self): 6074 if ( 6075 self.valueOf_ is not None 6076 ): 6077 return True 6078 else: 6079 return False 6080 def exportLiteral(self, outfile, level, name_='docFormulaType'): 6081 level += 1 6082 self.exportLiteralAttributes(outfile, level, name_) 6083 if self.hasContent_(): 6084 self.exportLiteralChildren(outfile, level, name_) 6085 def exportLiteralAttributes(self, outfile, level, name_): 6086 if self.id is not None: 6087 showIndent(outfile, level) 6088 outfile.write('id = %s,\n' % (self.id,)) 6089 def exportLiteralChildren(self, outfile, level, name_): 6090 showIndent(outfile, level) 6091 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 6092 def build(self, node_): 6093 attrs = node_.attributes 6094 self.buildAttributes(attrs) 6095 self.valueOf_ = '' 6096 for child_ in node_.childNodes: 6097 nodeName_ = child_.nodeName.split(':')[-1] 6098 self.buildChildren(child_, nodeName_) 6099 def buildAttributes(self, attrs): 6100 if attrs.get('id'): 6101 self.id = attrs.get('id').value 6102 def buildChildren(self, child_, nodeName_): 6103 if child_.nodeType == Node.TEXT_NODE: 6104 obj_ = self.mixedclass_(MixedContainer.CategoryText, 6105 MixedContainer.TypeNone, '', child_.nodeValue) 6106 self.content_.append(obj_) 6107 if child_.nodeType == Node.TEXT_NODE: 6108 self.valueOf_ += child_.nodeValue 6109 elif child_.nodeType == Node.CDATA_SECTION_NODE: 6110 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 6111# end class docFormulaType 6112 6113 6114class docIndexEntryType(GeneratedsSuper): 6115 subclass = None 6116 superclass = None 6117 def __init__(self, primaryie=None, secondaryie=None): 6118 self.primaryie = primaryie 6119 self.secondaryie = secondaryie 6120 def factory(*args_, **kwargs_): 6121 if docIndexEntryType.subclass: 6122 return docIndexEntryType.subclass(*args_, **kwargs_) 6123 else: 6124 return docIndexEntryType(*args_, **kwargs_) 6125 factory = staticmethod(factory) 6126 def get_primaryie(self): return self.primaryie 6127 def set_primaryie(self, primaryie): self.primaryie = primaryie 6128 def get_secondaryie(self): return self.secondaryie 6129 def set_secondaryie(self, secondaryie): self.secondaryie = secondaryie 6130 def export(self, outfile, level, namespace_='', name_='docIndexEntryType', namespacedef_=''): 6131 showIndent(outfile, level) 6132 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6133 self.exportAttributes(outfile, level, namespace_, name_='docIndexEntryType') 6134 if self.hasContent_(): 6135 outfile.write('>\n') 6136 self.exportChildren(outfile, level + 1, namespace_, name_) 6137 showIndent(outfile, level) 6138 outfile.write('</%s%s>\n' % (namespace_, name_)) 6139 else: 6140 outfile.write(' />\n') 6141 def exportAttributes(self, outfile, level, namespace_='', name_='docIndexEntryType'): 6142 pass 6143 def exportChildren(self, outfile, level, namespace_='', name_='docIndexEntryType'): 6144 if self.primaryie is not None: 6145 showIndent(outfile, level) 6146 outfile.write('<%sprimaryie>%s</%sprimaryie>\n' % (namespace_, self.format_string(quote_xml(self.primaryie).encode(ExternalEncoding), input_name='primaryie'), namespace_)) 6147 if self.secondaryie is not None: 6148 showIndent(outfile, level) 6149 outfile.write('<%ssecondaryie>%s</%ssecondaryie>\n' % (namespace_, self.format_string(quote_xml(self.secondaryie).encode(ExternalEncoding), input_name='secondaryie'), namespace_)) 6150 def hasContent_(self): 6151 if ( 6152 self.primaryie is not None or 6153 self.secondaryie is not None 6154 ): 6155 return True 6156 else: 6157 return False 6158 def exportLiteral(self, outfile, level, name_='docIndexEntryType'): 6159 level += 1 6160 self.exportLiteralAttributes(outfile, level, name_) 6161 if self.hasContent_(): 6162 self.exportLiteralChildren(outfile, level, name_) 6163 def exportLiteralAttributes(self, outfile, level, name_): 6164 pass 6165 def exportLiteralChildren(self, outfile, level, name_): 6166 showIndent(outfile, level) 6167 outfile.write('primaryie=%s,\n' % quote_python(self.primaryie).encode(ExternalEncoding)) 6168 showIndent(outfile, level) 6169 outfile.write('secondaryie=%s,\n' % quote_python(self.secondaryie).encode(ExternalEncoding)) 6170 def build(self, node_): 6171 attrs = node_.attributes 6172 self.buildAttributes(attrs) 6173 for child_ in node_.childNodes: 6174 nodeName_ = child_.nodeName.split(':')[-1] 6175 self.buildChildren(child_, nodeName_) 6176 def buildAttributes(self, attrs): 6177 pass 6178 def buildChildren(self, child_, nodeName_): 6179 if child_.nodeType == Node.ELEMENT_NODE and \ 6180 nodeName_ == 'primaryie': 6181 primaryie_ = '' 6182 for text__content_ in child_.childNodes: 6183 primaryie_ += text__content_.nodeValue 6184 self.primaryie = primaryie_ 6185 elif child_.nodeType == Node.ELEMENT_NODE and \ 6186 nodeName_ == 'secondaryie': 6187 secondaryie_ = '' 6188 for text__content_ in child_.childNodes: 6189 secondaryie_ += text__content_.nodeValue 6190 self.secondaryie = secondaryie_ 6191# end class docIndexEntryType 6192 6193 6194class docListType(GeneratedsSuper): 6195 subclass = None 6196 superclass = None 6197 def __init__(self, listitem=None): 6198 if listitem is None: 6199 self.listitem = [] 6200 else: 6201 self.listitem = listitem 6202 def factory(*args_, **kwargs_): 6203 if docListType.subclass: 6204 return docListType.subclass(*args_, **kwargs_) 6205 else: 6206 return docListType(*args_, **kwargs_) 6207 factory = staticmethod(factory) 6208 def get_listitem(self): return self.listitem 6209 def set_listitem(self, listitem): self.listitem = listitem 6210 def add_listitem(self, value): self.listitem.append(value) 6211 def insert_listitem(self, index, value): self.listitem[index] = value 6212 def export(self, outfile, level, namespace_='', name_='docListType', namespacedef_=''): 6213 showIndent(outfile, level) 6214 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6215 self.exportAttributes(outfile, level, namespace_, name_='docListType') 6216 if self.hasContent_(): 6217 outfile.write('>\n') 6218 self.exportChildren(outfile, level + 1, namespace_, name_) 6219 showIndent(outfile, level) 6220 outfile.write('</%s%s>\n' % (namespace_, name_)) 6221 else: 6222 outfile.write(' />\n') 6223 def exportAttributes(self, outfile, level, namespace_='', name_='docListType'): 6224 pass 6225 def exportChildren(self, outfile, level, namespace_='', name_='docListType'): 6226 for listitem_ in self.listitem: 6227 listitem_.export(outfile, level, namespace_, name_='listitem') 6228 def hasContent_(self): 6229 if ( 6230 self.listitem is not None 6231 ): 6232 return True 6233 else: 6234 return False 6235 def exportLiteral(self, outfile, level, name_='docListType'): 6236 level += 1 6237 self.exportLiteralAttributes(outfile, level, name_) 6238 if self.hasContent_(): 6239 self.exportLiteralChildren(outfile, level, name_) 6240 def exportLiteralAttributes(self, outfile, level, name_): 6241 pass 6242 def exportLiteralChildren(self, outfile, level, name_): 6243 showIndent(outfile, level) 6244 outfile.write('listitem=[\n') 6245 level += 1 6246 for listitem in self.listitem: 6247 showIndent(outfile, level) 6248 outfile.write('model_.listitem(\n') 6249 listitem.exportLiteral(outfile, level, name_='listitem') 6250 showIndent(outfile, level) 6251 outfile.write('),\n') 6252 level -= 1 6253 showIndent(outfile, level) 6254 outfile.write('],\n') 6255 def build(self, node_): 6256 attrs = node_.attributes 6257 self.buildAttributes(attrs) 6258 for child_ in node_.childNodes: 6259 nodeName_ = child_.nodeName.split(':')[-1] 6260 self.buildChildren(child_, nodeName_) 6261 def buildAttributes(self, attrs): 6262 pass 6263 def buildChildren(self, child_, nodeName_): 6264 if child_.nodeType == Node.ELEMENT_NODE and \ 6265 nodeName_ == 'listitem': 6266 obj_ = docListItemType.factory() 6267 obj_.build(child_) 6268 self.listitem.append(obj_) 6269# end class docListType 6270 6271 6272class docListItemType(GeneratedsSuper): 6273 subclass = None 6274 superclass = None 6275 def __init__(self, para=None): 6276 if para is None: 6277 self.para = [] 6278 else: 6279 self.para = para 6280 def factory(*args_, **kwargs_): 6281 if docListItemType.subclass: 6282 return docListItemType.subclass(*args_, **kwargs_) 6283 else: 6284 return docListItemType(*args_, **kwargs_) 6285 factory = staticmethod(factory) 6286 def get_para(self): return self.para 6287 def set_para(self, para): self.para = para 6288 def add_para(self, value): self.para.append(value) 6289 def insert_para(self, index, value): self.para[index] = value 6290 def export(self, outfile, level, namespace_='', name_='docListItemType', namespacedef_=''): 6291 showIndent(outfile, level) 6292 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6293 self.exportAttributes(outfile, level, namespace_, name_='docListItemType') 6294 if self.hasContent_(): 6295 outfile.write('>\n') 6296 self.exportChildren(outfile, level + 1, namespace_, name_) 6297 showIndent(outfile, level) 6298 outfile.write('</%s%s>\n' % (namespace_, name_)) 6299 else: 6300 outfile.write(' />\n') 6301 def exportAttributes(self, outfile, level, namespace_='', name_='docListItemType'): 6302 pass 6303 def exportChildren(self, outfile, level, namespace_='', name_='docListItemType'): 6304 for para_ in self.para: 6305 para_.export(outfile, level, namespace_, name_='para') 6306 def hasContent_(self): 6307 if ( 6308 self.para is not None 6309 ): 6310 return True 6311 else: 6312 return False 6313 def exportLiteral(self, outfile, level, name_='docListItemType'): 6314 level += 1 6315 self.exportLiteralAttributes(outfile, level, name_) 6316 if self.hasContent_(): 6317 self.exportLiteralChildren(outfile, level, name_) 6318 def exportLiteralAttributes(self, outfile, level, name_): 6319 pass 6320 def exportLiteralChildren(self, outfile, level, name_): 6321 showIndent(outfile, level) 6322 outfile.write('para=[\n') 6323 level += 1 6324 for para in self.para: 6325 showIndent(outfile, level) 6326 outfile.write('model_.para(\n') 6327 para.exportLiteral(outfile, level, name_='para') 6328 showIndent(outfile, level) 6329 outfile.write('),\n') 6330 level -= 1 6331 showIndent(outfile, level) 6332 outfile.write('],\n') 6333 def build(self, node_): 6334 attrs = node_.attributes 6335 self.buildAttributes(attrs) 6336 for child_ in node_.childNodes: 6337 nodeName_ = child_.nodeName.split(':')[-1] 6338 self.buildChildren(child_, nodeName_) 6339 def buildAttributes(self, attrs): 6340 pass 6341 def buildChildren(self, child_, nodeName_): 6342 if child_.nodeType == Node.ELEMENT_NODE and \ 6343 nodeName_ == 'para': 6344 obj_ = docParaType.factory() 6345 obj_.build(child_) 6346 self.para.append(obj_) 6347# end class docListItemType 6348 6349 6350class docSimpleSectType(GeneratedsSuper): 6351 subclass = None 6352 superclass = None 6353 def __init__(self, kind=None, title=None, para=None): 6354 self.kind = kind 6355 self.title = title 6356 if para is None: 6357 self.para = [] 6358 else: 6359 self.para = para 6360 def factory(*args_, **kwargs_): 6361 if docSimpleSectType.subclass: 6362 return docSimpleSectType.subclass(*args_, **kwargs_) 6363 else: 6364 return docSimpleSectType(*args_, **kwargs_) 6365 factory = staticmethod(factory) 6366 def get_title(self): return self.title 6367 def set_title(self, title): self.title = title 6368 def get_para(self): return self.para 6369 def set_para(self, para): self.para = para 6370 def add_para(self, value): self.para.append(value) 6371 def insert_para(self, index, value): self.para[index] = value 6372 def get_kind(self): return self.kind 6373 def set_kind(self, kind): self.kind = kind 6374 def export(self, outfile, level, namespace_='', name_='docSimpleSectType', namespacedef_=''): 6375 showIndent(outfile, level) 6376 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6377 self.exportAttributes(outfile, level, namespace_, name_='docSimpleSectType') 6378 if self.hasContent_(): 6379 outfile.write('>\n') 6380 self.exportChildren(outfile, level + 1, namespace_, name_) 6381 showIndent(outfile, level) 6382 outfile.write('</%s%s>\n' % (namespace_, name_)) 6383 else: 6384 outfile.write(' />\n') 6385 def exportAttributes(self, outfile, level, namespace_='', name_='docSimpleSectType'): 6386 if self.kind is not None: 6387 outfile.write(' kind=%s' % (quote_attrib(self.kind), )) 6388 def exportChildren(self, outfile, level, namespace_='', name_='docSimpleSectType'): 6389 if self.title: 6390 self.title.export(outfile, level, namespace_, name_='title') 6391 for para_ in self.para: 6392 para_.export(outfile, level, namespace_, name_='para') 6393 def hasContent_(self): 6394 if ( 6395 self.title is not None or 6396 self.para is not None 6397 ): 6398 return True 6399 else: 6400 return False 6401 def exportLiteral(self, outfile, level, name_='docSimpleSectType'): 6402 level += 1 6403 self.exportLiteralAttributes(outfile, level, name_) 6404 if self.hasContent_(): 6405 self.exportLiteralChildren(outfile, level, name_) 6406 def exportLiteralAttributes(self, outfile, level, name_): 6407 if self.kind is not None: 6408 showIndent(outfile, level) 6409 outfile.write('kind = "%s",\n' % (self.kind,)) 6410 def exportLiteralChildren(self, outfile, level, name_): 6411 if self.title: 6412 showIndent(outfile, level) 6413 outfile.write('title=model_.docTitleType(\n') 6414 self.title.exportLiteral(outfile, level, name_='title') 6415 showIndent(outfile, level) 6416 outfile.write('),\n') 6417 showIndent(outfile, level) 6418 outfile.write('para=[\n') 6419 level += 1 6420 for para in self.para: 6421 showIndent(outfile, level) 6422 outfile.write('model_.para(\n') 6423 para.exportLiteral(outfile, level, name_='para') 6424 showIndent(outfile, level) 6425 outfile.write('),\n') 6426 level -= 1 6427 showIndent(outfile, level) 6428 outfile.write('],\n') 6429 def build(self, node_): 6430 attrs = node_.attributes 6431 self.buildAttributes(attrs) 6432 for child_ in node_.childNodes: 6433 nodeName_ = child_.nodeName.split(':')[-1] 6434 self.buildChildren(child_, nodeName_) 6435 def buildAttributes(self, attrs): 6436 if attrs.get('kind'): 6437 self.kind = attrs.get('kind').value 6438 def buildChildren(self, child_, nodeName_): 6439 if child_.nodeType == Node.ELEMENT_NODE and \ 6440 nodeName_ == 'title': 6441 obj_ = docTitleType.factory() 6442 obj_.build(child_) 6443 self.set_title(obj_) 6444 elif child_.nodeType == Node.ELEMENT_NODE and \ 6445 nodeName_ == 'para': 6446 obj_ = docParaType.factory() 6447 obj_.build(child_) 6448 self.para.append(obj_) 6449# end class docSimpleSectType 6450 6451 6452class docVarListEntryType(GeneratedsSuper): 6453 subclass = None 6454 superclass = None 6455 def __init__(self, term=None): 6456 self.term = term 6457 def factory(*args_, **kwargs_): 6458 if docVarListEntryType.subclass: 6459 return docVarListEntryType.subclass(*args_, **kwargs_) 6460 else: 6461 return docVarListEntryType(*args_, **kwargs_) 6462 factory = staticmethod(factory) 6463 def get_term(self): return self.term 6464 def set_term(self, term): self.term = term 6465 def export(self, outfile, level, namespace_='', name_='docVarListEntryType', namespacedef_=''): 6466 showIndent(outfile, level) 6467 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6468 self.exportAttributes(outfile, level, namespace_, name_='docVarListEntryType') 6469 if self.hasContent_(): 6470 outfile.write('>\n') 6471 self.exportChildren(outfile, level + 1, namespace_, name_) 6472 showIndent(outfile, level) 6473 outfile.write('</%s%s>\n' % (namespace_, name_)) 6474 else: 6475 outfile.write(' />\n') 6476 def exportAttributes(self, outfile, level, namespace_='', name_='docVarListEntryType'): 6477 pass 6478 def exportChildren(self, outfile, level, namespace_='', name_='docVarListEntryType'): 6479 if self.term: 6480 self.term.export(outfile, level, namespace_, name_='term', ) 6481 def hasContent_(self): 6482 if ( 6483 self.term is not None 6484 ): 6485 return True 6486 else: 6487 return False 6488 def exportLiteral(self, outfile, level, name_='docVarListEntryType'): 6489 level += 1 6490 self.exportLiteralAttributes(outfile, level, name_) 6491 if self.hasContent_(): 6492 self.exportLiteralChildren(outfile, level, name_) 6493 def exportLiteralAttributes(self, outfile, level, name_): 6494 pass 6495 def exportLiteralChildren(self, outfile, level, name_): 6496 if self.term: 6497 showIndent(outfile, level) 6498 outfile.write('term=model_.docTitleType(\n') 6499 self.term.exportLiteral(outfile, level, name_='term') 6500 showIndent(outfile, level) 6501 outfile.write('),\n') 6502 def build(self, node_): 6503 attrs = node_.attributes 6504 self.buildAttributes(attrs) 6505 for child_ in node_.childNodes: 6506 nodeName_ = child_.nodeName.split(':')[-1] 6507 self.buildChildren(child_, nodeName_) 6508 def buildAttributes(self, attrs): 6509 pass 6510 def buildChildren(self, child_, nodeName_): 6511 if child_.nodeType == Node.ELEMENT_NODE and \ 6512 nodeName_ == 'term': 6513 obj_ = docTitleType.factory() 6514 obj_.build(child_) 6515 self.set_term(obj_) 6516# end class docVarListEntryType 6517 6518 6519class docVariableListType(GeneratedsSuper): 6520 subclass = None 6521 superclass = None 6522 def __init__(self, valueOf_=''): 6523 self.valueOf_ = valueOf_ 6524 def factory(*args_, **kwargs_): 6525 if docVariableListType.subclass: 6526 return docVariableListType.subclass(*args_, **kwargs_) 6527 else: 6528 return docVariableListType(*args_, **kwargs_) 6529 factory = staticmethod(factory) 6530 def getValueOf_(self): return self.valueOf_ 6531 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 6532 def export(self, outfile, level, namespace_='', name_='docVariableListType', namespacedef_=''): 6533 showIndent(outfile, level) 6534 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6535 self.exportAttributes(outfile, level, namespace_, name_='docVariableListType') 6536 if self.hasContent_(): 6537 outfile.write('>\n') 6538 self.exportChildren(outfile, level + 1, namespace_, name_) 6539 showIndent(outfile, level) 6540 outfile.write('</%s%s>\n' % (namespace_, name_)) 6541 else: 6542 outfile.write(' />\n') 6543 def exportAttributes(self, outfile, level, namespace_='', name_='docVariableListType'): 6544 pass 6545 def exportChildren(self, outfile, level, namespace_='', name_='docVariableListType'): 6546 if self.valueOf_.find('![CDATA')>-1: 6547 value=quote_xml('%s' % self.valueOf_) 6548 value=value.replace('![CDATA','<![CDATA') 6549 value=value.replace(']]',']]>') 6550 outfile.write(value) 6551 else: 6552 outfile.write(quote_xml('%s' % self.valueOf_)) 6553 def hasContent_(self): 6554 if ( 6555 self.valueOf_ is not None 6556 ): 6557 return True 6558 else: 6559 return False 6560 def exportLiteral(self, outfile, level, name_='docVariableListType'): 6561 level += 1 6562 self.exportLiteralAttributes(outfile, level, name_) 6563 if self.hasContent_(): 6564 self.exportLiteralChildren(outfile, level, name_) 6565 def exportLiteralAttributes(self, outfile, level, name_): 6566 pass 6567 def exportLiteralChildren(self, outfile, level, name_): 6568 showIndent(outfile, level) 6569 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 6570 def build(self, node_): 6571 attrs = node_.attributes 6572 self.buildAttributes(attrs) 6573 self.valueOf_ = '' 6574 for child_ in node_.childNodes: 6575 nodeName_ = child_.nodeName.split(':')[-1] 6576 self.buildChildren(child_, nodeName_) 6577 def buildAttributes(self, attrs): 6578 pass 6579 def buildChildren(self, child_, nodeName_): 6580 if child_.nodeType == Node.TEXT_NODE: 6581 self.valueOf_ += child_.nodeValue 6582 elif child_.nodeType == Node.CDATA_SECTION_NODE: 6583 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 6584# end class docVariableListType 6585 6586 6587class docRefTextType(GeneratedsSuper): 6588 subclass = None 6589 superclass = None 6590 def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None): 6591 self.refid = refid 6592 self.kindref = kindref 6593 self.external = external 6594 if mixedclass_ is None: 6595 self.mixedclass_ = MixedContainer 6596 else: 6597 self.mixedclass_ = mixedclass_ 6598 if content_ is None: 6599 self.content_ = [] 6600 else: 6601 self.content_ = content_ 6602 def factory(*args_, **kwargs_): 6603 if docRefTextType.subclass: 6604 return docRefTextType.subclass(*args_, **kwargs_) 6605 else: 6606 return docRefTextType(*args_, **kwargs_) 6607 factory = staticmethod(factory) 6608 def get_refid(self): return self.refid 6609 def set_refid(self, refid): self.refid = refid 6610 def get_kindref(self): return self.kindref 6611 def set_kindref(self, kindref): self.kindref = kindref 6612 def get_external(self): return self.external 6613 def set_external(self, external): self.external = external 6614 def getValueOf_(self): return self.valueOf_ 6615 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 6616 def export(self, outfile, level, namespace_='', name_='docRefTextType', namespacedef_=''): 6617 showIndent(outfile, level) 6618 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6619 self.exportAttributes(outfile, level, namespace_, name_='docRefTextType') 6620 outfile.write('>') 6621 self.exportChildren(outfile, level + 1, namespace_, name_) 6622 outfile.write('</%s%s>\n' % (namespace_, name_)) 6623 def exportAttributes(self, outfile, level, namespace_='', name_='docRefTextType'): 6624 if self.refid is not None: 6625 outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) 6626 if self.kindref is not None: 6627 outfile.write(' kindref=%s' % (quote_attrib(self.kindref), )) 6628 if self.external is not None: 6629 outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), )) 6630 def exportChildren(self, outfile, level, namespace_='', name_='docRefTextType'): 6631 if self.valueOf_.find('![CDATA')>-1: 6632 value=quote_xml('%s' % self.valueOf_) 6633 value=value.replace('![CDATA','<![CDATA') 6634 value=value.replace(']]',']]>') 6635 outfile.write(value) 6636 else: 6637 outfile.write(quote_xml('%s' % self.valueOf_)) 6638 def hasContent_(self): 6639 if ( 6640 self.valueOf_ is not None 6641 ): 6642 return True 6643 else: 6644 return False 6645 def exportLiteral(self, outfile, level, name_='docRefTextType'): 6646 level += 1 6647 self.exportLiteralAttributes(outfile, level, name_) 6648 if self.hasContent_(): 6649 self.exportLiteralChildren(outfile, level, name_) 6650 def exportLiteralAttributes(self, outfile, level, name_): 6651 if self.refid is not None: 6652 showIndent(outfile, level) 6653 outfile.write('refid = %s,\n' % (self.refid,)) 6654 if self.kindref is not None: 6655 showIndent(outfile, level) 6656 outfile.write('kindref = "%s",\n' % (self.kindref,)) 6657 if self.external is not None: 6658 showIndent(outfile, level) 6659 outfile.write('external = %s,\n' % (self.external,)) 6660 def exportLiteralChildren(self, outfile, level, name_): 6661 showIndent(outfile, level) 6662 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 6663 def build(self, node_): 6664 attrs = node_.attributes 6665 self.buildAttributes(attrs) 6666 self.valueOf_ = '' 6667 for child_ in node_.childNodes: 6668 nodeName_ = child_.nodeName.split(':')[-1] 6669 self.buildChildren(child_, nodeName_) 6670 def buildAttributes(self, attrs): 6671 if attrs.get('refid'): 6672 self.refid = attrs.get('refid').value 6673 if attrs.get('kindref'): 6674 self.kindref = attrs.get('kindref').value 6675 if attrs.get('external'): 6676 self.external = attrs.get('external').value 6677 def buildChildren(self, child_, nodeName_): 6678 if child_.nodeType == Node.TEXT_NODE: 6679 obj_ = self.mixedclass_(MixedContainer.CategoryText, 6680 MixedContainer.TypeNone, '', child_.nodeValue) 6681 self.content_.append(obj_) 6682 if child_.nodeType == Node.TEXT_NODE: 6683 self.valueOf_ += child_.nodeValue 6684 elif child_.nodeType == Node.CDATA_SECTION_NODE: 6685 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 6686# end class docRefTextType 6687 6688 6689class docTableType(GeneratedsSuper): 6690 subclass = None 6691 superclass = None 6692 def __init__(self, rows=None, cols=None, row=None, caption=None): 6693 self.rows = rows 6694 self.cols = cols 6695 if row is None: 6696 self.row = [] 6697 else: 6698 self.row = row 6699 self.caption = caption 6700 def factory(*args_, **kwargs_): 6701 if docTableType.subclass: 6702 return docTableType.subclass(*args_, **kwargs_) 6703 else: 6704 return docTableType(*args_, **kwargs_) 6705 factory = staticmethod(factory) 6706 def get_row(self): return self.row 6707 def set_row(self, row): self.row = row 6708 def add_row(self, value): self.row.append(value) 6709 def insert_row(self, index, value): self.row[index] = value 6710 def get_caption(self): return self.caption 6711 def set_caption(self, caption): self.caption = caption 6712 def get_rows(self): return self.rows 6713 def set_rows(self, rows): self.rows = rows 6714 def get_cols(self): return self.cols 6715 def set_cols(self, cols): self.cols = cols 6716 def export(self, outfile, level, namespace_='', name_='docTableType', namespacedef_=''): 6717 showIndent(outfile, level) 6718 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6719 self.exportAttributes(outfile, level, namespace_, name_='docTableType') 6720 if self.hasContent_(): 6721 outfile.write('>\n') 6722 self.exportChildren(outfile, level + 1, namespace_, name_) 6723 showIndent(outfile, level) 6724 outfile.write('</%s%s>\n' % (namespace_, name_)) 6725 else: 6726 outfile.write(' />\n') 6727 def exportAttributes(self, outfile, level, namespace_='', name_='docTableType'): 6728 if self.rows is not None: 6729 outfile.write(' rows="%s"' % self.format_integer(self.rows, input_name='rows')) 6730 if self.cols is not None: 6731 outfile.write(' cols="%s"' % self.format_integer(self.cols, input_name='cols')) 6732 def exportChildren(self, outfile, level, namespace_='', name_='docTableType'): 6733 for row_ in self.row: 6734 row_.export(outfile, level, namespace_, name_='row') 6735 if self.caption: 6736 self.caption.export(outfile, level, namespace_, name_='caption') 6737 def hasContent_(self): 6738 if ( 6739 self.row is not None or 6740 self.caption is not None 6741 ): 6742 return True 6743 else: 6744 return False 6745 def exportLiteral(self, outfile, level, name_='docTableType'): 6746 level += 1 6747 self.exportLiteralAttributes(outfile, level, name_) 6748 if self.hasContent_(): 6749 self.exportLiteralChildren(outfile, level, name_) 6750 def exportLiteralAttributes(self, outfile, level, name_): 6751 if self.rows is not None: 6752 showIndent(outfile, level) 6753 outfile.write('rows = %s,\n' % (self.rows,)) 6754 if self.cols is not None: 6755 showIndent(outfile, level) 6756 outfile.write('cols = %s,\n' % (self.cols,)) 6757 def exportLiteralChildren(self, outfile, level, name_): 6758 showIndent(outfile, level) 6759 outfile.write('row=[\n') 6760 level += 1 6761 for row in self.row: 6762 showIndent(outfile, level) 6763 outfile.write('model_.row(\n') 6764 row.exportLiteral(outfile, level, name_='row') 6765 showIndent(outfile, level) 6766 outfile.write('),\n') 6767 level -= 1 6768 showIndent(outfile, level) 6769 outfile.write('],\n') 6770 if self.caption: 6771 showIndent(outfile, level) 6772 outfile.write('caption=model_.docCaptionType(\n') 6773 self.caption.exportLiteral(outfile, level, name_='caption') 6774 showIndent(outfile, level) 6775 outfile.write('),\n') 6776 def build(self, node_): 6777 attrs = node_.attributes 6778 self.buildAttributes(attrs) 6779 for child_ in node_.childNodes: 6780 nodeName_ = child_.nodeName.split(':')[-1] 6781 self.buildChildren(child_, nodeName_) 6782 def buildAttributes(self, attrs): 6783 if attrs.get('rows'): 6784 try: 6785 self.rows = int(attrs.get('rows').value) 6786 except ValueError as exp: 6787 raise ValueError('Bad integer attribute (rows): %s' % exp) 6788 if attrs.get('cols'): 6789 try: 6790 self.cols = int(attrs.get('cols').value) 6791 except ValueError as exp: 6792 raise ValueError('Bad integer attribute (cols): %s' % exp) 6793 def buildChildren(self, child_, nodeName_): 6794 if child_.nodeType == Node.ELEMENT_NODE and \ 6795 nodeName_ == 'row': 6796 obj_ = docRowType.factory() 6797 obj_.build(child_) 6798 self.row.append(obj_) 6799 elif child_.nodeType == Node.ELEMENT_NODE and \ 6800 nodeName_ == 'caption': 6801 obj_ = docCaptionType.factory() 6802 obj_.build(child_) 6803 self.set_caption(obj_) 6804# end class docTableType 6805 6806 6807class docRowType(GeneratedsSuper): 6808 subclass = None 6809 superclass = None 6810 def __init__(self, entry=None): 6811 if entry is None: 6812 self.entry = [] 6813 else: 6814 self.entry = entry 6815 def factory(*args_, **kwargs_): 6816 if docRowType.subclass: 6817 return docRowType.subclass(*args_, **kwargs_) 6818 else: 6819 return docRowType(*args_, **kwargs_) 6820 factory = staticmethod(factory) 6821 def get_entry(self): return self.entry 6822 def set_entry(self, entry): self.entry = entry 6823 def add_entry(self, value): self.entry.append(value) 6824 def insert_entry(self, index, value): self.entry[index] = value 6825 def export(self, outfile, level, namespace_='', name_='docRowType', namespacedef_=''): 6826 showIndent(outfile, level) 6827 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6828 self.exportAttributes(outfile, level, namespace_, name_='docRowType') 6829 if self.hasContent_(): 6830 outfile.write('>\n') 6831 self.exportChildren(outfile, level + 1, namespace_, name_) 6832 showIndent(outfile, level) 6833 outfile.write('</%s%s>\n' % (namespace_, name_)) 6834 else: 6835 outfile.write(' />\n') 6836 def exportAttributes(self, outfile, level, namespace_='', name_='docRowType'): 6837 pass 6838 def exportChildren(self, outfile, level, namespace_='', name_='docRowType'): 6839 for entry_ in self.entry: 6840 entry_.export(outfile, level, namespace_, name_='entry') 6841 def hasContent_(self): 6842 if ( 6843 self.entry is not None 6844 ): 6845 return True 6846 else: 6847 return False 6848 def exportLiteral(self, outfile, level, name_='docRowType'): 6849 level += 1 6850 self.exportLiteralAttributes(outfile, level, name_) 6851 if self.hasContent_(): 6852 self.exportLiteralChildren(outfile, level, name_) 6853 def exportLiteralAttributes(self, outfile, level, name_): 6854 pass 6855 def exportLiteralChildren(self, outfile, level, name_): 6856 showIndent(outfile, level) 6857 outfile.write('entry=[\n') 6858 level += 1 6859 for entry in self.entry: 6860 showIndent(outfile, level) 6861 outfile.write('model_.entry(\n') 6862 entry.exportLiteral(outfile, level, name_='entry') 6863 showIndent(outfile, level) 6864 outfile.write('),\n') 6865 level -= 1 6866 showIndent(outfile, level) 6867 outfile.write('],\n') 6868 def build(self, node_): 6869 attrs = node_.attributes 6870 self.buildAttributes(attrs) 6871 for child_ in node_.childNodes: 6872 nodeName_ = child_.nodeName.split(':')[-1] 6873 self.buildChildren(child_, nodeName_) 6874 def buildAttributes(self, attrs): 6875 pass 6876 def buildChildren(self, child_, nodeName_): 6877 if child_.nodeType == Node.ELEMENT_NODE and \ 6878 nodeName_ == 'entry': 6879 obj_ = docEntryType.factory() 6880 obj_.build(child_) 6881 self.entry.append(obj_) 6882# end class docRowType 6883 6884 6885class docEntryType(GeneratedsSuper): 6886 subclass = None 6887 superclass = None 6888 def __init__(self, thead=None, para=None): 6889 self.thead = thead 6890 if para is None: 6891 self.para = [] 6892 else: 6893 self.para = para 6894 def factory(*args_, **kwargs_): 6895 if docEntryType.subclass: 6896 return docEntryType.subclass(*args_, **kwargs_) 6897 else: 6898 return docEntryType(*args_, **kwargs_) 6899 factory = staticmethod(factory) 6900 def get_para(self): return self.para 6901 def set_para(self, para): self.para = para 6902 def add_para(self, value): self.para.append(value) 6903 def insert_para(self, index, value): self.para[index] = value 6904 def get_thead(self): return self.thead 6905 def set_thead(self, thead): self.thead = thead 6906 def export(self, outfile, level, namespace_='', name_='docEntryType', namespacedef_=''): 6907 showIndent(outfile, level) 6908 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6909 self.exportAttributes(outfile, level, namespace_, name_='docEntryType') 6910 if self.hasContent_(): 6911 outfile.write('>\n') 6912 self.exportChildren(outfile, level + 1, namespace_, name_) 6913 showIndent(outfile, level) 6914 outfile.write('</%s%s>\n' % (namespace_, name_)) 6915 else: 6916 outfile.write(' />\n') 6917 def exportAttributes(self, outfile, level, namespace_='', name_='docEntryType'): 6918 if self.thead is not None: 6919 outfile.write(' thead=%s' % (quote_attrib(self.thead), )) 6920 def exportChildren(self, outfile, level, namespace_='', name_='docEntryType'): 6921 for para_ in self.para: 6922 para_.export(outfile, level, namespace_, name_='para') 6923 def hasContent_(self): 6924 if ( 6925 self.para is not None 6926 ): 6927 return True 6928 else: 6929 return False 6930 def exportLiteral(self, outfile, level, name_='docEntryType'): 6931 level += 1 6932 self.exportLiteralAttributes(outfile, level, name_) 6933 if self.hasContent_(): 6934 self.exportLiteralChildren(outfile, level, name_) 6935 def exportLiteralAttributes(self, outfile, level, name_): 6936 if self.thead is not None: 6937 showIndent(outfile, level) 6938 outfile.write('thead = "%s",\n' % (self.thead,)) 6939 def exportLiteralChildren(self, outfile, level, name_): 6940 showIndent(outfile, level) 6941 outfile.write('para=[\n') 6942 level += 1 6943 for para in self.para: 6944 showIndent(outfile, level) 6945 outfile.write('model_.para(\n') 6946 para.exportLiteral(outfile, level, name_='para') 6947 showIndent(outfile, level) 6948 outfile.write('),\n') 6949 level -= 1 6950 showIndent(outfile, level) 6951 outfile.write('],\n') 6952 def build(self, node_): 6953 attrs = node_.attributes 6954 self.buildAttributes(attrs) 6955 for child_ in node_.childNodes: 6956 nodeName_ = child_.nodeName.split(':')[-1] 6957 self.buildChildren(child_, nodeName_) 6958 def buildAttributes(self, attrs): 6959 if attrs.get('thead'): 6960 self.thead = attrs.get('thead').value 6961 def buildChildren(self, child_, nodeName_): 6962 if child_.nodeType == Node.ELEMENT_NODE and \ 6963 nodeName_ == 'para': 6964 obj_ = docParaType.factory() 6965 obj_.build(child_) 6966 self.para.append(obj_) 6967# end class docEntryType 6968 6969 6970class docCaptionType(GeneratedsSuper): 6971 subclass = None 6972 superclass = None 6973 def __init__(self, valueOf_='', mixedclass_=None, content_=None): 6974 if mixedclass_ is None: 6975 self.mixedclass_ = MixedContainer 6976 else: 6977 self.mixedclass_ = mixedclass_ 6978 if content_ is None: 6979 self.content_ = [] 6980 else: 6981 self.content_ = content_ 6982 def factory(*args_, **kwargs_): 6983 if docCaptionType.subclass: 6984 return docCaptionType.subclass(*args_, **kwargs_) 6985 else: 6986 return docCaptionType(*args_, **kwargs_) 6987 factory = staticmethod(factory) 6988 def getValueOf_(self): return self.valueOf_ 6989 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 6990 def export(self, outfile, level, namespace_='', name_='docCaptionType', namespacedef_=''): 6991 showIndent(outfile, level) 6992 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 6993 self.exportAttributes(outfile, level, namespace_, name_='docCaptionType') 6994 outfile.write('>') 6995 self.exportChildren(outfile, level + 1, namespace_, name_) 6996 outfile.write('</%s%s>\n' % (namespace_, name_)) 6997 def exportAttributes(self, outfile, level, namespace_='', name_='docCaptionType'): 6998 pass 6999 def exportChildren(self, outfile, level, namespace_='', name_='docCaptionType'): 7000 if self.valueOf_.find('![CDATA')>-1: 7001 value=quote_xml('%s' % self.valueOf_) 7002 value=value.replace('![CDATA','<![CDATA') 7003 value=value.replace(']]',']]>') 7004 outfile.write(value) 7005 else: 7006 outfile.write(quote_xml('%s' % self.valueOf_)) 7007 def hasContent_(self): 7008 if ( 7009 self.valueOf_ is not None 7010 ): 7011 return True 7012 else: 7013 return False 7014 def exportLiteral(self, outfile, level, name_='docCaptionType'): 7015 level += 1 7016 self.exportLiteralAttributes(outfile, level, name_) 7017 if self.hasContent_(): 7018 self.exportLiteralChildren(outfile, level, name_) 7019 def exportLiteralAttributes(self, outfile, level, name_): 7020 pass 7021 def exportLiteralChildren(self, outfile, level, name_): 7022 showIndent(outfile, level) 7023 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 7024 def build(self, node_): 7025 attrs = node_.attributes 7026 self.buildAttributes(attrs) 7027 self.valueOf_ = '' 7028 for child_ in node_.childNodes: 7029 nodeName_ = child_.nodeName.split(':')[-1] 7030 self.buildChildren(child_, nodeName_) 7031 def buildAttributes(self, attrs): 7032 pass 7033 def buildChildren(self, child_, nodeName_): 7034 if child_.nodeType == Node.TEXT_NODE: 7035 obj_ = self.mixedclass_(MixedContainer.CategoryText, 7036 MixedContainer.TypeNone, '', child_.nodeValue) 7037 self.content_.append(obj_) 7038 if child_.nodeType == Node.TEXT_NODE: 7039 self.valueOf_ += child_.nodeValue 7040 elif child_.nodeType == Node.CDATA_SECTION_NODE: 7041 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 7042# end class docCaptionType 7043 7044 7045class docHeadingType(GeneratedsSuper): 7046 subclass = None 7047 superclass = None 7048 def __init__(self, level=None, valueOf_='', mixedclass_=None, content_=None): 7049 self.level = level 7050 if mixedclass_ is None: 7051 self.mixedclass_ = MixedContainer 7052 else: 7053 self.mixedclass_ = mixedclass_ 7054 if content_ is None: 7055 self.content_ = [] 7056 else: 7057 self.content_ = content_ 7058 def factory(*args_, **kwargs_): 7059 if docHeadingType.subclass: 7060 return docHeadingType.subclass(*args_, **kwargs_) 7061 else: 7062 return docHeadingType(*args_, **kwargs_) 7063 factory = staticmethod(factory) 7064 def get_level(self): return self.level 7065 def set_level(self, level): self.level = level 7066 def getValueOf_(self): return self.valueOf_ 7067 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 7068 def export(self, outfile, level, namespace_='', name_='docHeadingType', namespacedef_=''): 7069 showIndent(outfile, level) 7070 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7071 self.exportAttributes(outfile, level, namespace_, name_='docHeadingType') 7072 outfile.write('>') 7073 self.exportChildren(outfile, level + 1, namespace_, name_) 7074 outfile.write('</%s%s>\n' % (namespace_, name_)) 7075 def exportAttributes(self, outfile, level, namespace_='', name_='docHeadingType'): 7076 if self.level is not None: 7077 outfile.write(' level="%s"' % self.format_integer(self.level, input_name='level')) 7078 def exportChildren(self, outfile, level, namespace_='', name_='docHeadingType'): 7079 if self.valueOf_.find('![CDATA')>-1: 7080 value=quote_xml('%s' % self.valueOf_) 7081 value=value.replace('![CDATA','<![CDATA') 7082 value=value.replace(']]',']]>') 7083 outfile.write(value) 7084 else: 7085 outfile.write(quote_xml('%s' % self.valueOf_)) 7086 def hasContent_(self): 7087 if ( 7088 self.valueOf_ is not None 7089 ): 7090 return True 7091 else: 7092 return False 7093 def exportLiteral(self, outfile, level, name_='docHeadingType'): 7094 level += 1 7095 self.exportLiteralAttributes(outfile, level, name_) 7096 if self.hasContent_(): 7097 self.exportLiteralChildren(outfile, level, name_) 7098 def exportLiteralAttributes(self, outfile, level, name_): 7099 if self.level is not None: 7100 showIndent(outfile, level) 7101 outfile.write('level = %s,\n' % (self.level,)) 7102 def exportLiteralChildren(self, outfile, level, name_): 7103 showIndent(outfile, level) 7104 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 7105 def build(self, node_): 7106 attrs = node_.attributes 7107 self.buildAttributes(attrs) 7108 self.valueOf_ = '' 7109 for child_ in node_.childNodes: 7110 nodeName_ = child_.nodeName.split(':')[-1] 7111 self.buildChildren(child_, nodeName_) 7112 def buildAttributes(self, attrs): 7113 if attrs.get('level'): 7114 try: 7115 self.level = int(attrs.get('level').value) 7116 except ValueError as exp: 7117 raise ValueError('Bad integer attribute (level): %s' % exp) 7118 def buildChildren(self, child_, nodeName_): 7119 if child_.nodeType == Node.TEXT_NODE: 7120 obj_ = self.mixedclass_(MixedContainer.CategoryText, 7121 MixedContainer.TypeNone, '', child_.nodeValue) 7122 self.content_.append(obj_) 7123 if child_.nodeType == Node.TEXT_NODE: 7124 self.valueOf_ += child_.nodeValue 7125 elif child_.nodeType == Node.CDATA_SECTION_NODE: 7126 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 7127# end class docHeadingType 7128 7129 7130class docImageType(GeneratedsSuper): 7131 subclass = None 7132 superclass = None 7133 def __init__(self, width=None, type_=None, name=None, height=None, valueOf_='', mixedclass_=None, content_=None): 7134 self.width = width 7135 self.type_ = type_ 7136 self.name = name 7137 self.height = height 7138 if mixedclass_ is None: 7139 self.mixedclass_ = MixedContainer 7140 else: 7141 self.mixedclass_ = mixedclass_ 7142 if content_ is None: 7143 self.content_ = [] 7144 else: 7145 self.content_ = content_ 7146 def factory(*args_, **kwargs_): 7147 if docImageType.subclass: 7148 return docImageType.subclass(*args_, **kwargs_) 7149 else: 7150 return docImageType(*args_, **kwargs_) 7151 factory = staticmethod(factory) 7152 def get_width(self): return self.width 7153 def set_width(self, width): self.width = width 7154 def get_type(self): return self.type_ 7155 def set_type(self, type_): self.type_ = type_ 7156 def get_name(self): return self.name 7157 def set_name(self, name): self.name = name 7158 def get_height(self): return self.height 7159 def set_height(self, height): self.height = height 7160 def getValueOf_(self): return self.valueOf_ 7161 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 7162 def export(self, outfile, level, namespace_='', name_='docImageType', namespacedef_=''): 7163 showIndent(outfile, level) 7164 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7165 self.exportAttributes(outfile, level, namespace_, name_='docImageType') 7166 outfile.write('>') 7167 self.exportChildren(outfile, level + 1, namespace_, name_) 7168 outfile.write('</%s%s>\n' % (namespace_, name_)) 7169 def exportAttributes(self, outfile, level, namespace_='', name_='docImageType'): 7170 if self.width is not None: 7171 outfile.write(' width=%s' % (self.format_string(quote_attrib(self.width).encode(ExternalEncoding), input_name='width'), )) 7172 if self.type_ is not None: 7173 outfile.write(' type=%s' % (quote_attrib(self.type_), )) 7174 if self.name is not None: 7175 outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), )) 7176 if self.height is not None: 7177 outfile.write(' height=%s' % (self.format_string(quote_attrib(self.height).encode(ExternalEncoding), input_name='height'), )) 7178 def exportChildren(self, outfile, level, namespace_='', name_='docImageType'): 7179 if self.valueOf_.find('![CDATA')>-1: 7180 value=quote_xml('%s' % self.valueOf_) 7181 value=value.replace('![CDATA','<![CDATA') 7182 value=value.replace(']]',']]>') 7183 outfile.write(value) 7184 else: 7185 outfile.write(quote_xml('%s' % self.valueOf_)) 7186 def hasContent_(self): 7187 if ( 7188 self.valueOf_ is not None 7189 ): 7190 return True 7191 else: 7192 return False 7193 def exportLiteral(self, outfile, level, name_='docImageType'): 7194 level += 1 7195 self.exportLiteralAttributes(outfile, level, name_) 7196 if self.hasContent_(): 7197 self.exportLiteralChildren(outfile, level, name_) 7198 def exportLiteralAttributes(self, outfile, level, name_): 7199 if self.width is not None: 7200 showIndent(outfile, level) 7201 outfile.write('width = %s,\n' % (self.width,)) 7202 if self.type_ is not None: 7203 showIndent(outfile, level) 7204 outfile.write('type_ = "%s",\n' % (self.type_,)) 7205 if self.name is not None: 7206 showIndent(outfile, level) 7207 outfile.write('name = %s,\n' % (self.name,)) 7208 if self.height is not None: 7209 showIndent(outfile, level) 7210 outfile.write('height = %s,\n' % (self.height,)) 7211 def exportLiteralChildren(self, outfile, level, name_): 7212 showIndent(outfile, level) 7213 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 7214 def build(self, node_): 7215 attrs = node_.attributes 7216 self.buildAttributes(attrs) 7217 self.valueOf_ = '' 7218 for child_ in node_.childNodes: 7219 nodeName_ = child_.nodeName.split(':')[-1] 7220 self.buildChildren(child_, nodeName_) 7221 def buildAttributes(self, attrs): 7222 if attrs.get('width'): 7223 self.width = attrs.get('width').value 7224 if attrs.get('type'): 7225 self.type_ = attrs.get('type').value 7226 if attrs.get('name'): 7227 self.name = attrs.get('name').value 7228 if attrs.get('height'): 7229 self.height = attrs.get('height').value 7230 def buildChildren(self, child_, nodeName_): 7231 if child_.nodeType == Node.TEXT_NODE: 7232 obj_ = self.mixedclass_(MixedContainer.CategoryText, 7233 MixedContainer.TypeNone, '', child_.nodeValue) 7234 self.content_.append(obj_) 7235 if child_.nodeType == Node.TEXT_NODE: 7236 self.valueOf_ += child_.nodeValue 7237 elif child_.nodeType == Node.CDATA_SECTION_NODE: 7238 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 7239# end class docImageType 7240 7241 7242class docDotFileType(GeneratedsSuper): 7243 subclass = None 7244 superclass = None 7245 def __init__(self, name=None, valueOf_='', mixedclass_=None, content_=None): 7246 self.name = name 7247 if mixedclass_ is None: 7248 self.mixedclass_ = MixedContainer 7249 else: 7250 self.mixedclass_ = mixedclass_ 7251 if content_ is None: 7252 self.content_ = [] 7253 else: 7254 self.content_ = content_ 7255 def factory(*args_, **kwargs_): 7256 if docDotFileType.subclass: 7257 return docDotFileType.subclass(*args_, **kwargs_) 7258 else: 7259 return docDotFileType(*args_, **kwargs_) 7260 factory = staticmethod(factory) 7261 def get_name(self): return self.name 7262 def set_name(self, name): self.name = name 7263 def getValueOf_(self): return self.valueOf_ 7264 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 7265 def export(self, outfile, level, namespace_='', name_='docDotFileType', namespacedef_=''): 7266 showIndent(outfile, level) 7267 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7268 self.exportAttributes(outfile, level, namespace_, name_='docDotFileType') 7269 outfile.write('>') 7270 self.exportChildren(outfile, level + 1, namespace_, name_) 7271 outfile.write('</%s%s>\n' % (namespace_, name_)) 7272 def exportAttributes(self, outfile, level, namespace_='', name_='docDotFileType'): 7273 if self.name is not None: 7274 outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), )) 7275 def exportChildren(self, outfile, level, namespace_='', name_='docDotFileType'): 7276 if self.valueOf_.find('![CDATA')>-1: 7277 value=quote_xml('%s' % self.valueOf_) 7278 value=value.replace('![CDATA','<![CDATA') 7279 value=value.replace(']]',']]>') 7280 outfile.write(value) 7281 else: 7282 outfile.write(quote_xml('%s' % self.valueOf_)) 7283 def hasContent_(self): 7284 if ( 7285 self.valueOf_ is not None 7286 ): 7287 return True 7288 else: 7289 return False 7290 def exportLiteral(self, outfile, level, name_='docDotFileType'): 7291 level += 1 7292 self.exportLiteralAttributes(outfile, level, name_) 7293 if self.hasContent_(): 7294 self.exportLiteralChildren(outfile, level, name_) 7295 def exportLiteralAttributes(self, outfile, level, name_): 7296 if self.name is not None: 7297 showIndent(outfile, level) 7298 outfile.write('name = %s,\n' % (self.name,)) 7299 def exportLiteralChildren(self, outfile, level, name_): 7300 showIndent(outfile, level) 7301 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 7302 def build(self, node_): 7303 attrs = node_.attributes 7304 self.buildAttributes(attrs) 7305 self.valueOf_ = '' 7306 for child_ in node_.childNodes: 7307 nodeName_ = child_.nodeName.split(':')[-1] 7308 self.buildChildren(child_, nodeName_) 7309 def buildAttributes(self, attrs): 7310 if attrs.get('name'): 7311 self.name = attrs.get('name').value 7312 def buildChildren(self, child_, nodeName_): 7313 if child_.nodeType == Node.TEXT_NODE: 7314 obj_ = self.mixedclass_(MixedContainer.CategoryText, 7315 MixedContainer.TypeNone, '', child_.nodeValue) 7316 self.content_.append(obj_) 7317 if child_.nodeType == Node.TEXT_NODE: 7318 self.valueOf_ += child_.nodeValue 7319 elif child_.nodeType == Node.CDATA_SECTION_NODE: 7320 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 7321# end class docDotFileType 7322 7323 7324class docTocItemType(GeneratedsSuper): 7325 subclass = None 7326 superclass = None 7327 def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): 7328 self.id = id 7329 if mixedclass_ is None: 7330 self.mixedclass_ = MixedContainer 7331 else: 7332 self.mixedclass_ = mixedclass_ 7333 if content_ is None: 7334 self.content_ = [] 7335 else: 7336 self.content_ = content_ 7337 def factory(*args_, **kwargs_): 7338 if docTocItemType.subclass: 7339 return docTocItemType.subclass(*args_, **kwargs_) 7340 else: 7341 return docTocItemType(*args_, **kwargs_) 7342 factory = staticmethod(factory) 7343 def get_id(self): return self.id 7344 def set_id(self, id): self.id = id 7345 def getValueOf_(self): return self.valueOf_ 7346 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 7347 def export(self, outfile, level, namespace_='', name_='docTocItemType', namespacedef_=''): 7348 showIndent(outfile, level) 7349 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7350 self.exportAttributes(outfile, level, namespace_, name_='docTocItemType') 7351 outfile.write('>') 7352 self.exportChildren(outfile, level + 1, namespace_, name_) 7353 outfile.write('</%s%s>\n' % (namespace_, name_)) 7354 def exportAttributes(self, outfile, level, namespace_='', name_='docTocItemType'): 7355 if self.id is not None: 7356 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 7357 def exportChildren(self, outfile, level, namespace_='', name_='docTocItemType'): 7358 if self.valueOf_.find('![CDATA')>-1: 7359 value=quote_xml('%s' % self.valueOf_) 7360 value=value.replace('![CDATA','<![CDATA') 7361 value=value.replace(']]',']]>') 7362 outfile.write(value) 7363 else: 7364 outfile.write(quote_xml('%s' % self.valueOf_)) 7365 def hasContent_(self): 7366 if ( 7367 self.valueOf_ is not None 7368 ): 7369 return True 7370 else: 7371 return False 7372 def exportLiteral(self, outfile, level, name_='docTocItemType'): 7373 level += 1 7374 self.exportLiteralAttributes(outfile, level, name_) 7375 if self.hasContent_(): 7376 self.exportLiteralChildren(outfile, level, name_) 7377 def exportLiteralAttributes(self, outfile, level, name_): 7378 if self.id is not None: 7379 showIndent(outfile, level) 7380 outfile.write('id = %s,\n' % (self.id,)) 7381 def exportLiteralChildren(self, outfile, level, name_): 7382 showIndent(outfile, level) 7383 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 7384 def build(self, node_): 7385 attrs = node_.attributes 7386 self.buildAttributes(attrs) 7387 self.valueOf_ = '' 7388 for child_ in node_.childNodes: 7389 nodeName_ = child_.nodeName.split(':')[-1] 7390 self.buildChildren(child_, nodeName_) 7391 def buildAttributes(self, attrs): 7392 if attrs.get('id'): 7393 self.id = attrs.get('id').value 7394 def buildChildren(self, child_, nodeName_): 7395 if child_.nodeType == Node.TEXT_NODE: 7396 obj_ = self.mixedclass_(MixedContainer.CategoryText, 7397 MixedContainer.TypeNone, '', child_.nodeValue) 7398 self.content_.append(obj_) 7399 if child_.nodeType == Node.TEXT_NODE: 7400 self.valueOf_ += child_.nodeValue 7401 elif child_.nodeType == Node.CDATA_SECTION_NODE: 7402 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 7403# end class docTocItemType 7404 7405 7406class docTocListType(GeneratedsSuper): 7407 subclass = None 7408 superclass = None 7409 def __init__(self, tocitem=None): 7410 if tocitem is None: 7411 self.tocitem = [] 7412 else: 7413 self.tocitem = tocitem 7414 def factory(*args_, **kwargs_): 7415 if docTocListType.subclass: 7416 return docTocListType.subclass(*args_, **kwargs_) 7417 else: 7418 return docTocListType(*args_, **kwargs_) 7419 factory = staticmethod(factory) 7420 def get_tocitem(self): return self.tocitem 7421 def set_tocitem(self, tocitem): self.tocitem = tocitem 7422 def add_tocitem(self, value): self.tocitem.append(value) 7423 def insert_tocitem(self, index, value): self.tocitem[index] = value 7424 def export(self, outfile, level, namespace_='', name_='docTocListType', namespacedef_=''): 7425 showIndent(outfile, level) 7426 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7427 self.exportAttributes(outfile, level, namespace_, name_='docTocListType') 7428 if self.hasContent_(): 7429 outfile.write('>\n') 7430 self.exportChildren(outfile, level + 1, namespace_, name_) 7431 showIndent(outfile, level) 7432 outfile.write('</%s%s>\n' % (namespace_, name_)) 7433 else: 7434 outfile.write(' />\n') 7435 def exportAttributes(self, outfile, level, namespace_='', name_='docTocListType'): 7436 pass 7437 def exportChildren(self, outfile, level, namespace_='', name_='docTocListType'): 7438 for tocitem_ in self.tocitem: 7439 tocitem_.export(outfile, level, namespace_, name_='tocitem') 7440 def hasContent_(self): 7441 if ( 7442 self.tocitem is not None 7443 ): 7444 return True 7445 else: 7446 return False 7447 def exportLiteral(self, outfile, level, name_='docTocListType'): 7448 level += 1 7449 self.exportLiteralAttributes(outfile, level, name_) 7450 if self.hasContent_(): 7451 self.exportLiteralChildren(outfile, level, name_) 7452 def exportLiteralAttributes(self, outfile, level, name_): 7453 pass 7454 def exportLiteralChildren(self, outfile, level, name_): 7455 showIndent(outfile, level) 7456 outfile.write('tocitem=[\n') 7457 level += 1 7458 for tocitem in self.tocitem: 7459 showIndent(outfile, level) 7460 outfile.write('model_.tocitem(\n') 7461 tocitem.exportLiteral(outfile, level, name_='tocitem') 7462 showIndent(outfile, level) 7463 outfile.write('),\n') 7464 level -= 1 7465 showIndent(outfile, level) 7466 outfile.write('],\n') 7467 def build(self, node_): 7468 attrs = node_.attributes 7469 self.buildAttributes(attrs) 7470 for child_ in node_.childNodes: 7471 nodeName_ = child_.nodeName.split(':')[-1] 7472 self.buildChildren(child_, nodeName_) 7473 def buildAttributes(self, attrs): 7474 pass 7475 def buildChildren(self, child_, nodeName_): 7476 if child_.nodeType == Node.ELEMENT_NODE and \ 7477 nodeName_ == 'tocitem': 7478 obj_ = docTocItemType.factory() 7479 obj_.build(child_) 7480 self.tocitem.append(obj_) 7481# end class docTocListType 7482 7483 7484class docLanguageType(GeneratedsSuper): 7485 subclass = None 7486 superclass = None 7487 def __init__(self, langid=None, para=None): 7488 self.langid = langid 7489 if para is None: 7490 self.para = [] 7491 else: 7492 self.para = para 7493 def factory(*args_, **kwargs_): 7494 if docLanguageType.subclass: 7495 return docLanguageType.subclass(*args_, **kwargs_) 7496 else: 7497 return docLanguageType(*args_, **kwargs_) 7498 factory = staticmethod(factory) 7499 def get_para(self): return self.para 7500 def set_para(self, para): self.para = para 7501 def add_para(self, value): self.para.append(value) 7502 def insert_para(self, index, value): self.para[index] = value 7503 def get_langid(self): return self.langid 7504 def set_langid(self, langid): self.langid = langid 7505 def export(self, outfile, level, namespace_='', name_='docLanguageType', namespacedef_=''): 7506 showIndent(outfile, level) 7507 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7508 self.exportAttributes(outfile, level, namespace_, name_='docLanguageType') 7509 if self.hasContent_(): 7510 outfile.write('>\n') 7511 self.exportChildren(outfile, level + 1, namespace_, name_) 7512 showIndent(outfile, level) 7513 outfile.write('</%s%s>\n' % (namespace_, name_)) 7514 else: 7515 outfile.write(' />\n') 7516 def exportAttributes(self, outfile, level, namespace_='', name_='docLanguageType'): 7517 if self.langid is not None: 7518 outfile.write(' langid=%s' % (self.format_string(quote_attrib(self.langid).encode(ExternalEncoding), input_name='langid'), )) 7519 def exportChildren(self, outfile, level, namespace_='', name_='docLanguageType'): 7520 for para_ in self.para: 7521 para_.export(outfile, level, namespace_, name_='para') 7522 def hasContent_(self): 7523 if ( 7524 self.para is not None 7525 ): 7526 return True 7527 else: 7528 return False 7529 def exportLiteral(self, outfile, level, name_='docLanguageType'): 7530 level += 1 7531 self.exportLiteralAttributes(outfile, level, name_) 7532 if self.hasContent_(): 7533 self.exportLiteralChildren(outfile, level, name_) 7534 def exportLiteralAttributes(self, outfile, level, name_): 7535 if self.langid is not None: 7536 showIndent(outfile, level) 7537 outfile.write('langid = %s,\n' % (self.langid,)) 7538 def exportLiteralChildren(self, outfile, level, name_): 7539 showIndent(outfile, level) 7540 outfile.write('para=[\n') 7541 level += 1 7542 for para in self.para: 7543 showIndent(outfile, level) 7544 outfile.write('model_.para(\n') 7545 para.exportLiteral(outfile, level, name_='para') 7546 showIndent(outfile, level) 7547 outfile.write('),\n') 7548 level -= 1 7549 showIndent(outfile, level) 7550 outfile.write('],\n') 7551 def build(self, node_): 7552 attrs = node_.attributes 7553 self.buildAttributes(attrs) 7554 for child_ in node_.childNodes: 7555 nodeName_ = child_.nodeName.split(':')[-1] 7556 self.buildChildren(child_, nodeName_) 7557 def buildAttributes(self, attrs): 7558 if attrs.get('langid'): 7559 self.langid = attrs.get('langid').value 7560 def buildChildren(self, child_, nodeName_): 7561 if child_.nodeType == Node.ELEMENT_NODE and \ 7562 nodeName_ == 'para': 7563 obj_ = docParaType.factory() 7564 obj_.build(child_) 7565 self.para.append(obj_) 7566# end class docLanguageType 7567 7568 7569class docParamListType(GeneratedsSuper): 7570 subclass = None 7571 superclass = None 7572 def __init__(self, kind=None, parameteritem=None): 7573 self.kind = kind 7574 if parameteritem is None: 7575 self.parameteritem = [] 7576 else: 7577 self.parameteritem = parameteritem 7578 def factory(*args_, **kwargs_): 7579 if docParamListType.subclass: 7580 return docParamListType.subclass(*args_, **kwargs_) 7581 else: 7582 return docParamListType(*args_, **kwargs_) 7583 factory = staticmethod(factory) 7584 def get_parameteritem(self): return self.parameteritem 7585 def set_parameteritem(self, parameteritem): self.parameteritem = parameteritem 7586 def add_parameteritem(self, value): self.parameteritem.append(value) 7587 def insert_parameteritem(self, index, value): self.parameteritem[index] = value 7588 def get_kind(self): return self.kind 7589 def set_kind(self, kind): self.kind = kind 7590 def export(self, outfile, level, namespace_='', name_='docParamListType', namespacedef_=''): 7591 showIndent(outfile, level) 7592 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7593 self.exportAttributes(outfile, level, namespace_, name_='docParamListType') 7594 if self.hasContent_(): 7595 outfile.write('>\n') 7596 self.exportChildren(outfile, level + 1, namespace_, name_) 7597 showIndent(outfile, level) 7598 outfile.write('</%s%s>\n' % (namespace_, name_)) 7599 else: 7600 outfile.write(' />\n') 7601 def exportAttributes(self, outfile, level, namespace_='', name_='docParamListType'): 7602 if self.kind is not None: 7603 outfile.write(' kind=%s' % (quote_attrib(self.kind), )) 7604 def exportChildren(self, outfile, level, namespace_='', name_='docParamListType'): 7605 for parameteritem_ in self.parameteritem: 7606 parameteritem_.export(outfile, level, namespace_, name_='parameteritem') 7607 def hasContent_(self): 7608 if ( 7609 self.parameteritem is not None 7610 ): 7611 return True 7612 else: 7613 return False 7614 def exportLiteral(self, outfile, level, name_='docParamListType'): 7615 level += 1 7616 self.exportLiteralAttributes(outfile, level, name_) 7617 if self.hasContent_(): 7618 self.exportLiteralChildren(outfile, level, name_) 7619 def exportLiteralAttributes(self, outfile, level, name_): 7620 if self.kind is not None: 7621 showIndent(outfile, level) 7622 outfile.write('kind = "%s",\n' % (self.kind,)) 7623 def exportLiteralChildren(self, outfile, level, name_): 7624 showIndent(outfile, level) 7625 outfile.write('parameteritem=[\n') 7626 level += 1 7627 for parameteritem in self.parameteritem: 7628 showIndent(outfile, level) 7629 outfile.write('model_.parameteritem(\n') 7630 parameteritem.exportLiteral(outfile, level, name_='parameteritem') 7631 showIndent(outfile, level) 7632 outfile.write('),\n') 7633 level -= 1 7634 showIndent(outfile, level) 7635 outfile.write('],\n') 7636 def build(self, node_): 7637 attrs = node_.attributes 7638 self.buildAttributes(attrs) 7639 for child_ in node_.childNodes: 7640 nodeName_ = child_.nodeName.split(':')[-1] 7641 self.buildChildren(child_, nodeName_) 7642 def buildAttributes(self, attrs): 7643 if attrs.get('kind'): 7644 self.kind = attrs.get('kind').value 7645 def buildChildren(self, child_, nodeName_): 7646 if child_.nodeType == Node.ELEMENT_NODE and \ 7647 nodeName_ == 'parameteritem': 7648 obj_ = docParamListItem.factory() 7649 obj_.build(child_) 7650 self.parameteritem.append(obj_) 7651# end class docParamListType 7652 7653 7654class docParamListItem(GeneratedsSuper): 7655 subclass = None 7656 superclass = None 7657 def __init__(self, parameternamelist=None, parameterdescription=None): 7658 if parameternamelist is None: 7659 self.parameternamelist = [] 7660 else: 7661 self.parameternamelist = parameternamelist 7662 self.parameterdescription = parameterdescription 7663 def factory(*args_, **kwargs_): 7664 if docParamListItem.subclass: 7665 return docParamListItem.subclass(*args_, **kwargs_) 7666 else: 7667 return docParamListItem(*args_, **kwargs_) 7668 factory = staticmethod(factory) 7669 def get_parameternamelist(self): return self.parameternamelist 7670 def set_parameternamelist(self, parameternamelist): self.parameternamelist = parameternamelist 7671 def add_parameternamelist(self, value): self.parameternamelist.append(value) 7672 def insert_parameternamelist(self, index, value): self.parameternamelist[index] = value 7673 def get_parameterdescription(self): return self.parameterdescription 7674 def set_parameterdescription(self, parameterdescription): self.parameterdescription = parameterdescription 7675 def export(self, outfile, level, namespace_='', name_='docParamListItem', namespacedef_=''): 7676 showIndent(outfile, level) 7677 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7678 self.exportAttributes(outfile, level, namespace_, name_='docParamListItem') 7679 if self.hasContent_(): 7680 outfile.write('>\n') 7681 self.exportChildren(outfile, level + 1, namespace_, name_) 7682 showIndent(outfile, level) 7683 outfile.write('</%s%s>\n' % (namespace_, name_)) 7684 else: 7685 outfile.write(' />\n') 7686 def exportAttributes(self, outfile, level, namespace_='', name_='docParamListItem'): 7687 pass 7688 def exportChildren(self, outfile, level, namespace_='', name_='docParamListItem'): 7689 for parameternamelist_ in self.parameternamelist: 7690 parameternamelist_.export(outfile, level, namespace_, name_='parameternamelist') 7691 if self.parameterdescription: 7692 self.parameterdescription.export(outfile, level, namespace_, name_='parameterdescription', ) 7693 def hasContent_(self): 7694 if ( 7695 self.parameternamelist is not None or 7696 self.parameterdescription is not None 7697 ): 7698 return True 7699 else: 7700 return False 7701 def exportLiteral(self, outfile, level, name_='docParamListItem'): 7702 level += 1 7703 self.exportLiteralAttributes(outfile, level, name_) 7704 if self.hasContent_(): 7705 self.exportLiteralChildren(outfile, level, name_) 7706 def exportLiteralAttributes(self, outfile, level, name_): 7707 pass 7708 def exportLiteralChildren(self, outfile, level, name_): 7709 showIndent(outfile, level) 7710 outfile.write('parameternamelist=[\n') 7711 level += 1 7712 for parameternamelist in self.parameternamelist: 7713 showIndent(outfile, level) 7714 outfile.write('model_.parameternamelist(\n') 7715 parameternamelist.exportLiteral(outfile, level, name_='parameternamelist') 7716 showIndent(outfile, level) 7717 outfile.write('),\n') 7718 level -= 1 7719 showIndent(outfile, level) 7720 outfile.write('],\n') 7721 if self.parameterdescription: 7722 showIndent(outfile, level) 7723 outfile.write('parameterdescription=model_.descriptionType(\n') 7724 self.parameterdescription.exportLiteral(outfile, level, name_='parameterdescription') 7725 showIndent(outfile, level) 7726 outfile.write('),\n') 7727 def build(self, node_): 7728 attrs = node_.attributes 7729 self.buildAttributes(attrs) 7730 for child_ in node_.childNodes: 7731 nodeName_ = child_.nodeName.split(':')[-1] 7732 self.buildChildren(child_, nodeName_) 7733 def buildAttributes(self, attrs): 7734 pass 7735 def buildChildren(self, child_, nodeName_): 7736 if child_.nodeType == Node.ELEMENT_NODE and \ 7737 nodeName_ == 'parameternamelist': 7738 obj_ = docParamNameList.factory() 7739 obj_.build(child_) 7740 self.parameternamelist.append(obj_) 7741 elif child_.nodeType == Node.ELEMENT_NODE and \ 7742 nodeName_ == 'parameterdescription': 7743 obj_ = descriptionType.factory() 7744 obj_.build(child_) 7745 self.set_parameterdescription(obj_) 7746# end class docParamListItem 7747 7748 7749class docParamNameList(GeneratedsSuper): 7750 subclass = None 7751 superclass = None 7752 def __init__(self, parametername=None): 7753 if parametername is None: 7754 self.parametername = [] 7755 else: 7756 self.parametername = parametername 7757 def factory(*args_, **kwargs_): 7758 if docParamNameList.subclass: 7759 return docParamNameList.subclass(*args_, **kwargs_) 7760 else: 7761 return docParamNameList(*args_, **kwargs_) 7762 factory = staticmethod(factory) 7763 def get_parametername(self): return self.parametername 7764 def set_parametername(self, parametername): self.parametername = parametername 7765 def add_parametername(self, value): self.parametername.append(value) 7766 def insert_parametername(self, index, value): self.parametername[index] = value 7767 def export(self, outfile, level, namespace_='', name_='docParamNameList', namespacedef_=''): 7768 showIndent(outfile, level) 7769 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7770 self.exportAttributes(outfile, level, namespace_, name_='docParamNameList') 7771 if self.hasContent_(): 7772 outfile.write('>\n') 7773 self.exportChildren(outfile, level + 1, namespace_, name_) 7774 showIndent(outfile, level) 7775 outfile.write('</%s%s>\n' % (namespace_, name_)) 7776 else: 7777 outfile.write(' />\n') 7778 def exportAttributes(self, outfile, level, namespace_='', name_='docParamNameList'): 7779 pass 7780 def exportChildren(self, outfile, level, namespace_='', name_='docParamNameList'): 7781 for parametername_ in self.parametername: 7782 parametername_.export(outfile, level, namespace_, name_='parametername') 7783 def hasContent_(self): 7784 if ( 7785 self.parametername is not None 7786 ): 7787 return True 7788 else: 7789 return False 7790 def exportLiteral(self, outfile, level, name_='docParamNameList'): 7791 level += 1 7792 self.exportLiteralAttributes(outfile, level, name_) 7793 if self.hasContent_(): 7794 self.exportLiteralChildren(outfile, level, name_) 7795 def exportLiteralAttributes(self, outfile, level, name_): 7796 pass 7797 def exportLiteralChildren(self, outfile, level, name_): 7798 showIndent(outfile, level) 7799 outfile.write('parametername=[\n') 7800 level += 1 7801 for parametername in self.parametername: 7802 showIndent(outfile, level) 7803 outfile.write('model_.parametername(\n') 7804 parametername.exportLiteral(outfile, level, name_='parametername') 7805 showIndent(outfile, level) 7806 outfile.write('),\n') 7807 level -= 1 7808 showIndent(outfile, level) 7809 outfile.write('],\n') 7810 def build(self, node_): 7811 attrs = node_.attributes 7812 self.buildAttributes(attrs) 7813 for child_ in node_.childNodes: 7814 nodeName_ = child_.nodeName.split(':')[-1] 7815 self.buildChildren(child_, nodeName_) 7816 def buildAttributes(self, attrs): 7817 pass 7818 def buildChildren(self, child_, nodeName_): 7819 if child_.nodeType == Node.ELEMENT_NODE and \ 7820 nodeName_ == 'parametername': 7821 obj_ = docParamName.factory() 7822 obj_.build(child_) 7823 self.parametername.append(obj_) 7824# end class docParamNameList 7825 7826 7827class docParamName(GeneratedsSuper): 7828 subclass = None 7829 superclass = None 7830 def __init__(self, direction=None, ref=None, mixedclass_=None, content_=None): 7831 self.direction = direction 7832 if mixedclass_ is None: 7833 self.mixedclass_ = MixedContainer 7834 else: 7835 self.mixedclass_ = mixedclass_ 7836 if content_ is None: 7837 self.content_ = [] 7838 else: 7839 self.content_ = content_ 7840 def factory(*args_, **kwargs_): 7841 if docParamName.subclass: 7842 return docParamName.subclass(*args_, **kwargs_) 7843 else: 7844 return docParamName(*args_, **kwargs_) 7845 factory = staticmethod(factory) 7846 def get_ref(self): return self.ref 7847 def set_ref(self, ref): self.ref = ref 7848 def get_direction(self): return self.direction 7849 def set_direction(self, direction): self.direction = direction 7850 def export(self, outfile, level, namespace_='', name_='docParamName', namespacedef_=''): 7851 showIndent(outfile, level) 7852 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7853 self.exportAttributes(outfile, level, namespace_, name_='docParamName') 7854 outfile.write('>') 7855 self.exportChildren(outfile, level + 1, namespace_, name_) 7856 outfile.write('</%s%s>\n' % (namespace_, name_)) 7857 def exportAttributes(self, outfile, level, namespace_='', name_='docParamName'): 7858 if self.direction is not None: 7859 outfile.write(' direction=%s' % (quote_attrib(self.direction), )) 7860 def exportChildren(self, outfile, level, namespace_='', name_='docParamName'): 7861 for item_ in self.content_: 7862 item_.export(outfile, level, item_.name, namespace_) 7863 def hasContent_(self): 7864 if ( 7865 self.ref is not None 7866 ): 7867 return True 7868 else: 7869 return False 7870 def exportLiteral(self, outfile, level, name_='docParamName'): 7871 level += 1 7872 self.exportLiteralAttributes(outfile, level, name_) 7873 if self.hasContent_(): 7874 self.exportLiteralChildren(outfile, level, name_) 7875 def exportLiteralAttributes(self, outfile, level, name_): 7876 if self.direction is not None: 7877 showIndent(outfile, level) 7878 outfile.write('direction = "%s",\n' % (self.direction,)) 7879 def exportLiteralChildren(self, outfile, level, name_): 7880 showIndent(outfile, level) 7881 outfile.write('content_ = [\n') 7882 for item_ in self.content_: 7883 item_.exportLiteral(outfile, level, name_) 7884 showIndent(outfile, level) 7885 outfile.write('],\n') 7886 def build(self, node_): 7887 attrs = node_.attributes 7888 self.buildAttributes(attrs) 7889 for child_ in node_.childNodes: 7890 nodeName_ = child_.nodeName.split(':')[-1] 7891 self.buildChildren(child_, nodeName_) 7892 def buildAttributes(self, attrs): 7893 if attrs.get('direction'): 7894 self.direction = attrs.get('direction').value 7895 def buildChildren(self, child_, nodeName_): 7896 if child_.nodeType == Node.ELEMENT_NODE and \ 7897 nodeName_ == 'ref': 7898 childobj_ = docRefTextType.factory() 7899 childobj_.build(child_) 7900 obj_ = self.mixedclass_(MixedContainer.CategoryComplex, 7901 MixedContainer.TypeNone, 'ref', childobj_) 7902 self.content_.append(obj_) 7903 elif child_.nodeType == Node.TEXT_NODE: 7904 obj_ = self.mixedclass_(MixedContainer.CategoryText, 7905 MixedContainer.TypeNone, '', child_.nodeValue) 7906 self.content_.append(obj_) 7907# end class docParamName 7908 7909 7910class docXRefSectType(GeneratedsSuper): 7911 subclass = None 7912 superclass = None 7913 def __init__(self, id=None, xreftitle=None, xrefdescription=None): 7914 self.id = id 7915 if xreftitle is None: 7916 self.xreftitle = [] 7917 else: 7918 self.xreftitle = xreftitle 7919 self.xrefdescription = xrefdescription 7920 def factory(*args_, **kwargs_): 7921 if docXRefSectType.subclass: 7922 return docXRefSectType.subclass(*args_, **kwargs_) 7923 else: 7924 return docXRefSectType(*args_, **kwargs_) 7925 factory = staticmethod(factory) 7926 def get_xreftitle(self): return self.xreftitle 7927 def set_xreftitle(self, xreftitle): self.xreftitle = xreftitle 7928 def add_xreftitle(self, value): self.xreftitle.append(value) 7929 def insert_xreftitle(self, index, value): self.xreftitle[index] = value 7930 def get_xrefdescription(self): return self.xrefdescription 7931 def set_xrefdescription(self, xrefdescription): self.xrefdescription = xrefdescription 7932 def get_id(self): return self.id 7933 def set_id(self, id): self.id = id 7934 def export(self, outfile, level, namespace_='', name_='docXRefSectType', namespacedef_=''): 7935 showIndent(outfile, level) 7936 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 7937 self.exportAttributes(outfile, level, namespace_, name_='docXRefSectType') 7938 if self.hasContent_(): 7939 outfile.write('>\n') 7940 self.exportChildren(outfile, level + 1, namespace_, name_) 7941 showIndent(outfile, level) 7942 outfile.write('</%s%s>\n' % (namespace_, name_)) 7943 else: 7944 outfile.write(' />\n') 7945 def exportAttributes(self, outfile, level, namespace_='', name_='docXRefSectType'): 7946 if self.id is not None: 7947 outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) 7948 def exportChildren(self, outfile, level, namespace_='', name_='docXRefSectType'): 7949 for xreftitle_ in self.xreftitle: 7950 showIndent(outfile, level) 7951 outfile.write('<%sxreftitle>%s</%sxreftitle>\n' % (namespace_, self.format_string(quote_xml(xreftitle_).encode(ExternalEncoding), input_name='xreftitle'), namespace_)) 7952 if self.xrefdescription: 7953 self.xrefdescription.export(outfile, level, namespace_, name_='xrefdescription', ) 7954 def hasContent_(self): 7955 if ( 7956 self.xreftitle is not None or 7957 self.xrefdescription is not None 7958 ): 7959 return True 7960 else: 7961 return False 7962 def exportLiteral(self, outfile, level, name_='docXRefSectType'): 7963 level += 1 7964 self.exportLiteralAttributes(outfile, level, name_) 7965 if self.hasContent_(): 7966 self.exportLiteralChildren(outfile, level, name_) 7967 def exportLiteralAttributes(self, outfile, level, name_): 7968 if self.id is not None: 7969 showIndent(outfile, level) 7970 outfile.write('id = %s,\n' % (self.id,)) 7971 def exportLiteralChildren(self, outfile, level, name_): 7972 showIndent(outfile, level) 7973 outfile.write('xreftitle=[\n') 7974 level += 1 7975 for xreftitle in self.xreftitle: 7976 showIndent(outfile, level) 7977 outfile.write('%s,\n' % quote_python(xreftitle).encode(ExternalEncoding)) 7978 level -= 1 7979 showIndent(outfile, level) 7980 outfile.write('],\n') 7981 if self.xrefdescription: 7982 showIndent(outfile, level) 7983 outfile.write('xrefdescription=model_.descriptionType(\n') 7984 self.xrefdescription.exportLiteral(outfile, level, name_='xrefdescription') 7985 showIndent(outfile, level) 7986 outfile.write('),\n') 7987 def build(self, node_): 7988 attrs = node_.attributes 7989 self.buildAttributes(attrs) 7990 for child_ in node_.childNodes: 7991 nodeName_ = child_.nodeName.split(':')[-1] 7992 self.buildChildren(child_, nodeName_) 7993 def buildAttributes(self, attrs): 7994 if attrs.get('id'): 7995 self.id = attrs.get('id').value 7996 def buildChildren(self, child_, nodeName_): 7997 if child_.nodeType == Node.ELEMENT_NODE and \ 7998 nodeName_ == 'xreftitle': 7999 xreftitle_ = '' 8000 for text__content_ in child_.childNodes: 8001 xreftitle_ += text__content_.nodeValue 8002 self.xreftitle.append(xreftitle_) 8003 elif child_.nodeType == Node.ELEMENT_NODE and \ 8004 nodeName_ == 'xrefdescription': 8005 obj_ = descriptionType.factory() 8006 obj_.build(child_) 8007 self.set_xrefdescription(obj_) 8008# end class docXRefSectType 8009 8010 8011class docCopyType(GeneratedsSuper): 8012 subclass = None 8013 superclass = None 8014 def __init__(self, link=None, para=None, sect1=None, internal=None): 8015 self.link = link 8016 if para is None: 8017 self.para = [] 8018 else: 8019 self.para = para 8020 if sect1 is None: 8021 self.sect1 = [] 8022 else: 8023 self.sect1 = sect1 8024 self.internal = internal 8025 def factory(*args_, **kwargs_): 8026 if docCopyType.subclass: 8027 return docCopyType.subclass(*args_, **kwargs_) 8028 else: 8029 return docCopyType(*args_, **kwargs_) 8030 factory = staticmethod(factory) 8031 def get_para(self): return self.para 8032 def set_para(self, para): self.para = para 8033 def add_para(self, value): self.para.append(value) 8034 def insert_para(self, index, value): self.para[index] = value 8035 def get_sect1(self): return self.sect1 8036 def set_sect1(self, sect1): self.sect1 = sect1 8037 def add_sect1(self, value): self.sect1.append(value) 8038 def insert_sect1(self, index, value): self.sect1[index] = value 8039 def get_internal(self): return self.internal 8040 def set_internal(self, internal): self.internal = internal 8041 def get_link(self): return self.link 8042 def set_link(self, link): self.link = link 8043 def export(self, outfile, level, namespace_='', name_='docCopyType', namespacedef_=''): 8044 showIndent(outfile, level) 8045 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 8046 self.exportAttributes(outfile, level, namespace_, name_='docCopyType') 8047 if self.hasContent_(): 8048 outfile.write('>\n') 8049 self.exportChildren(outfile, level + 1, namespace_, name_) 8050 showIndent(outfile, level) 8051 outfile.write('</%s%s>\n' % (namespace_, name_)) 8052 else: 8053 outfile.write(' />\n') 8054 def exportAttributes(self, outfile, level, namespace_='', name_='docCopyType'): 8055 if self.link is not None: 8056 outfile.write(' link=%s' % (self.format_string(quote_attrib(self.link).encode(ExternalEncoding), input_name='link'), )) 8057 def exportChildren(self, outfile, level, namespace_='', name_='docCopyType'): 8058 for para_ in self.para: 8059 para_.export(outfile, level, namespace_, name_='para') 8060 for sect1_ in self.sect1: 8061 sect1_.export(outfile, level, namespace_, name_='sect1') 8062 if self.internal: 8063 self.internal.export(outfile, level, namespace_, name_='internal') 8064 def hasContent_(self): 8065 if ( 8066 self.para is not None or 8067 self.sect1 is not None or 8068 self.internal is not None 8069 ): 8070 return True 8071 else: 8072 return False 8073 def exportLiteral(self, outfile, level, name_='docCopyType'): 8074 level += 1 8075 self.exportLiteralAttributes(outfile, level, name_) 8076 if self.hasContent_(): 8077 self.exportLiteralChildren(outfile, level, name_) 8078 def exportLiteralAttributes(self, outfile, level, name_): 8079 if self.link is not None: 8080 showIndent(outfile, level) 8081 outfile.write('link = %s,\n' % (self.link,)) 8082 def exportLiteralChildren(self, outfile, level, name_): 8083 showIndent(outfile, level) 8084 outfile.write('para=[\n') 8085 level += 1 8086 for para in self.para: 8087 showIndent(outfile, level) 8088 outfile.write('model_.para(\n') 8089 para.exportLiteral(outfile, level, name_='para') 8090 showIndent(outfile, level) 8091 outfile.write('),\n') 8092 level -= 1 8093 showIndent(outfile, level) 8094 outfile.write('],\n') 8095 showIndent(outfile, level) 8096 outfile.write('sect1=[\n') 8097 level += 1 8098 for sect1 in self.sect1: 8099 showIndent(outfile, level) 8100 outfile.write('model_.sect1(\n') 8101 sect1.exportLiteral(outfile, level, name_='sect1') 8102 showIndent(outfile, level) 8103 outfile.write('),\n') 8104 level -= 1 8105 showIndent(outfile, level) 8106 outfile.write('],\n') 8107 if self.internal: 8108 showIndent(outfile, level) 8109 outfile.write('internal=model_.docInternalType(\n') 8110 self.internal.exportLiteral(outfile, level, name_='internal') 8111 showIndent(outfile, level) 8112 outfile.write('),\n') 8113 def build(self, node_): 8114 attrs = node_.attributes 8115 self.buildAttributes(attrs) 8116 for child_ in node_.childNodes: 8117 nodeName_ = child_.nodeName.split(':')[-1] 8118 self.buildChildren(child_, nodeName_) 8119 def buildAttributes(self, attrs): 8120 if attrs.get('link'): 8121 self.link = attrs.get('link').value 8122 def buildChildren(self, child_, nodeName_): 8123 if child_.nodeType == Node.ELEMENT_NODE and \ 8124 nodeName_ == 'para': 8125 obj_ = docParaType.factory() 8126 obj_.build(child_) 8127 self.para.append(obj_) 8128 elif child_.nodeType == Node.ELEMENT_NODE and \ 8129 nodeName_ == 'sect1': 8130 obj_ = docSect1Type.factory() 8131 obj_.build(child_) 8132 self.sect1.append(obj_) 8133 elif child_.nodeType == Node.ELEMENT_NODE and \ 8134 nodeName_ == 'internal': 8135 obj_ = docInternalType.factory() 8136 obj_.build(child_) 8137 self.set_internal(obj_) 8138# end class docCopyType 8139 8140 8141class docCharType(GeneratedsSuper): 8142 subclass = None 8143 superclass = None 8144 def __init__(self, char=None, valueOf_=''): 8145 self.char = char 8146 self.valueOf_ = valueOf_ 8147 def factory(*args_, **kwargs_): 8148 if docCharType.subclass: 8149 return docCharType.subclass(*args_, **kwargs_) 8150 else: 8151 return docCharType(*args_, **kwargs_) 8152 factory = staticmethod(factory) 8153 def get_char(self): return self.char 8154 def set_char(self, char): self.char = char 8155 def getValueOf_(self): return self.valueOf_ 8156 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 8157 def export(self, outfile, level, namespace_='', name_='docCharType', namespacedef_=''): 8158 showIndent(outfile, level) 8159 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 8160 self.exportAttributes(outfile, level, namespace_, name_='docCharType') 8161 if self.hasContent_(): 8162 outfile.write('>\n') 8163 self.exportChildren(outfile, level + 1, namespace_, name_) 8164 showIndent(outfile, level) 8165 outfile.write('</%s%s>\n' % (namespace_, name_)) 8166 else: 8167 outfile.write(' />\n') 8168 def exportAttributes(self, outfile, level, namespace_='', name_='docCharType'): 8169 if self.char is not None: 8170 outfile.write(' char=%s' % (quote_attrib(self.char), )) 8171 def exportChildren(self, outfile, level, namespace_='', name_='docCharType'): 8172 if self.valueOf_.find('![CDATA')>-1: 8173 value=quote_xml('%s' % self.valueOf_) 8174 value=value.replace('![CDATA','<![CDATA') 8175 value=value.replace(']]',']]>') 8176 outfile.write(value) 8177 else: 8178 outfile.write(quote_xml('%s' % self.valueOf_)) 8179 def hasContent_(self): 8180 if ( 8181 self.valueOf_ is not None 8182 ): 8183 return True 8184 else: 8185 return False 8186 def exportLiteral(self, outfile, level, name_='docCharType'): 8187 level += 1 8188 self.exportLiteralAttributes(outfile, level, name_) 8189 if self.hasContent_(): 8190 self.exportLiteralChildren(outfile, level, name_) 8191 def exportLiteralAttributes(self, outfile, level, name_): 8192 if self.char is not None: 8193 showIndent(outfile, level) 8194 outfile.write('char = "%s",\n' % (self.char,)) 8195 def exportLiteralChildren(self, outfile, level, name_): 8196 showIndent(outfile, level) 8197 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 8198 def build(self, node_): 8199 attrs = node_.attributes 8200 self.buildAttributes(attrs) 8201 self.valueOf_ = '' 8202 for child_ in node_.childNodes: 8203 nodeName_ = child_.nodeName.split(':')[-1] 8204 self.buildChildren(child_, nodeName_) 8205 def buildAttributes(self, attrs): 8206 if attrs.get('char'): 8207 self.char = attrs.get('char').value 8208 def buildChildren(self, child_, nodeName_): 8209 if child_.nodeType == Node.TEXT_NODE: 8210 self.valueOf_ += child_.nodeValue 8211 elif child_.nodeType == Node.CDATA_SECTION_NODE: 8212 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 8213# end class docCharType 8214 8215 8216class docEmptyType(GeneratedsSuper): 8217 subclass = None 8218 superclass = None 8219 def __init__(self, valueOf_=''): 8220 self.valueOf_ = valueOf_ 8221 def factory(*args_, **kwargs_): 8222 if docEmptyType.subclass: 8223 return docEmptyType.subclass(*args_, **kwargs_) 8224 else: 8225 return docEmptyType(*args_, **kwargs_) 8226 factory = staticmethod(factory) 8227 def getValueOf_(self): return self.valueOf_ 8228 def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ 8229 def export(self, outfile, level, namespace_='', name_='docEmptyType', namespacedef_=''): 8230 showIndent(outfile, level) 8231 outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) 8232 self.exportAttributes(outfile, level, namespace_, name_='docEmptyType') 8233 if self.hasContent_(): 8234 outfile.write('>\n') 8235 self.exportChildren(outfile, level + 1, namespace_, name_) 8236 showIndent(outfile, level) 8237 outfile.write('</%s%s>\n' % (namespace_, name_)) 8238 else: 8239 outfile.write(' />\n') 8240 def exportAttributes(self, outfile, level, namespace_='', name_='docEmptyType'): 8241 pass 8242 def exportChildren(self, outfile, level, namespace_='', name_='docEmptyType'): 8243 if self.valueOf_.find('![CDATA')>-1: 8244 value=quote_xml('%s' % self.valueOf_) 8245 value=value.replace('![CDATA','<![CDATA') 8246 value=value.replace(']]',']]>') 8247 outfile.write(value) 8248 else: 8249 outfile.write(quote_xml('%s' % self.valueOf_)) 8250 def hasContent_(self): 8251 if ( 8252 self.valueOf_ is not None 8253 ): 8254 return True 8255 else: 8256 return False 8257 def exportLiteral(self, outfile, level, name_='docEmptyType'): 8258 level += 1 8259 self.exportLiteralAttributes(outfile, level, name_) 8260 if self.hasContent_(): 8261 self.exportLiteralChildren(outfile, level, name_) 8262 def exportLiteralAttributes(self, outfile, level, name_): 8263 pass 8264 def exportLiteralChildren(self, outfile, level, name_): 8265 showIndent(outfile, level) 8266 outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) 8267 def build(self, node_): 8268 attrs = node_.attributes 8269 self.buildAttributes(attrs) 8270 self.valueOf_ = '' 8271 for child_ in node_.childNodes: 8272 nodeName_ = child_.nodeName.split(':')[-1] 8273 self.buildChildren(child_, nodeName_) 8274 def buildAttributes(self, attrs): 8275 pass 8276 def buildChildren(self, child_, nodeName_): 8277 if child_.nodeType == Node.TEXT_NODE: 8278 self.valueOf_ += child_.nodeValue 8279 elif child_.nodeType == Node.CDATA_SECTION_NODE: 8280 self.valueOf_ += '![CDATA['+child_.nodeValue+']]' 8281# end class docEmptyType 8282 8283 8284USAGE_TEXT = """ 8285Usage: python <Parser>.py [ -s ] <in_xml_file> 8286Options: 8287 -s Use the SAX parser, not the minidom parser. 8288""" 8289 8290def usage(): 8291 print(USAGE_TEXT) 8292 sys.exit(1) 8293 8294 8295def parse(inFileName): 8296 doc = minidom.parse(inFileName) 8297 rootNode = doc.documentElement 8298 rootObj = DoxygenType.factory() 8299 rootObj.build(rootNode) 8300 # Enable Python to collect the space used by the DOM. 8301 doc = None 8302 sys.stdout.write('<?xml version="1.0" ?>\n') 8303 rootObj.export(sys.stdout, 0, name_="doxygen", 8304 namespacedef_='') 8305 return rootObj 8306 8307 8308def parseString(inString): 8309 doc = minidom.parseString(inString) 8310 rootNode = doc.documentElement 8311 rootObj = DoxygenType.factory() 8312 rootObj.build(rootNode) 8313 # Enable Python to collect the space used by the DOM. 8314 doc = None 8315 sys.stdout.write('<?xml version="1.0" ?>\n') 8316 rootObj.export(sys.stdout, 0, name_="doxygen", 8317 namespacedef_='') 8318 return rootObj 8319 8320 8321def parseLiteral(inFileName): 8322 doc = minidom.parse(inFileName) 8323 rootNode = doc.documentElement 8324 rootObj = DoxygenType.factory() 8325 rootObj.build(rootNode) 8326 # Enable Python to collect the space used by the DOM. 8327 doc = None 8328 sys.stdout.write('from compound import *\n\n') 8329 sys.stdout.write('rootObj = doxygen(\n') 8330 rootObj.exportLiteral(sys.stdout, 0, name_="doxygen") 8331 sys.stdout.write(')\n') 8332 return rootObj 8333 8334 8335def main(): 8336 args = sys.argv[1:] 8337 if len(args) == 1: 8338 parse(args[0]) 8339 else: 8340 usage() 8341 8342 8343if __name__ == '__main__': 8344 main() 8345 #import pdb 8346 #pdb.run('main()') 8347