class WsdlMapper::DomParsing::Linker
Public Class Methods
new(schema)
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 8 def initialize(schema) @schema = schema @log_msgs = [] end
Public Instance Methods
link()
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 13 def link link_base_types link_soap_array_types link_property_types link_attribute_types link_element_types @schema end
Private Instance Methods
link_attribute_types()
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 66 def link_attribute_types @schema.each_type do |type| next unless type.is_a? WsdlMapper::Dom::ComplexType type.each_attribute do |attr| if attr.is_a?(WsdlMapper::Dom::Attribute::Ref) type.add_attribute @schema.get_attribute attr.name elsif attr.type_name attr.type = @schema.get_type attr.type_name unless attr.type log_msg attr, :missing_attribute_type end end end end end
link_base_types()
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 84 def link_base_types @schema.each_type do |type| next unless type.base_type_name type.base = @schema.get_type type.base_type_name unless type.base log_msg type, :missing_base_type end end end
link_element_types()
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 24 def link_element_types @schema.each_element do |element| if element.type_name element.type = @schema.get_type element.type_name unless element.type log_msg element.type, :missing_element_type end end end end
link_property_types()
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 36 def link_property_types @schema.each_type do |type| next unless type.is_a? WsdlMapper::Dom::ComplexType type.each_property do |prop| if prop.is_a?(WsdlMapper::Dom::Property::Ref) element = @schema.get_element prop.name p = WsdlMapper::Dom::Property.new element.name, element.type_name, sequence: prop.sequence, bounds: prop.bounds, fixed: prop.fixed, form: prop.form, default: prop.default if p.type_name p.type = @schema.get_type p.type_name else p.type = element.type end type.add_property p elsif prop.type_name prop.type = @schema.get_type prop.type_name unless prop.type log_msg prop, :missing_property_type end end end end end
link_soap_array_types()
click to toggle source
# File lib/wsdl_mapper/dom_parsing/linker.rb, line 95 def link_soap_array_types @schema.each_type do |type| next unless type.is_a? WsdlMapper::Dom::ComplexType next unless type.soap_array? type.soap_array_type = @schema.get_type type.soap_array_type_name unless type.soap_array_type log_msg type, :missing_soap_array_type end end end