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