Parent

Files

Class Index [+]

Quicksearch

WSDL::XMLSchema::SimpleType

Attributes

name[RW]
restriction[R]
list[R]
union[R]

Public Class Methods

new(name = nil) click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 43
43:   def initialize(name = nil)
44:     super()
45:     @name = name
46:     @restriction = nil
47:     @list = nil
48:     @union = nil
49:   end

Public Instance Methods

base() click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 35
35:   def base
36:     if @restriction
37:       @restriction.base
38:     else
39:       nil
40:     end
41:   end
check_lexical_format(value) click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 23
23:   def check_lexical_format(value)
24:     if @restriction
25:       check_restriction(value)
26:     elsif @list
27:       # TODO: check
28:     elsif @union
29:       # TODO: check
30:     else
31:       raise ArgumentError.new("incomplete simpleType")
32:     end
33:   end
parse_attr(attr, value) click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 69
69:   def parse_attr(attr, value)
70:     case attr
71:     when NameAttrName
72:       @name = XSD::QName.new(targetnamespace, value.source)
73:     end
74:   end
parse_element(element) click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 55
55:   def parse_element(element)
56:     case element
57:     when RestrictionName
58:       @restriction = SimpleRestriction.new
59:       @restriction
60:     when ListName
61:       @list = List.new
62:       @list
63:     when UnionName
64:       @union = Union.new
65:       @union
66:     end
67:   end
targetnamespace() click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 51
51:   def targetnamespace
52:     parent.targetnamespace
53:   end

Private Instance Methods

check_restriction(value) click to toggle source
    # File lib/wsdl/xmlSchema/simpleType.rb, line 78
78:   def check_restriction(value)
79:     unless @restriction.valid?(value)
80:       raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
81:     end
82:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.