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

Class ModelGroup

source code

                       object --+                
                                |                
                          cscRoot --+            
                                    |            
 utils.utility.PrivateTransient_mixin --+        
                                        |        
                           object --+   |        
                                    |   |        
                              cscRoot --+        
                                        |        
     namespace._ComponentDependency_mixin --+    
                                            |    
                           object --+       |    
                                    |       |    
                              cscRoot --+   |    
                                        |   |    
namespace.archive._ArchivableObject_mixin --+    
                                            |    
                           object --+       |    
                                    |       |    
                              cscRoot --+   |    
                                        |   |    
     utils.utility.PrivateTransient_mixin --+    
                                            |    
                           object --+       |    
                                    |       |    
                              cscRoot --+   |    
                                        |   |    
            utils.utility.Locatable_mixin --+    
                                            |    
                       _SchemaComponent_mixin --+
                                                |
                               object --+       |
                                        |       |
                                  cscRoot --+   |
                                            |   |
                             _Annotated_mixin --+
                                                |
                                               ModelGroup

An XMLSchema Model Group component.

Instance Methods [hide private]
 
compositor(self) source code
 
compositorToString(self)
Return a string representing the compositor value.
source code
 
particles(self) source code
 
isAdaptable(self, ctd)
A model group has an unresolvable particle if any of its particles is unresolvable.
source code
 
effectiveTotalRange(self, particle)
Return the minimum and maximum of the number of elements that can appear in a sequence matched by this particle.
source code
 
modelGroupDefinition(self)
The ModelGroupDefinition that names this group, or None if it is unnamed.
source code
 
__init__(self, compositor, particles, *args, **kw)
Create a new model group.
source code
 
pluralityData(self)
Get the plurality data for this model group.
source code
 
hasWildcardElement(self)
Return True if the model includes a wildcard amongst its particles.
source code
frozenset
_bindingRequires_vx(self, include_lax)
Placeholder for subclass method that identifies the necessary components.
source code
 
elementDeclarations(self)
Return a list of all ElementDeclarations that are at the top level of this model group, in the order in which they can occur.
source code
 
_adaptForScope(self, owner, ctd) source code
 
__str__(self)
str(x)
source code

Inherited from _SchemaComponent_mixin: bestNCName, hasBinding, isTypeDefinition, isUrTypeDefinition, nameInBinding, owner, setNameInBinding

Inherited from namespace._ComponentDependency_mixin: bindingRequires

Inherited from utils.utility.PrivateTransient_mixin: __getstate__

Inherited from _Annotated_mixin: annotation

Inherited from _Annotated_mixin (private): _annotationFromDOM

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
CompositorToString(cls, compositor)
Map a compositor value to a string.
source code
 
CreateFromDOM(cls, node, **kw)
Create a model group from the given DOM node.
source code
 
IsGroupMemberNode(cls, node) source code
Class Variables [hide private]
  C_INVALID = 0
  C_ALL = 1
  C_CHOICE = 2
  C_SEQUENCE = 3
  __compositor = 0
  __particles = None
hash(x)
  __modelGroupDefinition = None
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

isAdaptable(self, ctd)

source code 

A model group has an unresolvable particle if any of its particles is unresolvable. Duh.

effectiveTotalRange(self, particle)

source code 

Return the minimum and maximum of the number of elements that can appear in a sequence matched by this particle.

See http://www.w3.org/TR/xmlschema-1/#cos-seq-range

__init__(self, compositor, particles, *args, **kw)
(Constructor)

source code 

Create a new model group.

compositor must be a legal compositor value (one of C_ALL, C_CHOICE, C_SEQUENCE).

particles must be a list of zero or more Particle instances.

scope is the _ScopeDeclaration_mixin context into which new declarations are recorded. It can be SCOPE_global, a complex type definition, or None if this is (or is within) a named model group.

model_group_definition is an instance of ModelGroupDefinition if this is a named model group. It defaults to None indicating a local group.

Parameters:
  • scope - The scope in which the component is defined
  • namespace_context - The NamespaceContext to use within this component
  • node - If no namespace_context is provided, a DOM node must be provided from which a namespace context can be identified.
  • owner - Reference to the component that owns this one (the immediately enclosing component). Is None in the case of top-level components.
  • schema - Reference to the Schema component to which the component belongs. Required for every component except Schema, Annotation, and Wildcard.
Overrides: object.__init__

_bindingRequires_vx(self, include_lax)

source code 

Placeholder for subclass method that identifies the necessary components.

Returns: frozenset
The component instances on which this component depends
Raises:
  • LogicError - A subclass failed to implement this method
Overrides: namespace._ComponentDependency_mixin._bindingRequires_vx
(inherited documentation)

CreateFromDOM(cls, node, **kw)
Class Method

source code 

Create a model group from the given DOM node.

wxs is a Schema instance within which the model group is being defined.

node is a DOM element. The name must be one of ( 'all', 'choice', 'sequence' ), and the node must be in the XMLSchema namespace.

scope is the _ScopeDeclaration_mxin context that is assigned to declarations that appear within the model group. It can be None, indicating no scope defined, or a complex type definition.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)