MCPcopy Index your code
hub / github.com/STIXProject/python-stix / export

Method export

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

Source from the content-addressed store, hash-verified

194 else:
195 return False
196 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='AffectedAssetType', namespacedef_='', pretty_print=True):
197 if pretty_print:
198 eol_ = '\n'
199 else:
200 eol_ = ''
201 showIndent(lwrite, level, pretty_print)
202 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
203 already_processed = set()
204 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='AffectedAssetType')
205 if self.hasContent_():
206 lwrite('>%s' % (eol_, ))
207 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
208 showIndent(lwrite, level, pretty_print)
209 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
210 else:
211 lwrite('/>%s' % (eol_, ))
212 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='AffectedAssetType'):
213 pass
214 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='AffectedAssetType', 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