MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / process

Method process

suds/builder.py:64–94  ·  view source on GitHub ↗

process the specified type then process its children

(self, data, type, history)

Source from the content-addressed store, hash-verified

62 return data
63
64 def process(self, data, type, history):
65 """ process the specified type then process its children """
66 if type in history:
67 return
68 if type.enum():
69 return
70 history.append(type)
71 resolved = type.resolve()
72 value = None
73 if type.unbounded():
74 value = []
75 else:
76 if len(resolved) > 0:
77 if resolved.mixed():
78 value = Factory.property(resolved.name)
79 md = value.__metadata__
80 md.sxtype = resolved
81 else:
82 value = Factory.object(resolved.name)
83 md = value.__metadata__
84 md.sxtype = resolved
85 md.ordering = self.ordering(resolved)
86 setattr(data, type.name, value)
87 if value is not None:
88 data = value
89 if not isinstance(data, list):
90 self.add_attributes(data, resolved)
91 for child, ancestry in resolved.children():
92 if self.skip_child(child, ancestry):
93 continue
94 self.process(data, child, history[:])
95
96 def add_attributes(self, data, type):
97 """ add required attributes """

Callers 1

buildMethod · 0.95

Calls 11

orderingMethod · 0.95
add_attributesMethod · 0.95
skip_childMethod · 0.95
propertyMethod · 0.80
objectMethod · 0.80
childrenMethod · 0.80
enumMethod · 0.45
appendMethod · 0.45
resolveMethod · 0.45
unboundedMethod · 0.45
mixedMethod · 0.45

Tested by

no test coverage detected