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

Method find

suds/resolver.py:406–439  ·  view source on GitHub ↗

@param name: The name of the object to be resolved. @type name: basestring @param object: The name's value. @type object: (any|L{Object}) @param resolved: A flag indicating that the fully resolved type should be returned. @type resolved: b

(self, name, object, resolved=False, push=True)

Source from the content-addressed store, hash-verified

404 TreeResolver.__init__(self, schema)
405
406 def find(self, name, object, resolved=False, push=True):
407 """
408 @param name: The name of the object to be resolved.
409 @type name: basestring
410 @param object: The name's value.
411 @type object: (any|L{Object})
412 @param resolved: A flag indicating that the fully resolved type
413 should be returned.
414 @type resolved: boolean
415 @param push: Indicates that the resolved type should be
416 pushed onto the stack.
417 @type push: boolean
418 @return: The found schema I{type}
419 @rtype: L{xsd.sxbase.SchemaObject}
420 """
421 known = None
422 parent = self.top().resolved
423 if parent is None:
424 result, ancestry = self.query(name)
425 else:
426 result, ancestry = self.getchild(name, parent)
427 if result is None:
428 return None
429 if isinstance(object, Object):
430 known = self.known(object)
431 if push:
432 frame = Frame(result, resolved=known, ancestry=ancestry)
433 self.push(frame)
434 if resolved:
435 if known is None:
436 result = result.resolve()
437 else:
438 result = known
439 return result
440
441 def query(self, name):
442 """ blindly query the schema by name """

Callers

nothing calls this directly

Calls 7

queryMethod · 0.95
knownMethod · 0.95
getchildMethod · 0.80
FrameClass · 0.70
topMethod · 0.45
pushMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected