Package pyxb :: Package xmlschema :: Module structures :: Class _PickledAnonymousReference |
[hide private]
[frames] | no frames]

# type _PickledAnonymousReference

source code

    object --+
             |
            _PickledAnonymousReference

A helper that encapsulates a reference to an anonymous type in a different namespace.

Normally references to components in other namespaces can be made using the component's name. This is not the case when a namespace derives from a base type in another namespace and needs to reference the attribute or element declarations held in that type. If these declarations are local to the base complex type, they cannot be identified by name. This class provides a pickleable representation for them that behaves rather like an pyxb.namespace.ExpandedName instance in that it can be used to dereference various component types.

Instance Methods | [hide private]
__init__(self, namespace, anonymous_name) Create a new anonymous reference. | source code
namespace(self) | source code
anonymousName(self) | source code
validateComponentModel(self) Forward to the associated namespace. | source code
__lookupObject(self) | source code
typeDefinition(self) | source code
attributeGroupDefinition(self) | source code
modelGroupDefinition(self) | source code
attributeDeclaration(self) | source code
elementDeclaration(self) | source code
identityConstraintDefinition(self) | source code
notationDeclaration(self) | source code
__str__(self) Represent the anonymous reference in a form recognizable by a developer. | source code
_PickledAnonymousReference__lookupObject(self) | source code

Class Methods | [hide private]
FromPickled(cls, object_reference) Return the component referred to by the provided reference, regardless of whether it is a normal or anonymous reference. | source code

Class Variables | [hide private]
| __AnonymousCategory = `pyxb.namespace.archive.NamespaceArchive.`...``
| __namespace = `None`
| __anonymousName = `None`
| _PickledAnonymousReference__AnonymousCategory = ``'``_anonymousTyp``...``
| _PickledAnonymousReference__anonymousName = `None`
| _PickledAnonymousReference__namespace = `None`

Method Details | [hide private]

### __init__(self, namespace, anonymous_name) (Constructor) | source code
Create a new anonymous reference. Parameters: `namespace` (pyxb.namespace.Namespace) - The namespace in which the component is declared. `anonymous_name` (`basestring`.) - A generated name guaranteed to be unique within the namespace. See _NamedComponent_mixin._anonymousName. Overrides: object.__init__

### __str__(self) (Informal representation operator) | source code
Represent the anonymous reference in a form recognizable by a developer. Overrides: object.__str__

Class Variable Details | [hide private]

  ### __AnonymousCategory Value:
      pyxb.namespace.archive.NamespaceArchive._AnonymousCategory()

  ### _PickledAnonymousReference__AnonymousCategory Value:
      '_anonymousTypeDefinition'