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

Method buildChildren

stix/bindings/ttp.py:296–316  ·  view source on GitHub ↗
(self, child_, node, nodeName_, fromsubclass_=False)

Source from the content-addressed store, hash-verified

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()
299 obj_.build(child_)
300 self.Type.append(obj_)
301 elif nodeName_ == 'Name':
302 obj_ = stix_common_binding.ControlledVocabularyStringType.factory()
303 obj_.build(child_)
304 self.Name.append(obj_)
305 elif nodeName_ == 'Title':
306 Title_ = child_.text
307 Title_ = self.gds_validate_string(Title_, node, 'Title')
308 self.Title = Title_
309 elif nodeName_ == 'Description':
310 obj_ = stix_common_binding.StructuredTextType.factory()
311 obj_.build(child_)
312 self.add_Description(obj_)
313 elif nodeName_ == 'Short_Description':
314 obj_ = stix_common_binding.StructuredTextType.factory()
315 obj_.build(child_)
316 self.add_Short_Description(obj_)
317# end class MalwareInstanceType
318
319class ExploitType(GeneratedsSuper):

Callers 1

buildMethod · 0.95

Calls 4

add_DescriptionMethod · 0.95
add_Short_DescriptionMethod · 0.95
factoryMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected