### Home Classes Methods

### In Files

- lib/soap/baseData.rb

### Parent

XSD::NSDBase

### Methods

- ::new
- #[]
- #[]=
- #add
- #deep_map
- #each
- #have_member
- #include?
- #offset=
- #position
- #replace
- #soap2array
- #to_a
- #traverse

### Included Modules

- SOAP::SOAPCompoundtype
- Enumerable

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- SOAP
- SOAP::ArrayIndexOutOfBoundsError
- SOAP::ArrayStoreError
- SOAP::Attachment
- SOAP::AttrProxy
- SOAP::AttrProxy::AttrProxyClassSupport
- SOAP::EmptyResponseError
- SOAP::EncodingStyle
- SOAP::EncodingStyle::ASPDotNetHandler
- SOAP::EncodingStyle::ASPDotNetHandler::SOAPTemporalObject
- SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown
- SOAP::EncodingStyle::Handler
- SOAP::EncodingStyle::Handler::EncodingStyleError
- SOAP::EncodingStyle::LiteralHandler
- SOAP::EncodingStyle::SOAPHandler
- SOAP::EncodingStyle::SOAPHandler::SOAPTemporalObject
- SOAP::EncodingStyle::SOAPHandler::SOAPUnknown
- SOAP::Env
- SOAP::Error
- SOAP::FaultCode
- SOAP::FaultError
- SOAP::Filter
- SOAP::Filter::FilterChain
- SOAP::Filter::Handler
- SOAP::Filter::StreamHandler
- SOAP::Generator
- SOAP::Generator::FormatEncodeError
- SOAP::HTTPConfigLoader
- SOAP::HTTPStreamError
- SOAP::HTTPStreamHandler
- SOAP::HTTPStreamHandler::Client
- SOAP::HTTPStreamHandler::HttpPostRequestFilter
- SOAP::Header
- SOAP::Header::Handler
- SOAP::Header::HandlerSet
- SOAP::Header::MappingHandler
- SOAP::Header::SimpleHandler
- SOAP::MIMEMessage
- SOAP::MIMEMessage::Header
- SOAP::MIMEMessage::Headers
- SOAP::MIMEMessage::MIMEMessageError
- SOAP::MIMEMessage::Part
- SOAP::MPostUnavailableError
- SOAP::Mapping
- SOAP::Mapping::ArrayFactory_
- SOAP::Mapping::AttachmentFactory
- SOAP::Mapping::Base64Factory_
- SOAP::Mapping::BasetypeFactory_
- SOAP::Mapping::DateTimeFactory_
- SOAP::Mapping::EncodedRegistry
- SOAP::Mapping::EncodedRegistry::Map
- SOAP::Mapping::Factory
- SOAP::Mapping::FixnumFactory_
- SOAP::Mapping::HashFactory_
- SOAP::Mapping::LiteralRegistry
- SOAP::Mapping::MappedException
- SOAP::Mapping::MappingError
- SOAP::Mapping::Object
- SOAP::Mapping::Registry
- SOAP::Mapping::RegistrySupport
- SOAP::Mapping::RubytypeFactory
- SOAP::Mapping::SOAPException
- SOAP::Mapping::SchemaChoiceDefinition
- SOAP::Mapping::SchemaComplexTypeDefinition
- SOAP::Mapping::SchemaDefinition
- SOAP::Mapping::SchemaElementDefinition
- SOAP::Mapping::SchemaEmptyDefinition
- SOAP::Mapping::SchemaSequenceDefinition
- SOAP::Mapping::StringFactory_
- SOAP::Mapping::TraverseSupport
- SOAP::Mapping::TypedArrayFactory_
- SOAP::Mapping::TypedStructFactory_
- SOAP::Mapping::URIFactory_
- SOAP::Mapping::WSDLEncodedRegistry
- SOAP::Mapping::WSDLLiteralRegistry
- SOAP::Marshal
- SOAP::Marshal
- SOAP::Marshallable
- SOAP::NS
- SOAP::NestedException
- SOAP::NetHttpClient
- SOAP::NetHttpClient::Response
- SOAP::NetHttpClient::SessionManager
- SOAP::Parser
- SOAP::Parser::FormatDecodeError
- SOAP::Parser::ParseError
- SOAP::Parser::ParseFrame
- SOAP::Parser::ParseFrame::NodeContainer
- SOAP::Parser::UnexpectedElementError
- SOAP::PostUnavailableError
- SOAP::Processor
- SOAP::Property
- SOAP::Property::Util
- SOAP::RPC
- SOAP::RPC::CGIStub
- SOAP::RPC::CGIStub::SOAPFCGIRequest
- SOAP::RPC::CGIStub::SOAPRequest
- SOAP::RPC::CGIStub::SOAPStdinRequest
- SOAP::RPC::Driver
- SOAP::RPC::HTTPServer
- SOAP::RPC::MethodDef
- SOAP::RPC::MethodDef::Parameter
- SOAP::RPC::MethodDefinitionError
- SOAP::RPC::ParameterError
- SOAP::RPC::Proxy
- SOAP::RPC::Proxy::Operation
- SOAP::RPC::RPCError
- SOAP::RPC::Router
- SOAP::RPC::Router::ApplicationScopeOperation
- SOAP::RPC::Router::Operation
- SOAP::RPC::Router::RequestScopeOperation
- SOAP::RPC::SOAPMethod
- SOAP::RPC::SOAPMethodRequest
- SOAP::RPC::SOAPMethodResponse
- SOAP::RPC::SOAPVoid
- SOAP::RPC::SOAPlet
- SOAP::RPC::StandaloneServer
- SOAP::RPCRoutingError
- SOAP::ResponseFormatError
- SOAP::SOAPAnySimpleType
- SOAP::SOAPAnyURI
- SOAP::SOAPArray
- SOAP::SOAPAttachment
- SOAP::SOAPBase64
- SOAP::SOAPBasetype
- SOAP::SOAPBody
- SOAP::SOAPBoolean
- SOAP::SOAPByte
- SOAP::SOAPCompoundtype
- SOAP::SOAPDate
- SOAP::SOAPDateTime
- SOAP::SOAPDecimal
- SOAP::SOAPDouble
- SOAP::SOAPDuration
- SOAP::SOAPENTITIES
- SOAP::SOAPENTITY
- SOAP::SOAPElement
- SOAP::SOAPEnvelope
- SOAP::SOAPEnvelopeElement
- SOAP::SOAPExternalReference
- SOAP::SOAPFault
- SOAP::SOAPFloat
- SOAP::SOAPGDay
- SOAP::SOAPGMonth
- SOAP::SOAPGMonthDay
- SOAP::SOAPGYear
- SOAP::SOAPGYearMonth
- SOAP::SOAPHeader
- SOAP::SOAPHeaderItem
- SOAP::SOAPHexBinary
- SOAP::SOAPID
- SOAP::SOAPIDREF
- SOAP::SOAPIDREFS
- SOAP::SOAPInt
- SOAP::SOAPInteger
- SOAP::SOAPLanguage
- SOAP::SOAPLong
- SOAP::SOAPModuleUtils
- SOAP::SOAPNCName
- SOAP::SOAPNMTOKEN
- SOAP::SOAPNMTOKENS
- SOAP::SOAPName
- SOAP::SOAPNameAccessible
- SOAP::SOAPNegativeInteger
- SOAP::SOAPNil
- SOAP::SOAPNonNegativeInteger
- SOAP::SOAPNonPositiveInteger
- SOAP::SOAPNormalizedString
- SOAP::SOAPPositiveInteger
- SOAP::SOAPQName
- SOAP::SOAPREXMLElementWrap
- SOAP::SOAPRawData
- SOAP::SOAPRawString
- SOAP::SOAPReference
- SOAP::SOAPShort
- SOAP::SOAPString
- SOAP::SOAPStruct
- SOAP::SOAPTime
- SOAP::SOAPToken
- SOAP::SOAPType
- SOAP::SOAPUnsignedByte
- SOAP::SOAPUnsignedInt
- SOAP::SOAPUnsignedLong
- SOAP::SOAPUnsignedShort
- SOAP::StreamError
- SOAP::StreamHandler
- SOAP::StreamHandler::ConnectionData
- SOAP::UnhandledMustUnderstandHeaderError
- SOAP::WSDLDriverFactory
- SOAP::WSDLDriverFactory::FactoryError
- WSDL
- WSDL::Binding
- WSDL::Definitions
- WSDL::Documentation
- WSDL::Error
- WSDL::Import
- WSDL::Importer
- WSDL::Info
- WSDL::Message
- WSDL::Operation
- WSDL::OperationBinding
- WSDL::OperationBinding::BoundId
- WSDL::OperationBinding::OperationInfo
- WSDL::OperationBinding::Part
- WSDL::Param
- WSDL::Parser
- WSDL::Parser::AttributeConstraintError
- WSDL::Parser::ElementConstraintError
- WSDL::Parser::FormatDecodeError
- WSDL::Parser::ParseError
- WSDL::Parser::ParseFrame
- WSDL::Parser::UnexpectedElementError
- WSDL::Parser::UnknownAttributeError
- WSDL::Parser::UnknownElementError
- WSDL::Part
- WSDL::Port
- WSDL::PortType
- WSDL::SOAP
- WSDL::SOAP::Address
- WSDL::SOAP::Binding
- WSDL::SOAP::Body
- WSDL::SOAP::CGIStubCreator
- WSDL::SOAP::ClassDefCreator
- WSDL::SOAP::ClassDefCreatorSupport
- WSDL::SOAP::ClassNameCreator
- WSDL::SOAP::ClientSkeltonCreator
- WSDL::SOAP::DriverCreator
- WSDL::SOAP::EncodedMappingRegistryCreator
- WSDL::SOAP::Fault
- WSDL::SOAP::Header
- WSDL::SOAP::HeaderFault
- WSDL::SOAP::LiteralMappingRegistryCreator
- WSDL::SOAP::MappingRegistryCreator
- WSDL::SOAP::MappingRegistryCreatorSupport
- WSDL::SOAP::MethodDefCreator
- WSDL::SOAP::Operation
- WSDL::SOAP::Operation::ParamInfo
- WSDL::SOAP::ServantSkeltonCreator
- WSDL::SOAP::ServletStubCreator
- WSDL::SOAP::StandaloneServerStubCreator
- WSDL::SOAP::WSDL2Ruby
- WSDL::Service
- WSDL::Types
- WSDL::XMLSchema
- WSDL::XMLSchema::All
- WSDL::XMLSchema::Annotation
- WSDL::XMLSchema::Any
- WSDL::XMLSchema::AnyAttribute
- WSDL::XMLSchema::Attribute
- WSDL::XMLSchema::AttributeGroup
- WSDL::XMLSchema::Choice
- WSDL::XMLSchema::ComplexContent
- WSDL::XMLSchema::ComplexExtension
- WSDL::XMLSchema::ComplexRestriction
- WSDL::XMLSchema::ComplexType
- WSDL::XMLSchema::Content
- WSDL::XMLSchema::Element
- WSDL::XMLSchema::Enumeration
- WSDL::XMLSchema::FractionDigits
- WSDL::XMLSchema::Group
- WSDL::XMLSchema::Import
- WSDL::XMLSchema::ImportHandler
- WSDL::XMLSchema::Importer
- WSDL::XMLSchema::Include
- WSDL::XMLSchema::Length
- WSDL::XMLSchema::List
- WSDL::XMLSchema::MaxExclusive
- WSDL::XMLSchema::MaxInclusive
- WSDL::XMLSchema::MaxLength
- WSDL::XMLSchema::MinExclusive
- WSDL::XMLSchema::MinInclusive
- WSDL::XMLSchema::MinLength
- WSDL::XMLSchema::Parser
- WSDL::XMLSchema::Parser::AttributeConstraintError
- WSDL::XMLSchema::Parser::ElementConstraintError
- WSDL::XMLSchema::Parser::FormatDecodeError
- WSDL::XMLSchema::Parser::ParseError
- WSDL::XMLSchema::Parser::ParseFrame
- WSDL::XMLSchema::Parser::UnexpectedElementError
- WSDL::XMLSchema::Parser::UnknownAttributeError
- WSDL::XMLSchema::Parser::UnknownElementError
- WSDL::XMLSchema::Pattern
- WSDL::XMLSchema::Ref
- WSDL::XMLSchema::Ref::RefClassSupport
- WSDL::XMLSchema::Schema
- WSDL::XMLSchema::Sequence
- WSDL::XMLSchema::SimpleContent
- WSDL::XMLSchema::SimpleExtension
- WSDL::XMLSchema::SimpleRestriction
- WSDL::XMLSchema::SimpleType
- WSDL::XMLSchema::TotalDigits
- WSDL::XMLSchema::Union
- WSDL::XMLSchema::Unique
- WSDL::XMLSchema::WhiteSpace
- WSDL::XMLSchema::XSD2Ruby
- XSD
- XSD::Charset
- XSD::Charset::CharsetConversionError
- XSD::Charset::CharsetError
- XSD::Charset::UnknownCharsetError
- XSD::Charset::XSDError
- XSD::CodeGen
- XSD::CodeGen::ClassDef
- XSD::CodeGen::CommentDef
- XSD::CodeGen::GenSupport
- XSD::CodeGen::MethodDef
- XSD::CodeGen::ModuleDef
- XSD::Error
- XSD::FloatConstants
- XSD::IconvCharset
- XSD::Mapping
- XSD::Mapping::Mapper
- XSD::NS
- XSD::NS::Assigner
- XSD::NS::FormatError
- XSD::NSDBase
- XSD::NamedElements
- XSD::QName
- XSD::ValueSpaceError
- XSD::XMLParser
- XSD::XMLParser::LibXMLParser
- XSD::XMLParser::Parser
- XSD::XMLParser::Parser::ElementConstraintError
- XSD::XMLParser::Parser::FormatDecodeError
- XSD::XMLParser::Parser::ParseError
- XSD::XMLParser::Parser::ParserError
- XSD::XMLParser::Parser::UnexpectedElementError
- XSD::XMLParser::Parser::UnknownAttributeError
- XSD::XMLParser::Parser::UnknownElementError
- XSD::XMLParser::REXMLParser
- XSD::XMLParser::XMLParser
- XSD::XMLParser::XMLParser::Listener
- XSD::XMLParser::XMLScanner
- XSD::XSDAnySimpleType
- XSD::XSDAnyURI
- XSD::XSDBase64Binary
- XSD::XSDBoolean
- XSD::XSDByte
- XSD::XSDDate
- XSD::XSDDateTime
- XSD::XSDDateTimeImpl
- XSD::XSDDecimal
- XSD::XSDDouble
- XSD::XSDDuration
- XSD::XSDENTITIES
- XSD::XSDENTITY
- XSD::XSDFloat
- XSD::XSDGDay
- XSD::XSDGMonth
- XSD::XSDGMonthDay
- XSD::XSDGYear
- XSD::XSDGYearMonth
- XSD::XSDHexBinary
- XSD::XSDID
- XSD::XSDIDREF
- XSD::XSDIDREFS
- XSD::XSDInt
- XSD::XSDInteger
- XSD::XSDLanguage
- XSD::XSDLong
- XSD::XSDNCName
- XSD::XSDNMTOKEN
- XSD::XSDNMTOKENS
- XSD::XSDName
- XSD::XSDNegativeInteger
- XSD::XSDNil
- XSD::XSDNonNegativeInteger
- XSD::XSDNonPositiveInteger
- XSD::XSDNormalizedString
- XSD::XSDPositiveInteger
- XSD::XSDQName
- XSD::XSDShort
- XSD::XSDString
- XSD::XSDTime
- XSD::XSDToken
- XSD::XSDUnsignedByte
- XSD::XSDUnsignedInt
- XSD::XSDUnsignedLong
- XSD::XSDUnsignedShort
- Object
- Object::SOAPMarshal
- WEBrick
- WEBrick::Log
- Enumerable
- Hash
- Kernel

No matching classes.

# SOAP::SOAPArray

### Constants

ITEM_NAME
TypeParseRegexp

### Attributes

arytype[R]
offset[R]
rank[R]
size[RW]
size_fixed[RW]
sparse[RW]

### Public Class Methods

new(type = nil, rank = 1, arytype = nil) click to toggle source

    # File lib/soap/baseData.rb, line 867
    def initialize(type = nil, rank = 1, arytype = nil)
      super()
      @type = type || ValueArrayName
      @rank = rank
      @data = Array.new
      @sparse = false
      @offset = Array.new(rank, 0)
      @size = Array.new(rank, 0)
      @size_fixed = false
      @position = nil
      @arytype = arytype
    end

### Public Instance Methods

[](*idxary) click to toggle source

    # File lib/soap/baseData.rb, line 893
    def [](*idxary)
      if idxary.size != @rank
        raise ArgumentError.new("given #{idxary.size} params does not match rank: #{@rank}")
      end
      retrieve(idxary)
    end

[]=(*idxary) click to toggle source

    # File lib/soap/baseData.rb, line 900
    def []=(*idxary)
      value = idxary.slice!(-1)
      if idxary.size != @rank
        raise ArgumentError.new("given #{idxary.size} params(#{idxary}) does not match rank: #{@rank}")
      end
      idx = 0
      while idx < idxary.size
        if idxary[idx] + 1 > @size[idx]
          @size[idx] = idxary[idx] + 1
        end
        idx += 1
      end
      data = retrieve(idxary[0, idxary.size - 1])
      data[idxary.last] = value
      if value.is_a?(SOAPType)
        value.elename = ITEM_NAME
        # Sync type
        unless @type.name
          @type = XSD::QName.new(value.type.namespace,
            SOAPArray.create_arytype(value.type.name, @rank))
        end
        value.type ||= @type
      end
      @offset = idxary
      value.parent = self if value.respond_to?(:parent=)
      offsetnext
    end

add(value) click to toggle source

    # File lib/soap/baseData.rb, line 885
    def add(value)
      self[*(@offset)] = value
    end

deep_map(ary, &block) click to toggle source

    # File lib/soap/baseData.rb, line 944
    def deep_map(ary, &block)
      ary.collect do |ele|
        if ele.is_a?(Array)
          deep_map(ele, &block)
        else
          new_obj = block.call(ele)
          new_obj.elename = ITEM_NAME
          new_obj
        end
      end
    end

each() click to toggle source

    # File lib/soap/baseData.rb, line 928
    def each
      @data.each do |data|
        yield(data)
      end
    end

have_member() click to toggle source

    # File lib/soap/baseData.rb, line 889
    def have_member
      !@data.empty?
    end

include?(var) click to toggle source

    # File lib/soap/baseData.rb, line 956
    def include?(var)
      traverse_data(@data) do |v, *rank|
        if v.is_a?(SOAPBasetype) && v.data == var
          return true
        end
      end
      false
    end

offset=(var) click to toggle source

    # File lib/soap/baseData.rb, line 880
    def offset=(var)
      @offset = var
      @sparse = true
    end

position() click to toggle source

    # File lib/soap/baseData.rb, line 996
    def position
      @position
    end

replace() click to toggle source

    # File lib/soap/baseData.rb, line 938
    def replace
      @data = deep_map(@data) do |ele|
        yield(ele)
      end
    end

soap2array(ary) click to toggle source

    # File lib/soap/baseData.rb, line 975
    def soap2array(ary)
      traverse_data(@data) do |v, *position|
        iteary = ary
        rank = 1
        while rank < position.size
          idx = position[rank - 1]
          if iteary[idx].nil?
            iteary = iteary[idx] = Array.new
          else
            iteary = iteary[idx]
          end
          rank += 1
        end
        if block_given?
          iteary[position.last] = yield(v)
        else
          iteary[position.last] = v
        end
      end
    end

to_a() click to toggle source

    # File lib/soap/baseData.rb, line 934
    def to_a
      @data.dup
    end

traverse() click to toggle source

    # File lib/soap/baseData.rb, line 965
    def traverse
      traverse_data(@data) do |v, *rank|
        unless @sparse
         yield(v)
        else
         yield(v, *rank) if v && !v.is_a?(SOAPNil)
        end
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.