Class: WSDL::XMLSchema::ComplexExtension
- Inherits:
-
Info
show all
- Defined in:
- lib/wsdl/xmlSchema/complexExtension.rb
Instance Attribute Summary collapse
Attributes inherited from Info
#id, #parent, #root
Instance Method Summary
collapse
Methods inherited from Info
#inspect, #parse_epilogue
Constructor Details
Returns a new instance of ComplexExtension.
22
23
24
25
26
27
28
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 22
def initialize
super
@base = nil
@basetype = nil
@content = nil
@attributes = XSD::NamedElements.new
end
|
Instance Attribute Details
Returns the value of attribute base.
19
20
21
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 19
def base
@base
end
|
Returns the value of attribute content.
20
21
22
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 20
def content
@content
end
|
Instance Method Details
#attributes ⇒ Object
60
61
62
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 60
def attributes
basetype.attributes + @attributes
end
|
#check_type ⇒ Object
64
65
66
67
68
69
70
71
72
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 64
def check_type
if @base == ::SOAP::ValueArrayName
:TYPE_ARRAY
elsif content or !@attributes.empty?
:TYPE_STRUCT
else
basetype.check_type
end
end
|
#choice? ⇒ Boolean
42
43
44
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 42
def choice?
content and content.choice?
end
|
34
35
36
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 34
def elementformdefault
parent.elementformdefault
end
|
46
47
48
49
50
51
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 46
def elements
result = XSD::NamedElements.new
result.concat(basetype.elements)
result.concat(content.elements) if content
result
end
|
#have_any? ⇒ Boolean
38
39
40
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 38
def have_any?
basetype.have_any? or (content && content.have_any?)
end
|
#nested_elements ⇒ Object
53
54
55
56
57
58
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 53
def nested_elements
result = XSD::NamedElements.new
result.concat(basetype.nested_elements)
result.concat(content.nested_elements) if content
result
end
|
#parse_attr(attr, value) ⇒ Object
100
101
102
103
104
105
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 100
def parse_attr(attr, value)
case attr
when BaseAttrName
@base = value
end
end
|
#parse_element(element) ⇒ Object
#targetnamespace ⇒ Object
30
31
32
|
# File 'lib/wsdl/xmlSchema/complexExtension.rb', line 30
def targetnamespace
parent.targetnamespace
end
|