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

Method export

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

Source from the content-addressed store, hash-verified

1509 else:
1510 return False
1511 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='TimeType', namespacedef_='', pretty_print=True):
1512 if pretty_print:
1513 eol_ = '\n'
1514 else:
1515 eol_ = ''
1516 showIndent(lwrite, level, pretty_print)
1517 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
1518 already_processed = set()
1519 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='TimeType')
1520 if self.hasContent_():
1521 lwrite('>%s' % (eol_, ))
1522 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
1523 showIndent(lwrite, level, pretty_print)
1524 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
1525 else:
1526 lwrite('/>%s' % (eol_, ))
1527 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='TimeType'):
1528 pass
1529 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='TimeType', fromsubclass_=False, pretty_print=True):

Callers 15

exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45
exportChildrenMethod · 0.45

Calls 3

exportAttributesMethod · 0.95
hasContent_Method · 0.95
exportChildrenMethod · 0.95

Tested by

no test coverage detected