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

Method buildChildren

stix/bindings/incident.py:246–283  ·  view source on GitHub ↗
(self, child_, node, nodeName_, fromsubclass_=False)

Source from the content-addressed store, hash-verified

244 def buildAttributes(self, node, attrs, already_processed):
245 pass
246 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
247 if nodeName_ == 'Type':
248 obj_ = AssetTypeType.factory()
249 obj_.build(child_)
250 self.set_Type(obj_)
251 elif nodeName_ == 'Description':
252 obj_ = stix_common_binding.StructuredTextType.factory()
253 obj_.build(child_)
254 self.add_Description(obj_)
255 elif nodeName_ == 'Business_Function_Or_Role':
256 obj_ = stix_common_binding.StructuredTextType.factory()
257 obj_.build(child_)
258 self.add_Business_Function_Or_Role(obj_)
259 elif nodeName_ == 'Ownership_Class':
260 obj_ = stix_common_binding.ControlledVocabularyStringType.factory()
261 obj_.build(child_)
262 self.set_Ownership_Class(obj_)
263 elif nodeName_ == 'Management_Class':
264 obj_ = stix_common_binding.ControlledVocabularyStringType.factory()
265 obj_.build(child_)
266 self.set_Management_Class(obj_)
267 elif nodeName_ == 'Location_Class':
268 obj_ = stix_common_binding.ControlledVocabularyStringType.factory()
269 obj_.build(child_)
270 self.set_Location_Class(obj_)
271 elif nodeName_ == 'Location':
272 from .extensions.address import ciq_address_3_0
273 obj_ = lookup_extension(child_).factory()
274 obj_.build(child_)
275 self.set_Location(obj_)
276 elif nodeName_ == 'Nature_Of_Security_Effect':
277 obj_ = NatureOfSecurityEffectType.factory()
278 obj_.build(child_)
279 self.set_Nature_Of_Security_Effect(obj_)
280 elif nodeName_ == 'Structured_Description':
281 obj_ = cybox_core_binding.ObservablesType.factory()
282 obj_.build(child_)
283 self.set_Structured_Description(obj_)
284# end class AffectedAssetType
285
286class ImpactAssessmentType(GeneratedsSuper):

Callers 1

buildMethod · 0.95

Calls 12

set_TypeMethod · 0.95
add_DescriptionMethod · 0.95
set_Ownership_ClassMethod · 0.95
set_Management_ClassMethod · 0.95
set_Location_ClassMethod · 0.95
set_LocationMethod · 0.95
lookup_extensionFunction · 0.90
factoryMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected