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

Method buildChildren

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

Source from the content-addressed store, hash-verified

558 already_processed.add('id')
559 self.id = value
560 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
561 if nodeName_ == 'Title':
562 Title_ = child_.text
563 Title_ = self.gds_validate_string(Title_, node, 'Title')
564 self.Title = Title_
565 elif nodeName_ == 'Type':
566 obj_ = stix_common_binding.ControlledVocabularyStringType.factory()
567 obj_.build(child_)
568 self.Type.append(obj_)
569 elif nodeName_ == 'Description':
570 obj_ = stix_common_binding.StructuredTextType.factory()
571 obj_.build(child_)
572 self.add_Description(obj_)
573 elif nodeName_ == 'Short_Description':
574 obj_ = stix_common_binding.StructuredTextType.factory()
575 obj_.build(child_)
576 self.add_Short_Description(obj_)
577 elif nodeName_ == 'Observable_Characterization':
578 obj_ = cybox_core_binding.ObservablesType.factory()
579 obj_.build(child_)
580 self.set_Observable_Characterization(obj_)
581# end class InfrastructureType
582
583

Callers 1

buildMethod · 0.95

Calls 5

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

Tested by

no test coverage detected