MCPcopy Create free account
hub / github.com/STIXProject/python-stix / export

Method export

stix/bindings/incident.py:328–343  ·  view source on GitHub ↗
(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ImpactAssessmentType', namespacedef_='', pretty_print=True)

Source from the content-addressed store, hash-verified

326 else:
327 return False
328 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ImpactAssessmentType', namespacedef_='', pretty_print=True):
329 if pretty_print:
330 eol_ = '\n'
331 else:
332 eol_ = ''
333 showIndent(lwrite, level, pretty_print)
334 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
335 already_processed = set()
336 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='ImpactAssessmentType')
337 if self.hasContent_():
338 lwrite('>%s' % (eol_, ))
339 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
340 showIndent(lwrite, level, pretty_print)
341 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
342 else:
343 lwrite('/>%s' % (eol_, ))
344 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='ImpactAssessmentType'):
345 pass
346 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ImpactAssessmentType', fromsubclass_=False, pretty_print=True):

Callers

nothing calls this directly

Calls 3

exportAttributesMethod · 0.95
hasContent_Method · 0.95
exportChildrenMethod · 0.95

Tested by

no test coverage detected