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

Method buildAttributes

stix/bindings/ttp.py:287–295  ·  view source on GitHub ↗
(self, node, attrs, already_processed)

Source from the content-addressed store, hash-verified

285 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
286 self.buildChildren(child, node, nodeName_)
287 def buildAttributes(self, node, attrs, already_processed):
288 value = find_attr_value_('idref', node)
289 if value is not None and 'idref' not in already_processed:
290 already_processed.add('idref')
291 self.idref = value
292 value = find_attr_value_('id', node)
293 if value is not None and 'id' not in already_processed:
294 already_processed.add('id')
295 self.id = value
296 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
297 if nodeName_ == 'Type':
298 obj_ = stix_common_binding.ControlledVocabularyStringType.factory()

Callers 1

buildMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected