Home | Trees | Indices | Help |
|
---|
|
object --+ | cscRoot --+ | utils.utility.PrivateTransient_mixin --+ | object --+ | | | cscRoot --+ | _NamedComponent_mixin
Mix-in to hold the name and targetNamespace of a component.
The name may be None, indicating an anonymous component. The targetNamespace is never None, though it could be an empty namespace. The name and targetNamespace values are immutable after creation.
This class overrides the pickling behavior: when pickling a Namespace, objects that do not belong to that namespace are pickled as references, not as values. This ensures the uniqueness of objects when multiple namespace definitions are pre-loaded.
This class must follow _SchemaComponent_mixin in the MRO.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
a new object with type S, a subtype of T |
|
|
|||
__PrivateTransient = set()
|
|||
__name = None hash(x) |
|||
__anonymousName = None hash(x) |
|||
__targetNamespace = None hash(x) |
|||
__bindingNamespace = None hash(x) |
|||
__templateMap = None hash(x) |
|||
__AnonymousCategory = pyxb.namespace.archive.NamespaceArchive.
|
|||
__schema = None hash(x) |
|||
_NamedComponent_mixin__AnonymousCategory =
|
|||
_NamedComponent_mixin__PrivateTransient =
|
|||
_NamedComponent_mixin__anonymousName = None hash(x) |
|||
_NamedComponent_mixin__bindingNamespace = None hash(x) |
|||
_NamedComponent_mixin__name = None hash(x) |
|||
_NamedComponent_mixin__schema = None hash(x) |
|||
_NamedComponent_mixin__targetNamespace = None hash(x) |
|||
_NamedComponent_mixin__templateMap = None hash(x) |
|
|||
Inherited from |
|
Name of the component within its scope or namespace. This is an NCName. The value isNone if the component is anonymous. The attribute is immutable after the component is created creation. |
The targetNamespace of a component. This is None, or a reference to a Namespace in which the component is declared (either as a global or local to one of the namespace's complex type definitions). This is immutable after creation. |
A map from template keys to component-specific values. This is used in code generation to maintain unique names for accessor methods, identifiers, keys, and other characteristics associated with the code generated in support of the binding for this component. |
Return the schema component from which this component was defined. Needed so we can distinguish components that came from different locations, since that imposes an external order dependency on them and on cross-namespace inclusions. Note: This characteristic is removed when the component is stored in a namespace archive. |
Return When pickling, a declaration component is considered to belong to the namespace if it has a local scope which belongs to the namespace. In that case, the declaration is a clone of something that does not belong to the namespace; but the clone does.
See Also: _bindsInNamespace |
Return This is the case when the component is in the given namespace. It's also the case when the component has no associated namespace (but not an absent namespace). Be aware that cross-namespace inheritance means you will get references to elements in another namespace when generating code for a subclass; that's fine, and those references should not be generated locally. |
Pickling support. Normally, we just create a new instance of this class. However, if we're unpickling a reference in a loadable schema, we need to return the existing component instance by looking up the name in the component map of the desired namespace. We can tell the difference because no normal constructors that inherit from this have positional arguments; only invocations by unpickling with a value returned in __getnewargs__ do. This does require that the dependent namespace already have been validated (or that it be validated here). That shouldn't be a problem, except for the dependency loop resulting from use of xml:lang in the XMLSchema namespace. For that issue, see pyxb.namespace._XMLSchema.
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Return true iff this and the other component share the same name and target namespace. Anonymous components are inherently name inequivalent, except to themselves. This relies on equivalence as defined for pyxb.namespace.ExpandedName, for which None is not equivalent to any non-anonymous name. |
Return True iff this and the other component have matching types. It appears that name equivalence is used; two complex type definitions with identical structures are not considered equivalent (at least, per XMLSpy). |
Return True iff this type can serve as a restriction of the other type for the purposes of element consistency. It appears that name equivalence is normally used; two complex type definitions with identical structures are not considered equivalent (at least, per XMLSpy). However, some OpenGIS standards demonstrate that derivation by restriction from the other type is also acceptable. That opens a whole can of worms; see ElementDeclaration.isAdaptable. |
|
Pickling support. If this instance is being pickled as a reference, provide the arguments that are necessary so that the unpickler can locate the appropriate component rather than create a duplicate instance. |
|
__AnonymousCategory
|
_NamedComponent_mixin__AnonymousCategory
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Nov 1 15:13:24 2012 | http://epydoc.sourceforge.net |