1# ./pyxb/bundles/wssplat/raw/wsam.py
2# -*- coding: utf-8 -*-
3# PyXB bindings for NM:8412da32cb8f7a70943a9934e4bb13ceb5b27944
4# Generated 2017-09-03 06:16:47.761091 by PyXB version 1.2.6 using Python 2.7.12.final.0
5# Namespace http://www.w3.org/2007/02/addressing/metadata
6
7from __future__ import unicode_literals
8import pyxb
9import pyxb.binding
10import pyxb.binding.saxer
11import io
12import pyxb.utils.utility
13import pyxb.utils.domutils
14import sys
15import pyxb.utils.six as _six
16# Unique identifier for bindings created at the same time
17_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:604174ea-9099-11e7-b77e-3497f68b2e96')
18
19# Version of PyXB used to generate the bindings
20_PyXBVersion = '1.2.6'
21# Generated bindings are not compatible across PyXB versions
22if pyxb.__version__ != _PyXBVersion:
23    raise pyxb.PyXBVersionError(_PyXBVersion)
24
25# A holder for module-level binding classes so we can access them from
26# inside class definitions where property names may conflict.
27_module_typeBindings = pyxb.utils.utility.Object()
28
29# Import bindings for namespaces imported into schema
30import pyxb.bundles.wssplat.wsp200607
31import pyxb.binding.datatypes
32
33# NOTE: All namespace declarations are reserved within the binding
34Namespace = pyxb.namespace.NamespaceForURI('http://www.w3.org/2007/02/addressing/metadata', create_if_missing=True)
35Namespace.configureCategories(['typeBinding', 'elementBinding'])
36_Namespace = pyxb.bundles.wssplat.wsp200607.Namespace
37_Namespace.configureCategories(['typeBinding', 'elementBinding'])
38
39def CreateFromDocument (xml_text, default_namespace=None, location_base=None):
40    """Parse the given XML and use the document element to create a
41    Python instance.
42
43    @param xml_text An XML document.  This should be data (Python 2
44    str or Python 3 bytes), or a text (Python 2 unicode or Python 3
45    str) in the L{pyxb._InputEncoding} encoding.
46
47    @keyword default_namespace The L{pyxb.Namespace} instance to use as the
48    default namespace where there is no default namespace in scope.
49    If unspecified or C{None}, the namespace of the module containing
50    this function will be used.
51
52    @keyword location_base: An object to be recorded as the base of all
53    L{pyxb.utils.utility.Location} instances associated with events and
54    objects handled by the parser.  You might pass the URI from which
55    the document was obtained.
56    """
57
58    if pyxb.XMLStyle_saxer != pyxb._XMLStyle:
59        dom = pyxb.utils.domutils.StringToDOM(xml_text)
60        return CreateFromDOM(dom.documentElement, default_namespace=default_namespace)
61    if default_namespace is None:
62        default_namespace = Namespace.fallbackNamespace()
63    saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base)
64    handler = saxer.getContentHandler()
65    xmld = xml_text
66    if isinstance(xmld, _six.text_type):
67        xmld = xmld.encode(pyxb._InputEncoding)
68    saxer.parse(io.BytesIO(xmld))
69    instance = handler.rootObject()
70    return instance
71
72def CreateFromDOM (node, default_namespace=None):
73    """Create a Python instance from the given DOM node.
74    The node tag must correspond to an element declaration in this module.
75
76    @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}."""
77    if default_namespace is None:
78        default_namespace = Namespace.fallbackNamespace()
79    return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace)
80
81
82# Complex type {http://www.w3.org/2007/02/addressing/metadata}ServiceNameType with content type SIMPLE
83class ServiceNameType (pyxb.binding.basis.complexTypeDefinition):
84    """Complex type {http://www.w3.org/2007/02/addressing/metadata}ServiceNameType with content type SIMPLE"""
85    _TypeDefinition = pyxb.binding.datatypes.QName
86    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE
87    _Abstract = False
88    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'ServiceNameType')
89    _XSDLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 23, 4)
90    _ElementMap = {}
91    _AttributeMap = {}
92    # Base type is pyxb.binding.datatypes.QName
93
94    # Attribute EndpointName uses Python identifier EndpointName
95    __EndpointName = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'EndpointName'), 'EndpointName', '__httpwww_w3_org200702addressingmetadata_ServiceNameType_EndpointName', pyxb.binding.datatypes.NCName)
96    __EndpointName._DeclarationLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 26, 16)
97    __EndpointName._UseLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 26, 16)
98
99    EndpointName = property(__EndpointName.value, __EndpointName.set, None, None)
100
101    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=(pyxb.binding.content.Wildcard.NC_not, 'http://www.w3.org/2007/02/addressing/metadata'))
102    _ElementMap.update({
103
104    })
105    _AttributeMap.update({
106        __EndpointName.name() : __EndpointName
107    })
108_module_typeBindings.ServiceNameType = ServiceNameType
109Namespace.addCategoryObject('typeBinding', 'ServiceNameType', ServiceNameType)
110
111
112# Complex type {http://www.w3.org/2007/02/addressing/metadata}AttributedQNameType with content type SIMPLE
113class AttributedQNameType (pyxb.binding.basis.complexTypeDefinition):
114    """Complex type {http://www.w3.org/2007/02/addressing/metadata}AttributedQNameType with content type SIMPLE"""
115    _TypeDefinition = pyxb.binding.datatypes.QName
116    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE
117    _Abstract = False
118    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'AttributedQNameType')
119    _XSDLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 33, 4)
120    _ElementMap = {}
121    _AttributeMap = {}
122    # Base type is pyxb.binding.datatypes.QName
123    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=(pyxb.binding.content.Wildcard.NC_not, 'http://www.w3.org/2007/02/addressing/metadata'))
124    _ElementMap.update({
125
126    })
127    _AttributeMap.update({
128
129    })
130_module_typeBindings.AttributedQNameType = AttributedQNameType
131Namespace.addCategoryObject('typeBinding', 'AttributedQNameType', AttributedQNameType)
132
133
134# Complex type [anonymous] with content type ELEMENT_ONLY
135class CTD_ANON (pyxb.binding.basis.complexTypeDefinition):
136    """Complex type [anonymous] with content type ELEMENT_ONLY"""
137    _TypeDefinition = None
138    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
139    _Abstract = False
140    _ExpandedName = None
141    _XSDLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 46, 8)
142    _ElementMap = {}
143    _AttributeMap = {}
144    # Base type is pyxb.binding.datatypes.anyType
145
146    # Element {http://www.w3.org/2006/07/ws-policy}Policy uses Python identifier Policy
147    __Policy = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace, 'Policy'), 'Policy', '__httpwww_w3_org200702addressingmetadata_CTD_ANON_httpwww_w3_org200607ws_policyPolicy', False, pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsp200607.xsd', 30, 2), )
148
149
150    Policy = property(__Policy.value, __Policy.set, None, None)
151
152    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=(pyxb.binding.content.Wildcard.NC_not, 'http://www.w3.org/2007/02/addressing/metadata'))
153    _ElementMap.update({
154        __Policy.name() : __Policy
155    })
156    _AttributeMap.update({
157
158    })
159_module_typeBindings.CTD_ANON = CTD_ANON
160
161
162# Complex type [anonymous] with content type EMPTY
163class CTD_ANON_ (pyxb.binding.basis.complexTypeDefinition):
164    """Complex type [anonymous] with content type EMPTY"""
165    _TypeDefinition = None
166    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY
167    _Abstract = False
168    _ExpandedName = None
169    _XSDLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 55, 8)
170    _ElementMap = {}
171    _AttributeMap = {}
172    # Base type is pyxb.binding.datatypes.anyType
173    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=(pyxb.binding.content.Wildcard.NC_not, 'http://www.w3.org/2007/02/addressing/metadata'))
174    _ElementMap.update({
175
176    })
177    _AttributeMap.update({
178
179    })
180_module_typeBindings.CTD_ANON_ = CTD_ANON_
181
182
183# Complex type [anonymous] with content type EMPTY
184class CTD_ANON_2 (pyxb.binding.basis.complexTypeDefinition):
185    """Complex type [anonymous] with content type EMPTY"""
186    _TypeDefinition = None
187    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY
188    _Abstract = False
189    _ExpandedName = None
190    _XSDLocation = pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 61, 8)
191    _ElementMap = {}
192    _AttributeMap = {}
193    # Base type is pyxb.binding.datatypes.anyType
194    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=(pyxb.binding.content.Wildcard.NC_not, 'http://www.w3.org/2007/02/addressing/metadata'))
195    _ElementMap.update({
196
197    })
198    _AttributeMap.update({
199
200    })
201_module_typeBindings.CTD_ANON_2 = CTD_ANON_2
202
203
204ServiceName = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ServiceName'), ServiceNameType, location=pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 22, 4))
205Namespace.addCategoryObject('elementBinding', ServiceName.name().localName(), ServiceName)
206
207InterfaceName = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'InterfaceName'), AttributedQNameType, location=pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 32, 4))
208Namespace.addCategoryObject('elementBinding', InterfaceName.name().localName(), InterfaceName)
209
210Addressing = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Addressing'), CTD_ANON, location=pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 45, 4))
211Namespace.addCategoryObject('elementBinding', Addressing.name().localName(), Addressing)
212
213AnonymousResponses = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'AnonymousResponses'), CTD_ANON_, location=pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 54, 4))
214Namespace.addCategoryObject('elementBinding', AnonymousResponses.name().localName(), AnonymousResponses)
215
216NonAnonymousResponses = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'NonAnonymousResponses'), CTD_ANON_2, location=pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 60, 4))
217Namespace.addCategoryObject('elementBinding', NonAnonymousResponses.name().localName(), NonAnonymousResponses)
218
219
220
221CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace, 'Policy'), pyxb.bundles.wssplat.wsp200607.CTD_ANON_3, scope=CTD_ANON, location=pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsp200607.xsd', 30, 2)))
222
223def _BuildAutomaton ():
224    # Remove this helper function from the namespace after it is invoked
225    global _BuildAutomaton
226    del _BuildAutomaton
227    import pyxb.utils.fac as fac
228
229    counters = set()
230    states = []
231    final_update = set()
232    symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace, 'Policy')), pyxb.utils.utility.Location('/tmp/pyxbdist.WUiBAra/PyXB-1.2.6/pyxb/bundles/wssplat/schemas/wsam.xsd', 48, 16))
233    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
234    states.append(st_0)
235    transitions = []
236    st_0._set_transitionSet(transitions)
237    return fac.Automaton(states, counters, False, containing_state=None)
238CTD_ANON._Automaton = _BuildAutomaton()
239
240