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

Method export

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

Source from the content-addressed store, hash-verified

65 else:
66 return False
67 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='PropertyAffectedType', namespacedef_='', pretty_print=True):
68 if pretty_print:
69 eol_ = '\n'
70 else:
71 eol_ = ''
72 showIndent(lwrite, level, pretty_print)
73 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
74 already_processed = set()
75 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='PropertyAffectedType')
76 if self.hasContent_():
77 lwrite('>%s' % (eol_, ))
78 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
79 showIndent(lwrite, level, pretty_print)
80 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
81 else:
82 lwrite('/>%s' % (eol_, ))
83 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='PropertyAffectedType'):
84 pass
85 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='PropertyAffectedType', 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